Skip to content

feat(web only): find in chat with mod+f - #9638

Closed
imabdulazeez wants to merge 3 commits into
pingdotgg:mainfrom
imabdulazeez:feat/find-in-chat
Closed

imabdulazeez wants to merge 3 commits into
pingdotgg:mainfrom
imabdulazeez:feat/find-in-chat

Conversation

@imabdulazeez

@imabdulazeez imabdulazeez commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

What Changed

Adds a find bar over the open thread.

  • New chat.find keybinding command, default mod+f with when: "!terminalFocus", plus a "Find in chat" command palette action.
  • Matches are counted from the timeline's row model, so messages that the virtualized list has not mounted are still found.
  • Matches in mounted rows are painted with the CSS Custom Highlight API. No markdown is rewritten and no DOM nodes are wrapped.
  • Enter and Shift+Enter step through matches and scroll each one into view. Esc closes.
  • Aa and ab toggles for match case and whole word. One shared pattern feeds both the counter and the highlighter, so counts and painted ranges always agree.
  • Selected text becomes the query when the bar opens, as in browser find.
  • The pull requests page now resolves the same chat.find command for its list search instead of matching Mod+F by hand.

Composed from the shared UI primitives: InputGroup, InputGroupAddon, InputGroupInput, and InputGroupText for the field, Button (ghost-muted, icon-xs) for the controls, Toggle (ghost, xs) for the options, and the shared keybinding registry via resolveShortcutCommand for the shortcut. No new surfaces or variants are introduced.

Supersedes #5562 with a smaller footprint, and picks up where #4599 left off. Resolves the request in discussion #6709 (formerly #1486).

Why

Long threads have no way to search the conversation. The timeline is virtualized, so the browser's native find only sees mounted rows, and the desktop shell binds no find-in-page at all. Users asked for Codex-style Cmd+F in #1486 and have kept +1ing it since.

Searching the row model rather than the DOM is what makes off-screen matches work. Painting with the Highlight API avoids the code-block corruption that earlier attempts hit when they injected markup into markdown.

Relation to orchestration V2 (#2829)

Earlier find PRs (#3539, #4599, #3779) were closed ahead of the orchestration V2 rewrite. This PR is web-only: it touches no orchestration, adapter, or provider code, and its single server change is one assertion in keybindings.test.ts. Replaying it on the current #2829 head applies cleanly apart from two adjacent-line conflicts in CommandPalette.tsx and keybindings.test.ts, so it should survive that merge with a trivial rebase.

UI Changes

image
Screen.Recording.2026-09-04.at.3.10.15.PM.mov

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Made with Claude Fable 5.1 in Claude Code.

Note

Add chat.find command bound to mod+f for web chat search

  • Registers chat.find in the static keybinding registry and maps it to mod+f (excluding terminal focus) in keybindings.ts.
  • Adds the ChatFindBar component and search logic in ChatFindBar.logic.ts to find, count, and navigate literal, case-sensitive, and whole-word matches across message rows.
  • Renders matches using the CSS Custom Highlight API in chatFindHighlight.ts, and prefills the query from the current browser text selection when it is ≤200 characters.
  • Adds a "Find in chat" action to the command palette and updates PullRequestsColumn to open its list search via the resolved chat.find shortcut rather than a hard-coded modifier check.
  • Behavioral Change: mod+f outside terminal focus now opens the chat find bar instead of being unhandled in web chat; the pull requests page honors the configured chat.find binding.

Macroscope summarized 7e2338a.

Long threads had no way to search the conversation: the timeline is
virtualized, so the browser's native find only sees mounted rows, and the
desktop shell binds no find-in-page at all.

Add a `chat.find` keybinding command (default `mod+f` outside terminal
focus) and a "Find in chat" command palette action that open a find bar over
the active thread. Matches are counted from the timeline's message rows so
off-screen messages are included, highlighted in mounted rows through the CSS
Custom Highlight API, and stepped with Enter / Shift+Enter, scrolling each
match into view. The pull requests page now resolves the same command for its
list search instead of matching Mod+F by hand.

Made with Claude Fable 5.1 in Claude Code.
@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XL 500-999 changed lines (additions + deletions). labels Sep 4, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR adds a substantial find-in-chat workflow across the timeline, command palette, keybinding system, highlighting layer, and pull-request search behavior. It also changes the product default keybindings by assigning mod+f, so the scope and default-behavior change warrant human review.

Notes:

  • Macroscope's correctness review did not run, so approvability was decided on eligibility alone.

You can add or adjust custom eligibility rules. Learn more.

@juliusmarminge

Copy link
Copy Markdown
Member

Closing as part of the open-PR backlog sweep (wave 2).

Reason: Superseded by newer fuller find-in-thread #10439
Related: #10439

Reopen if this is still wanted and you’re willing to rebase onto current main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants