Repository navigation
Open the search pane from the switcher's row, with the cache's hits landing on their message. - #20
Conversation
4777fe1 to
31365e8
Compare
|
Left this as a draft, so it is not merged. One thing before it is ready: The action-bar change in #19 just landed on |
itz4blitz
left a comment
There was a problem hiding this comment.
Not merged. The pane opens and the cache read is the right shape, and macOS, Linux, and Windows are green, but the first paint is wrong.
open_message_search stores hits: Vec::new() and draw_search treats an empty list as "Nothing in the cache yet." That line shows while the read is still in flight, including for a query that has hits. A failed read stays on the same line. Show that copy only after an answered page comes back with no hits, and use a different line while the read is outstanding or failed.
This also needs a rebase onto current main. #19 landed in conversation.rs after this branch was cut.
31365e8 to
38acddb
Compare
|
Both done, thank you for reading it so closely. The pane now says what the read is doing: Rebased onto the action-bar change; the conversation.rs edits merged clean and the pane builds and passes its tests on top. |
itz4blitz
left a comment
There was a problem hiding this comment.
Both notes are addressed on 38acddb. hits stays None until the cache answers, so the pane says "Asking the cache…" while the read is outstanding, "Nothing in the cache yet." only for an empty answer, and "tinyclient isn't answering." when the read fails. The branch is rebased onto the action-bar change in conversation.rs.
I'll merge once macOS, Linux, and Windows finish green.
|
One more on the same line of the spec: a hit's landing now takes the jump path ( |
What changed and why
The switcher's "Search messages for …" row has been a promise so far: the slot it calls was
never filled, so the row never showed. It now opens the right pane the architecture had set
aside for this (
Layer::Search,RightKind::Search), the pane asks the cache(
SearchMessages, merged in #12) and lists the hits: where they are, the text around thematch, how old, each tagged "cached" (the spec's N12). Clicking a hit opens that conversation
on the message.
The networks are still not asked; that stays the next change, as staged in the roadmap claim.
What it took
conversation.rs: a pane'slandingfield. A search hit opening a conversation starts itsfirst page around the hit's message, winning over the read-position page; an already-open
conversation jumps instead (
jump_to, now reachable from the shell).conversation/side.rs: theSearchPagestate,open_message_search(asks the cache offthe main thread, answers only into the page whose words they are),
open_search_hit, anddraw_search(the pane: the query, hit rows with age and the "cached" tag, an empty state).state.rs: the slot is filled, so the switcher's row appears.Test
cargo check -p tinyclient --features guiandcargo test -p tinyclientpass; clippy isquiet on the touched files.
the hits, and a hit opens its conversation on the message. A screenshot follows; the pane's
first cut is this list, with highlighting and the "Jump to present" pill left to a polish
change, as the spec's N12 stages them.
Tested on Windows; the GUI feature builds here (
gpuiat the pinned revision).