Repository navigation
Description
Problem
Codev's popup prompts use VS Code's native notification API, which is fundamentally mouse-only for anything beyond Enter/Esc. The clearest example: when a builder hits plan-approval, the popup offers Approve Gate and View Plan buttons — neither is reachable via Tab, arrow keys, or any keyboard navigation. The user must take their hand off the keyboard, find the mouse, and click. This affects keyboard-driven workflows, accessibility, and anyone running VS Code without a pointing device.
This isn't unique to plan-approval — the same pattern recurs in every Codev popup that carries action buttons: the swap-dev confirmation, builder-spawned "Open Terminal" toast, gate-blocked notifications, and others.
Root cause
vscode.window.showInformationMessage(msg, { modal: true }, ...buttons) (and the non-modal variants) explicitly only bind:
- Enter → first/primary button
- Esc → cancel / dismiss
Additional buttons are rendered but have no keyboard binding. This is a VS Code platform limitation we can't override by configuration — the only fix is to stop using the API for action prompts.
Current state
Audit results from 2026-05-21 identified these popup sites with action buttons that need replacing:
| File:line | Trigger | Buttons today |
|---|---|---|
commands/approve.ts:127 |
Plan/spec/dev approval prompt (modal) | Approve + optional View Plan |
commands/dev-shared.ts:110–113 |
Swap dev target confirmation (modal) | Yes / No |
builder-spawn-handler.ts:63 |
Builder spawned (non-modal toast) | Open Terminal |
notifications/gate-toast.ts:131 |
Gate blocked passive toast (non-modal) | [action-label], Approve |
Proposed behavior
Replace every popup that carries action buttons with vscode.window.showQuickPick(actions):
- Arrow keys to move between actions, type to filter, Enter to select, Esc to cancel.
- The most common action (e.g.
Approve Gatefor approval prompts,Open Terminalfor spawn-completion) is the first row so Enter is the fast-path. - A
Cancelrow is added explicitly (and Esc remains a synonym) so cancel is always one keystroke. - The QuickPick title carries the same context the modal used to (
Approve plan-approval for #773?).
Apply to all popups with any buttons — not just modals. Non-modal toasts with action buttons (spawn-completion, gate-blocked) also get the QuickPick treatment so the keyboard path is uniform across the extension.
Plain notifications without buttons (success status, info-only toasts) stay as setStatusBarMessage / showInformationMessage — there's nothing to navigate.
Adopt a shared helper (e.g. actionPick(title: string, actions: { label, detail?, run }[])) so each call site is a one-liner and the keyboard-first semantics stay consistent.
Acceptance criteria
- Shared
actionPick(...)helper exists inpackages/vscode/src/notifications/(or similar) returning the selected action'srunorundefinedon cancel. -
commands/approve.ts:127usesactionPick— Tab/arrow keys navigate; Enter approves; Esc cancels;View Planis selectable via keyboard. -
commands/dev-shared.ts:110–113usesactionPick— same keyboard guarantees. -
builder-spawn-handler.ts:63usesactionPick— the spawn-completion toast becomes a QuickPick when the user has focus available, or itsOpen Terminalaction becomes accessible through some keyboard surface. -
notifications/gate-toast.ts:131usesactionPickfor its action buttons. - Every replaced popup has explicit
Cancelin the row list, and Esc is honored as cancel. - No regression: prompts that the user accepts with Enter still complete in one keystroke.
- Plain info / success / status-bar messages with no buttons are untouched.
Out of scope
- Adding global keybindings to skip popups entirely (separate improvement; can be a follow-up).
- Webview-based dialogs (intentionally rejected — QuickPick is the right tool here).
- Restructuring how confirmations are decided (only the prompt UI changes; the decision-to-prompt logic stays).
- Internationalization / localization of the QuickPick text.
Related
- vscode: notification hygiene refactor — centralize connection guard, demote success toasts, add Output channel #794 — notification hygiene refactor. This issue is the interaction counterpart: vscode: notification hygiene refactor — centralize connection guard, demote success toasts, add Output channel #794 demotes noisy success toasts, this one makes the remaining action prompts keyboard-accessible.
Activity
amrmelsayed commentedon Aug 14, 2026
The Stream Deck workflow raises this from an accessibility improvement to a blocking usability defect, and it is worth restating the priority in those terms.
Reported by the owner: pressing the deck's Approve Gate key surfaces this modal, and completing the approval then requires reaching for a mouse — which defeats the entire point of a hardware controller. The deck exists so review and approval happen without leaving the keyboard or the device; a mouse trip in the middle of that flow is not a rough edge, it is the workflow breaking.
Two mechanics make it worse than the issue text above suggests:
On the two gates that matter most, Enter does not approve.
approve.ts:125builds the button array as[sideAction.label, 'Approve'], andplan-approval/dev-approvalboth have side actions (View Plan, Run Dev). Since the platform binds Enter to the first button only, Enter fires the side action, and Approve is reachable by mouse alone. Gates without a side action (spec-approval,pr) do approve on Enter. So the keyboard path is worst on exactly the gates a reviewer hits most.The deck cannot bypass the modal, by design.
command-relay.ts:95-101deliberately truncates the argument list for this one verb:That is correct and should stay: the wire cannot attest that a verb came from a human finger rather than from a local process holding the key, and "only a human approves a gate" is a core invariant. The modal is the step that proves a human is present.
So the fix is not to let the deck skip confirmation — it is to make the confirmation completable from the keyboard, which is exactly what this issue proposes. With
actionPick, the flow becomes: press the deck key, a QuickPick appears focused in the trusted UI, press Enter. No mouse, security model untouched, andView Plan/Run Devbecome reachable rather than accidentally-primary.Honest limit of that fix: it makes the flow keyboard-only, not device-only. The reviewer's hand still moves to the keyboard for one keystroke. Going fully hands-free would mean confirming on the deck itself (press once to arm, press again to approve), which moves the human-confirmation step onto the wire — precisely what the security comment above forbids, and not something a distinct verb can rescue, since any client able to send one verb can send the other. That trade is a policy decision for the gate owner, not an implementation detail, and it should be settled deliberately rather than arrived at by accident. This issue should proceed on the keyboard-first design regardless; it is strictly better than today under either policy.