Repository navigation
feat(web): keyboard shortcuts for the machine, branch, and worktree pickers - #22
Merged
Merged
Conversation
…ltips The machine (mod+shift+H) and branch (mod+shift+G) pickers already had rebindable shortcuts, but nothing in the composer said so. Their chip tooltips now show the current binding, as the model picker does.
…ree with mod+alt+X Adds the rebindable composer.toggleWorktree command (Toggle new worktree), so the Workspace choice no longer needs the menu. It does nothing where the Workspace radios are disabled: a started thread or a forced worktree.
Opening the branch and workspace menu with mod+shift+X (or Enter on its chip) left focus on the Workspace radio, where typing and arrow keys did nothing. A click with no pointer now focuses Search refs, as mod+shift+G already did, so typing filters and ArrowDown moves through the refs. Mouse opening is unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changing the machine, the branch, or current checkout vs new worktree in the composer meant reaching for the mouse.
The machine and branch pickers already had rebindable shortcuts, but nothing in the UI showed them, and the Workspace choice could only be changed through its menu.
composer.toggleWorktreecommand ("Toggle new worktree") switches a new thread between current checkout and new worktree without opening the menu. It does nothing where the Workspace radios are disabled (a started thread, or a forced worktree).mod+shift+X, or Enter on its chip) now focuses Search refs, asmod+shift+Galready did. Typing filters right away and ArrowDown moves through the refs. Before, focus sat on the Workspace radio, where typing and arrow keys did nothing. Mouse opening is unchanged.composer.hostmod+shift+Hcomposer.branchmod+shift+Gcomposer.workspacemod+shift+Xcomposer.toggleWorktreemod+alt+Xmod+alt+Xis unused by every default on macOS, Windows, and Linux, and it isn't a browser or Electron shortcut. To rebind any of these, use Settings > Keybindings or editkeybindings.json.Mobile has no keyboard shortcut system, so it is unchanged. Desktop wraps web, so it gets this too.
Validation
apps/web/src/keybindings.test.ts: new case resolving all four default chords outside the terminal (and not inside it) on MacIntel, Win32, and Linux. The toggle row fails without the new default.vp run check:changed, format, lint, knip, typecheck (41 packages), and react compiler pass. Its test step has 5 failures that also fail onfeat/botswithout this change:work-log/presentation,ProviderUpdateLaunchNotification.logic,ServerEnvironment,AgentSessionScanner, andGitVcsDriverCore. There is also a missing local Playwright browser.mod+shift+Hopens Run on with the current machine focused. Arrow keys move, Escape closes, and focus returns to the composer.mod+alt+Xflips between current checkout and new worktree, and the Workspace menu radio follows. No stray character is typed.mod+shift+Gopens with Search refs focused. Typing filters, and Enter picks the base ref and closes the menu.mod+shift+Xlands in Search refs. In New worktree mode, two ArrowDowns move the highlight two refs down, and Enter sets that ref as the base ("From feat/bots (remote)"). A mouse click still leaves focus on the chip.mod+alt+Xdoes nothing.macmini ⇧⌘Handfeat/picker-shortcuts / Local checkout ⇧⌘G. Settings > Keybindings lists all four.