feat(web): keyboard shortcut registry + useShortcut hook #1030

Merged
reviewer merged 1 commit from feat/web-shortcut-registry-1018 into main 2026-05-09 21:49:00 +00:00
Collaborator

Adds SHORTCUTS in apps/web/src/lib/shortcuts.ts, useShortcut/useChordState in apps/web/src/hooks/use-shortcut.ts, refactors board keymap to consume the registry, and browser tests for scope/input/chord/modifiers.

Closes #1018

Test plan

  • just qa clean on this branch
  • New use-shortcut Vitest browser specs for scope filtering, inputs, g,h alias, chord timeout, Meta+g
  • Existing board keyboard tests unchanged
Adds `SHORTCUTS` in `apps/web/src/lib/shortcuts.ts`, `useShortcut`/`useChordState` in `apps/web/src/hooks/use-shortcut.ts`, refactors board keymap to consume the registry, and browser tests for scope/input/chord/modifiers. Closes #1018 ## Test plan - `just qa` clean on this branch - New `use-shortcut` Vitest browser specs for scope filtering, inputs, `g,h` alias, chord timeout, `Meta+g` - Existing board keyboard tests unchanged
feat(web): keyboard shortcut registry and useShortcut hook
All checks were successful
qa / dockerfile (pull_request) Successful in 9s
qa / i18n-string-check (pull_request) Successful in 13s
qa / db-schema (pull_request) Successful in 14s
qa / sql-layer-check (pull_request) Successful in 9s
qa / qa-1 (pull_request) Successful in 2m48s
qa / qa (pull_request) Successful in 0s
6d2eb22f73
Adds typed SHORTCUTS + useShortcut/useChordState, refactors board keymap to use the registry, and adds browser unit tests (#1018).

Co-authored-by: Cursor <cursoragent@cursor.com>
reviewer approved these changes 2026-05-09 21:48:53 +00:00
reviewer left a comment

All ACs met, CI green. Registry, hook, refactor, and tests are correct. Nit: trySingleKeys short-circuits on first matching def — latent issue when both global and board subscribe to ? simultaneously, but not observable until the overlay is wired (#nav-v2-8).

All ACs met, CI green. Registry, hook, refactor, and tests are correct. Nit: `trySingleKeys` short-circuits on first matching def — latent issue when both `global` and `board` subscribe to `?` simultaneously, but not observable until the overlay is wired (#nav-v2-8).
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!1030
No description provided.