Skip to content

Say where a hit was said, and follow the conversation it names. - #57

Merged
itz4blitz merged 1 commit into
mainfrom
feat/search-hit-rows
Oct 24, 2026
Merged

itz4blitz merged 1 commit into
mainfrom
feat/search-hit-rows

Conversation

@unRekable

Copy link
Copy Markdown
Collaborator

Stacked on #55 — the search-pane work; merge that first. Against feat/search-pane-scopes so only this slice shows.

What

The search pane's result rows take the anatomy docs/product/05-navigation.md §5 draws for them: a context line of the network's mark, the Space the conversation sits in before the conversation's name, and the date at the end — the match stays emphasised below.

Two refinements from review of #55:

  • "This conversation" names the conversation open now: switching conversation re-asks the cache, the old hits staying up until the answer lands.
  • A page remade since an ask (pane closed and opened again within one round-trip) no longer takes that older ask's answer: the stale guard takes the words and the scope with the count.

Tests

cargo check -p tinyclient --features gui clean, cargo test -p tinyclient --features gui 350 passed.

@itz4blitz itz4blitz left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The context line looks right, and the follow-the-open-conversation and stale-guard fixes from #55 are good. A few things:

  1. This inherits #55's switcher bug: the "Search messages" row fills the field with set_text, which emits nothing, so nothing is asked (side.rs:439 here). See the #55 review.
  2. The picked row survives a conversation switch. The re-ask deliberately keeps picked (side.rs:232, :576), and the answer handler only sets page.hits. Once the new answer lands, the lit row and Enter's target are a different message the user never chose. If the index is out of range, Enter falls through to the network ask in #58. Please clear picked when the scope's target changes, or when an answer for a different target lands.
  3. Only the Conversation scope follows a switch here (:241), so This space stays on the old Space. #58 fixes that, so this is fine as a stack.
  4. held() (:594, :975) scans the sidebar rows and every tree once per distinct hit conversation per frame, plus open_with_space every frame. Resolving the context line once when an answer lands would keep render cheap with many hits.
  5. There are no tests for the follow/re-ask behaviour or the context line.

@unRekable
unRekable force-pushed the feat/search-pane-scopes branch from 81ef9a9 to 89f3e40 Compare October 20, 2026 14:53
@unRekable
unRekable force-pushed the feat/search-hit-rows branch from c146e3f to 7fb3442 Compare October 20, 2026 15:22
@itz4blitz
itz4blitz force-pushed the feat/search-pane-scopes branch from afc49e6 to 345c650 Compare October 24, 2026 16:50
@itz4blitz
itz4blitz changed the base branch from feat/search-pane-scopes to main October 24, 2026 16:51
@itz4blitz
itz4blitz force-pushed the feat/search-hit-rows branch from 7fb3442 to 6730d04 Compare October 24, 2026 16:55
@itz4blitz
itz4blitz merged commit e807df5 into main Oct 24, 2026
@itz4blitz
itz4blitz deleted the feat/search-hit-rows branch October 24, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants