Skip to content

feat(native): complete SB-SEARCH parity and find-in-thread handoff - #352

Merged
rynfar merged 3 commits into
nativefrom
nw/242-sb-search-done
Nov 13, 2026
Merged

rynfar merged 3 commits into
nativefrom
nw/242-sb-search-done

Conversation

@rynfar

@rynfar rynfar commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Ref #242, #329

Problem

SB-SEARCH remained partial in apps/native/parity/LEDGER.md because non-active remote environments lacked matching PR badges and stack/multi-PR parity, activating a message match did not clear/anchor multi-select or hand off find-in-thread, and SidebarPane search results lacked settled_query / pending lifetime tracking, variable-height rows, relative timestamps, favicons, regenerating/settled hover styling, pointer highlight sync, Phase/ServerConfig refresh, and You: / Agent: token-highlighted excerpts.

Summary of Changes

  • PR/stack search badges (crates/core/src/search/thread.rs):
    • Added pull_request_matches_search_query, SearchPrBadge, and matching_search_pr_badge delegating directly to t3_core::pull_requests::thread_badge (resolve_thread_pull_request_badge, resolve_thread_current_pull_request_link, linked_snapshot_status, pr_status_indicator, resolve_badge_presentation) so single PRs, non-stack +N multi-PRs, pending snapshots, and native/derived PR stacks (Icon::Layers) match web ThreadSearchPullRequestNumber.
  • Find-in-thread handoff & selection lifecycle (crates/core/src/timeline/{find,mod}.rs, crates/core/src/search/mod.rs, crates/app/src/{app_state,thread_view,thread_view/find}.rs):
    • Added PendingThreadFind, slice_char_range, message_phrase_range, and find_for_message_match (selecting quoted phrase or longest whole-word query token while preserving snippet casing and FindStart at messageId).
    • Added AppEvent::ThreadFind, AppState::{queue_thread_find,take_pending_thread_find}, and clearing stale pending_thread_find on start_draft, unrelated select_thread, and clear_selection.
    • Switched ThreadView::new_for to cx.subscribe_in calling consume_pending_find, factored ensure_find_ui, and added open_find_on_query.
  • Search lifetime, hover/highlight parity & Phase/ServerConfig refresh (crates/app/src/sidebar/{search,mod}.rs):
    • Added SearchState::{is_pending,settled_query}, reset/scroll tracking on gpui::list, "Searching thread messages…" / "No threads found" empty states, ProjectVisual favicons (.group("sidebar-row") receding on settled inactive/unhighlighted rows and un-receding on hover), PrGlyph/PrTone badges (Icon::Layers for stacks) with settled secondary_label -> state color .group_hover, compact_relative_label, settled/regenerating title weights & hover reveal, .on_mouse_move highlight sync + active/highlighted/hover surface + light-mode inset ring precedence, "You:" / "Agent:" StyledText token highlights (UTF-8 byte-mapped from find_search_token_ranges using settled_query), activate_search_result selection clear + anchor reset + queue_thread_find, and SidebarPane AppEvent::Phase | AppEvent::ServerConfig active-search refresh.
  • Ledger (apps/native/parity/LEDGER.md):
    • Marked SB-SEARCH as done alongside SB-ROW and SB-SELECT.

Offscreen evidence

Draft release: https://github.com/rynfar/t3code/releases/tag/untagged-3d202ab7e4634fd96060 (native-parity-evidence-352)

  • Mixed search results — active open 22889 PR badge + timestamp, highlighted regenerating title + Icon::Layers 2 stack badge, settled receding row + settled merged 22888 PR badge, and You: / Agent: token-highlighted excerpts (Dark / Light):
    dark-results
    light-results
  • Pending (Searching thread messages…) & settled empty (No threads found) states (Dark):
    dark-pending
    dark-empty

Verification (rebased HEAD a811093299549c8e21abb3c9723e0af2f1e57e23 on d6aaa46079)

  • cargo clean -p t3-core -p t3-client -p t3-native + clean build/test gate:
    • cargo test -p t3-core -p t3-client: t3-client 105 passed, t3-core 1291 lib + 8 conformance passed, 0 failed
    • cargo test -p t3-core --test conformance: 8 passed, 0 failed
    • cargo test -p t3-client --features test-support: 113 passed, 0 failed
    • cargo test -p t3-native --features snapshot --bin t3-native sidebar:: -- --test-threads=1: 33 passed, 0 failed
    • cargo test -p t3-native --features snapshot --bin t3-native thread_view:: -- --test-threads=1: 7 passed, 0 failed
    • cargo clippy --workspace --all-targets -- -D warnings: passed (0 warnings)
    • cargo build -p t3-native & cargo build -p t3-native --features snapshot: passed
  • node apps/native/scripts/gen-theme.ts --check, node apps/native/conformance/generate.ts --check, node --test apps/native/parity/sync.test.ts (42/42 passed): passed
  • ./node_modules/.bin/vp fmt --check apps/native/parity/LEDGER.md & ./node_modules/.bin/vp run check:changed fork/native: passed (format, typecheck 40/40 packages, test 1 file / 2 tests)

Model: GPT-5.4 / Claude Sonnet (Antigravity)

Completes whole-row SB-SEARCH parity in apps/native: preserves pull_requests on SidebarThread so non-active remote environments match PR queries and render matching PR badges, tracks settled_query vs pending search lifetime, renders variable-height gpui::list search rows with favicons, regenerating/settled styling, relative timestamps, and You:/Agent: StyledText token highlights, and hands off find-in-thread on result activation while clearing multi-select and updating selection anchors.

Model: GPT-5.4 / Claude Sonnet / Antigravity
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