Skip to content

feat(native): find in thread - #24

Merged
rynfar merged 2 commits into
nativefrom
nw/w1-thread
Nov 2, 2026
Merged

rynfar merged 2 commits into
nativefrom
nw/w1-thread

Conversation

@rynfar

@rynfar rynfar commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Thread surfaces, worked in the orchestrator's order. More items follow as additional commits; this description is updated as they land.

Done

TV-FIND: find in thread

  • cmd-f (chat.find, !terminalFocus && !previewFocus) and Find in thread in the thread menu open the web's find bar (ThreadFindBar.tsx): field, count, Searching… / Search failed with Retry, previous, next, close. Escape closes it.
  • Matches come from orchestration.searchThread (useThreadFind.ts), so they include history that isn't loaded yet. The search starts at the first entry in the viewport.
  • Enter and Shift-Enter step through the result's navigation window locally when they can, and otherwise ask the server with start + offset. While the server is still counting (complete: false) the label shows 1/… and navigation waits.
  • The active match is revealed the way useThreadFindNavigation.ts does it: open the turn fold (fold_membership, a port of timelineTurnFoldRunIdsByEntryId), the superseded attempt or the tool group that hides it, page history in when the match is older than the loaded window, then scroll it into view. Inside an open group, the group's own list scrolls to the member.
  • Streamed content re-asks from the current match after 300 ms.
  • Core: crates/core/src/timeline/find.rs, with tests for counting, wrapping, the local window, payloads and decoding. I checked the entryId semantics (message id for messages, item id otherwise) against ThreadFind.ts on the server and a read-only searchThread call on the real-data server.

Gap: highlighting is row-level. The active match's row takes a search_match_background tint. gpui-component's TextView has no text-range highlight API, so in-text marks need a renderer change.

Verification so far

  • cargo test -p t3-core: 267 passed. Workspace clippy with -D warnings passes.
  • Runtime: the Mac's GUI session stopped launching windows partway through this batch; the app now prints nothing at startup on either server. Find is verified by tests and builds only.

cmd-f (chat.find, and Find in thread from the thread menu) opens the web's find bar: the server counts and orders matches across the whole thread (orchestration.searchThread), Enter and Shift-Enter step through them using the result's navigation window without a round trip when they can, and the count, Searching… and Search failed with Retry match the web. The active match is revealed by opening the turn fold, superseded attempt or tool group that hides it, paging history in when it is older than the loaded window, then scrolled into view and tinted. Streamed content re-asks from the current match after a pause.
@rynfar rynfar changed the title feat(native): find in thread, banners, status line, watermark, media, fork and rewind feat(native): find in thread Nov 2, 2026
@rynfar
rynfar merged commit 4f7439d into native Nov 2, 2026
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.

1 participant