Commit Graph
15 Commits
Author SHA1 Message Date
Kelvin Amoaba 5dc197e5ec feat(browser): history controls: Chrome-style Escape, removable suggestions, history view (#31846) 2026-10-24 04:46:47 +00:00
Brennan Benson 62975d6bfe fix(sidebar): run previous and next worktree shortcuts from a text field (#28891)
* fix(sidebar): run previous and next worktree shortcuts from a text field

The worktree list swallowed every key while a text field was focused, so the bound shortcut did nothing in chat, markdown, and the code editor.

* fix(sidebar): keep the default worktree chord with text fields

Previous/next worktree now carries a text-field rule in its keybinding definition. In a text field the default Cmd/Ctrl+Shift+Up/Down keeps its select-to-start/end meaning, while a chord the user bound still switches worktrees from chat, markdown and the code editor. Option and AltGr chords that type a character stay with the field.

* fix(sidebar): let user-bound Option arrow chords leave text fields

On Mac only Option chords that type a character or dead key stay with a focused text field, so a bound Option+Down now switches worktrees from chat, markdown and the code editor.
2026-10-18 22:26:24 -07:00
Neil 47903077db fix(keybindings): match modifier chords pressed during IME composition by physical key (#28620)
With a Hangul syllable still composing, macOS reports Ctrl+2 as key 'Process', so
tab.selectByIndex (and every other chord) matched nothing and the press only
committed the syllable. A Cmd/Ctrl chord (or Alt off macOS, minus AltGr) is never
IME text, so fall back to the physical code for 'Process' the way '' and
'Unidentified' already do.

Fixes #28159
2026-10-14 00:55:31 -07:00
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
mmarabel 9207aef01d Add an optional shortcut to toggle child workspaces (#24165)
Adds a user-assignable shortcut for the existing child-workspace chip action. It stays unassigned by default on macOS, Linux and Windows. Final-source rendered checks cover Settings recording/reset, guards, scroll preservation and restart.

Fixes #24163

Continues mmarabel’s original contribution in this PR. Issue #24163 has no sibling implementation PR. Existing bot findings are fixed, withdrawn or addressed in the PR review.

Co-authored-by: mmarabel <166927047+mmarabel@users.noreply.github.com>
2026-10-03 23:15:41 -07:00
0f1bbceb57 fix(keybindings): record and match Option+digit shortcuts on macOS
Use the physical digit key for explicitly assigned Mac Option+digit shortcuts while retaining modifier checks.

Co-authored-by: marcuslannister <marcus@lannister.cc>
Co-authored-by: Neil <neil@stably.ai>
2026-10-03 00:50:56 -07:00
Neil 08ee7ba9ef fix(shortcuts): defer TUI editing chords in terminal-first mode (#24640)
Restack the original focused change onto current main, preserving every owned source and test blob and the merged CI contract and journal cleanup fixes.

Original-commit: f707cde14a
fix(shortcuts): defer TUI editing chords in terminal-first mode

Original-commit: 0c6348e49e
docs(shortcuts): describe deferred preview terminal chords

Original-commit: be62c1b6c6
Align worktree history shortcut metadata with terminal conflict policy

Restacked-from: be62c1b6c6
Restacked-onto: f7b1f9d8be
2026-10-02 22:06:09 -07:00
Kelvin Amoabaandfruit c0ac2b1fcc feat(browser): add a rebindable shortcut for Annotate page element (#23879)
Fixes #23470

Co-authored-by: fruit <200041037+guozi-lab@users.noreply.github.com>
2026-09-30 22:09:26 -07:00
Jinjing f5f537ef14 Revert "Support mouse Back/Forward buttons in shortcuts (#23287)" (#23350)
This reverts commit a86fae0889.
2026-09-26 22:58:01 -07:00
Neil a86fae0889 Support mouse Back/Forward buttons in shortcuts (#23287)
* feat: support mouse Back and Forward shortcut bindings

* fix: ignore duplicate mouse shortcut presses until release
2026-09-26 17:53:58 -07:00
Neil 0a5e73e3bb Leave Open Settings unbound by default (#23136) 2026-09-26 00:20:00 -07:00
Neil f03043544a perf(keybindings): stop recomputing shortcut labels on every render (#18145)
Shortcut labels were rebuilt from scratch in the render body of every
component that shows one, which kept parseKeybinding running ~120x/sec
in a fully idle app.

- Cache the label layer per overrides object (WeakMap), so a keybinding
  edit hands out a new object and therefore a fresh cache.
- Memoize parseKeybinding behind a bounded cache; binding strings come
  from a fixed definition set plus user overrides.
- Hoist the per-call token/label object literals in normalizeKeyToken
  and formatKeyToken to module constants.
2026-09-02 12:59:42 -07:00
Neil 8cc7634051 refactor: name modules for their domain instead of 'helpers'
Renames seven -helpers modules for the concept their functions operate on, and
splits three that were genuine grab-bags -- each had a clean cleavage along its
importers, which is the signal AGENTS.md describes for a file holding more than
one responsibility.

Leaves keybindings/definitions-core-1..4 alone: definitions.ts spreads them in
order, so their concatenation order is the command palette order and regrouping
them thematically would be a user-visible change. Records that reasoning in a
comment so it is not re-litigated.
2026-09-01 12:27:01 -07:00
Neil 08b8f271e6 fix(renderer): merge split runtime imports
(cherry picked from commit 90bf505afe)
2026-09-01 00:28:37 -07:00
Neil 41015f9393 refactor(renderer): split runtime and store modules
(cherry picked from commit 207bef0198)
2026-09-01 00:28:37 -07:00