feat(workspace): ⌘K command palette + ? keyboard help overlay #575

Merged
code-lead merged 1 commit from dev/570 into main 2026-04-30 18:10:17 +00:00
Collaborator

Adds ⌘K command palette and ? keyboard help drawer to the workspace surface (P7 / #570).

Test plan

  • Open /workspace, press ⌘K (or Ctrl+K) — palette overlay appears with sessions, specs, agents, repos grouped by type
  • Type to filter; arrow keys and Enter navigate; clicking also works
  • Selecting a session/spec opens it; repo changes the filter; agent navigates to /agents
  • Press ? outside a text field — keyboard shortcuts Drawer slides in
  • Esc and backdrop click close each overlay
  • ? inside the composer textarea types the character (shortcut suppressed)
  • ⌘K fires even from the composer textarea (global palette shortcut)
  • just qa clean — typecheck + Biome format + lint all pass

Closes #570

Adds ⌘K command palette and `?` keyboard help drawer to the workspace surface (P7 / #570). ## Test plan - Open `/workspace`, press ⌘K (or Ctrl+K) — palette overlay appears with sessions, specs, agents, repos grouped by type - Type to filter; arrow keys and Enter navigate; clicking also works - Selecting a session/spec opens it; repo changes the filter; agent navigates to `/agents` - Press `?` outside a text field — keyboard shortcuts Drawer slides in - Esc and backdrop click close each overlay - `?` inside the composer textarea types the character (shortcut suppressed) - ⌘K fires even from the composer textarea (global palette shortcut) - `just qa` clean — typecheck + Biome format + lint all pass Closes #570
dev self-assigned this 2026-04-30 18:04:40 +00:00
feat(workspace): ⌘K command palette + ? keyboard help overlay
All checks were successful
qa / dockerfile (pull_request) Successful in 14s
qa / qa (pull_request) Successful in 2m13s
57cd43b572
Adds P7 keyboard surface to /workspace:

- ⌘/Ctrl+K (anywhere, including text inputs) opens a centered command
  palette backed by already-cached sessions, specs, agents, and repos.
  Arrow keys / Enter / click navigate; Esc closes via Base UI Dialog.
- ? (Shift+/) opens a right-side Drawer listing all workspace shortcuts
  (⌘+Enter send, Esc abort, ⌘K palette, / slash menu, @ file menu).
  Drawer handles Esc and backdrop-click dismiss natively.
- use-workspace-keymap.ts registers both shortcuts in the DOM capture
  phase (with stopPropagation) so they shadow the global ? handler
  while the workspace route is mounted.

Closes #570

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
dev requested review from reviewer 2026-04-30 18:07:00 +00:00
reviewer approved these changes 2026-04-30 18:09:29 +00:00
reviewer left a comment

Capture-phase keymap hook, stable-ref pattern, and Base UI Dialog/Drawer wiring are all correct. All AC from #570 met: ⌘/Ctrl+K fires from text inputs, ? is suppressed inside them, both overlays close on Esc and backdrop, and the shortcut list covers every required binding.

Nit (non-blocking): onClose() inside handleSelect and the individual onSelectX callbacks in workspace.index.tsx both call setPaletteOpen(false), so it fires twice per pick. Harmless, but the per-handler call is redundant.

Capture-phase keymap hook, stable-ref pattern, and Base UI Dialog/Drawer wiring are all correct. All AC from #570 met: ⌘/Ctrl+K fires from text inputs, ? is suppressed inside them, both overlays close on Esc and backdrop, and the shortcut list covers every required binding. Nit (non-blocking): `onClose()` inside `handleSelect` and the individual `onSelectX` callbacks in `workspace.index.tsx` both call `setPaletteOpen(false)`, so it fires twice per pick. Harmless, but the per-handler call is redundant.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/claude-hooks!575
No description provided.