Commit Graph
8 Commits
Author SHA1 Message Date
Neil 3d812eb9bf fix(keybindings): show ⇧ for Shift in Windows/Linux shortcut labels (#35754)
* fix(keybindings): show the ⇧ glyph for Shift on Windows and Linux

Spelled-out Shift made non-mac shortcut labels long (Ctrl+Shift+Backspace).

* test(menu): expect the ⇧ glyph in non-mac app menu hints; align double-tap hint
2026-10-29 00:08:48 -07:00
Samuel VilaandBrennan Benson 161927f562 fix(native-chat): make the Chat UI ⇄ terminal shortcut a remappable keybinding (#31679)
* fix(native-chat): make the chat view toggle a remappable keybinding

The terminal and Chat UI toggle was hardcoded to Mod+Shift+J, so users
could not rebind or disable it, Settings did not list it, and it
overrode user bindings on that chord. Declare it as
terminal.toggleNativeChat in the keybinding registry, match it through
the user's keybindings, and render its menu labels from the registry.

* fix(keybindings): align native chat toggle admission and execution

* fix(keybindings): preserve runtime input and defer closed menu hints

* test(keybindings): use typed alias read instrumentation

* Fix keybinding dependency direction and physical modifier inputs

* Preserve typed input facts in floating shortcut arbitration

* Clarify native chat shortcut precedence on Windows and Linux

* Simplify native chat shortcut resolution and nominal labels

---------

Co-authored-by: Brennan Benson <79079362+brennanb2025@users.noreply.github.com>
2026-10-26 13:13:34 -07:00
395aa755b4 fix(keybindings): report conflicts with shortcuts the main process consumes first (#10780)
* fix(keybindings): report conflicts between terminal shortcuts and chords that fire in terminals

Actions that reach a focused terminal now share a conflict bucket, and the
Shortcuts pane judges the bindings as written in the file instead of the
map the loader already stripped.

* fix(keybindings): flag only the ignored binding and say it was ignored

The other claimant keeps its own default and never stopped working, so a
warning on its row blamed an untouched action. Adds the e2e regression that
seeds a conflicting file inside the isolated E2E home.

* test(keybindings): capture the shortcuts pane at each stage of the conflict report

* test(keybindings): assert the untouched action carries no warning

Visibility alone would still pass if a regression warned on both rows.

* fix(keybindings): narrow the ignored-binding guard and tighten its negative test

Review follow-ups:

- Only warn when the file asked for a binding and the loader took it away.
  The guard now also requires the action to be absent from the active map,
  so an override that survived is never labelled "was ignored".
- The negative case used view.tasks, which has no default binding, so the
  conflict assertion passed without exercising the terminal bucket at all.
  It now uses worktree.quickOpen and asserts the definition exists, is not
  terminal-reachable, and has a non-empty default list.

* fix(keybindings): compare main-process shortcuts against every scope

- List the actions resolveWindowShortcutAction consumes in main and put them in every scope's conflict bucket, so a binding elsewhere on the same chord is reported instead of silently losing it.
- Browser bindings are compared only against the actions a focused guest forwards ahead of browser chords.
- Dictation stays out, since main lets its chord through while voice is off (the default).
- The two digit ranges may still share a modifier.
- Drop the allowInTerminal terminal-bucket rule.
- Explain overrides the loader drops on a later pass.
- Pin the list to the resolver and the guest order with tests.

* fix: report main-intercepted shortcuts in Settings without dropping saved overrides

Main-process interception now only feeds the Settings conflict report.
The loader, write path and web normalization keep main's scope-only check,
so existing keybindings.json overrides load exactly as before.

---------

Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
Co-authored-by: Neil <neil@stably.ai>
2026-10-24 00:34:17 -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 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 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