Skip to content

feat(web): keyboard shortcuts for the machine, branch, and worktree pickers - #22

Merged
vkpdeveloper merged 3 commits into
feat/botsfrom
feat/picker-shortcuts
Nov 12, 2026
Merged

vkpdeveloper merged 3 commits into
feat/botsfrom
feat/picker-shortcuts

Conversation

@vkpdeveloper

@vkpdeveloper vkpdeveloper commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

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.

  • The machine chip and branch chip tooltips now show their shortcut, the way the model picker's does.
  • New composer.toggleWorktree command ("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).
  • Opening the branch and workspace menu from the keyboard (mod+shift+X, or Enter on its chip) now focuses Search refs, as mod+shift+G already 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.
  • User docs updated.
Action Command Default
Choose machine (existing) composer.host mod+shift+H
Choose branch (existing) composer.branch mod+shift+G
Choose workspace (existing) composer.workspace mod+shift+X
Toggle new worktree (new) composer.toggleWorktree mod+alt+X

mod+alt+X is 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 edit keybindings.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.
  • Typecheck for contracts, shared, and web passes. In vp run check:changed, format, lint, knip, typecheck (41 packages), and react compiler pass. Its test step has 5 failures that also fail on feat/bots without this change: work-log/presentation, ProviderUpdateLaunchNotification.logic, ServerEnvironment, AgentSessionScanner, and GitVcsDriverCore. There is also a missing local Playwright browser.
  • Browser panel against a dev server with a second paired environment:
    • New-thread draft: mod+shift+H opens Run on with the current machine focused. Arrow keys move, Escape closes, and focus returns to the composer.
    • mod+alt+X flips between current checkout and new worktree, and the Workspace menu radio follows. No stray character is typed.
    • mod+shift+G opens with Search refs focused. Typing filters, and Enter picks the base ref and closes the menu.
    • In New worktree mode and in Current checkout mode, mod+shift+X lands 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.
    • Started thread: both pickers open. The machine is locked, as with a mouse click, and mod+alt+X does nothing.
    • Tooltips read macmini ⇧⌘H and feat/picker-shortcuts / Local checkout ⇧⌘G. Settings > Keybindings lists all four.
    • At 390px wide there is no horizontal overflow, and the menu stays inside the viewport.
  • No screenshots: the Browser panel tab wasn't visible to the agent session, so captures timed out.

…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.
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M labels Nov 12, 2026
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.
@vkpdeveloper
vkpdeveloper merged commit db21d67 into feat/bots Nov 12, 2026
11 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant