Files
orca/src/shared/keybindings
Brennan Benson ebb192e3e5 Native chat: Cmd/Ctrl+F finds in the chat (#26517)
* Native chat: Cmd/Ctrl+F opens find in window

Mod+F inside a focused native chat opens a find bar at the chat's top-right
corner. The bar is a separate sandboxed view stacked over the main window, so
its own input is never a match; main runs the window's find-in-page and relays
the match count back. Enter/Shift+Enter step, Escape closes and clears.

Also stops the terminal search bar from opening over a chat that covers a
terminal pane.

* Native chat: Cmd/Ctrl+F finds inside the chat transcript

Replaces the window-level find panel with a find bar inside the chat.
The panel searched the whole window, pasted into the composer, outlived
its chat, and let Escape interrupt the agent.

- Searches only the transcript text the reader can see and paints matches
  with CSS highlights, reusing the markdown preview's search, now shared
  as lib/dom-text-search-highlights.ts.
- Re-searches as the transcript streams or scrolls, keeping the current
  match; a step leaves "follow latest" like a reader scroll.
- Escape closes the bar first and returns focus; paste and editing keys
  stay in the bar's input.
- Terminal guard yields any chat.find chord inside a chat cover; a PDF
  no longer takes Mod+F from another surface.

* Native chat find: round-2 fixes

- Escape: the chat root's React capture handler closes the bar before the
  composer's own capture handler can interrupt the turn.
- One visibility rule for picking and revealing a match: typing no longer
  scrolls to a match that is already on screen, and the bar's real rect,
  not a full-width band, decides what it covers.
- Reveal scrolls nested scroll boxes (code lines, tool output, thinking);
  text cut off by a box that cannot scroll is not counted.
- PDF find opens from its own tab and the file explorer again, but not
  from another group, a chat, or a text field.
- Prompt cards no longer take focus from the find input; clicks on the
  bar keep typing in it; buttons keep their own Enter.
- A match whose row scrolled away restarts from the first visible match.
- Streamed text growth re-searches every 120 ms instead of every frame,
  and searches reuse their Range objects.
- Hover-only row chrome is marked and skipped instead of read by opacity.
- Chat find stays off in the web client, where the browser's find keeps
  Mod+F.
- The text matcher moves to lib/text-match-ranges.ts with neutral names.

* Native chat find: round-3 fixes

- Text that held a match re-searches before the next paint: React
  rewrites a growing text node whole, collapsing its ranges, so the
  streaming paragraph's highlights no longer blink. Other text growth
  keeps the 120 ms re-search.
- A disclosure's height animation ending re-searches, so an output
  opened while find is open is counted.
- A prompt card that arrived while the find bar held focus gets it when
  find closes.
- A reveal that cannot scroll no longer stops following the latest.
- PDF find follows the panel's chord owner (its tab is the active tab
  of the focused group, the rule the browser pane uses), so it no longer
  takes Mod+F from a chat, terminal or browser in another split, and it
  opens again after clicking its own editor header.

* Native chat find: PDF find answers only its own window surface

The floating workspace panel keeps its own focused group, so a PDF that
owns its panel's chords no longer takes Mod+F from a chat in the other
surface (main window vs floating panel), matching how the browser pane
scopes a floating workspace's chords.
2026-10-08 19:51:44 -07:00
..
…
…