Repository navigation
feat(app): find text inside a thread conversation (Cmd+F) - #317
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports upstream's in-thread find (
chat.find,Cmd+F) to tern so users can search across the open thread's conversation, step through matches, highlight every visible match with the active one emphasized, and jump straight to the matched message when opening a thread from a sidebar message-search hit.What it searches
tern_conversation::find) rather than only drawn DOM/list rows, sincetern_ui::scrollervirtualizes off-screen rows.threadFindTextandTHREAD_FIND_BLOCK_TAGS: matches do not cross block boundaries (paragraphs, headings, list items, table cells, lines of plain user text, or code blocks), inline formatting does not split phrases, links search their visible labels only, and images, chips, work-log steps, notices, and approvals are excluded.foldThreadSearchCasefolding: case-insensitive,ς->σ, curly apostrophes‘/’->', and Turkishİwithout shifting byte offsets.Older history pages
N/…(orSearching…/찾는 중…before any match is found) while keeping the selected match pinned across prepended pages.Highlights, scrolling, and focus
crates/ui/themes/tern.json(find_match,find_match_text,find_match_active,find_match_active_text) match upstream's light/dark search highlight palette (#ffde8b/#8c6c1f, active#eea52b).TextViewStaterange highlights (tern_conversation_view::find_marks) without shifting layout; plain user messages combine mention and find highlights with active text contrast.ScrollerState::scroll_to_item_below, clear of the 280x36px find bar), and reveals the active range inside long Markdown rows and code blocks.Cmd+Fis bound tochat.find(FindInThread), whileTerminalandFilesPanelkeepCmd+Ffor themselves; with no thread open (or on settings/draft/archive),Cmd+Ffalls back to sidebar thread search (thread.find).Escapecloses find from the find bar, composer, or conversation without stopping a running turn.Row::Found) opens find withquery_for_snippetand scrolls to the matchedmessage_idonce loaded.docs/ui.md.Verification
cargo fmt --all --check./scripts/check-colors.sh./scripts/check-layers.pycargo clippy --workspace --all-targets --locked -- -D warningscargo test --workspace --locked(scratchHOME,TERN_KEYCHAIN=off)