Skip to content

feat: centralized shortcut registry + project detail tab shortcuts#96

Closed
NagariaHussain wants to merge 3 commits into
developfrom
feat/shortcut-registry-and-tab-shortcuts
Closed

feat: centralized shortcut registry + project detail tab shortcuts#96
NagariaHussain wants to merge 3 commits into
developfrom
feat/shortcut-registry-and-tab-shortcuts

Conversation

@NagariaHussain

Copy link
Copy Markdown
Contributor

Summary

  • Adds shortcut-registry.ts as a single source of truth for all keyboard shortcut metadata (keys, description, group)
  • Help dialog (?) now auto-updates from the registry — no more hardcoded duplicate list
  • Adds useMetaHotkey hook for Cmd/Ctrl combos; useCommandPalette now uses it instead of inline useEffect
  • Adds 5 new tab-switching shortcuts on the project detail page: O (Overview), M (Milestones), U (Updates), R (Requests), A (Activity) — disabled when dialogs/sheets are open

Test plan

  • Press ? → help dialog shows all shortcuts from registry (Global, Navigation, Project Detail, Task Detail groups)
  • Press Cmd+K → command palette opens
  • On project detail page: O/M/U/R/A switch tabs correctly
  • T still creates a task, Shift+T still celebrates, G+D/P/T/M nav still works
  • Tab shortcuts are disabled when task sheet or create dialogs are open
  • yarn build succeeds

🤖 Generated with Claude Code

NagariaHussain and others added 2 commits February 26, 2026 07:50
Single source of truth for all keyboard shortcut metadata so the help
dialog auto-updates when new shortcuts are added. Also adds O/M/U/R/A
hotkeys on the project detail page for quick tab switching.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Changes the "Add assignee" shortcut from A to S to avoid conflict with
the new Activity tab shortcut. Adds M→S chord in the task detail sheet
to quickly assign the task to yourself.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@NagariaHussain NagariaHussain changed the title centralized shortcut registry + project detail tab shortcuts feat: centralized shortcut registry + project detail tab shortcuts Feb 26, 2026
…onflict

- Focus scrollable container instead of title input when task sheet opens
  so S and M→S shortcuts work immediately
- Add preventDefault on M chord leader to prevent milestone popover opening
- Add shift:false to project page T hotkey so Shift+T only celebrates

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@NagariaHussain

Copy link
Copy Markdown
Contributor Author

Implemented in 136a61a. All items from the test plan verified:

  • ? help dialog auto-populates from shortcut-registry.ts
  • Cmd+K command palette works via new useMetaHotkey hook
  • O/M/U/R/A tab shortcuts work on project detail page
  • T still creates tasks, Shift+T celebrates, G+D/P/T/M nav works
  • Tab shortcuts disabled when task sheet or create dialogs are open
  • yarn build succeeds

NagariaHussain added a commit that referenced this pull request Feb 26, 2026
…96

Added shortcut-registry.ts as a single source of truth for all keyboard
shortcut metadata. Help dialog (?) now auto-populates from the registry
instead of a hardcoded duplicate list. Added useMetaHotkey hook for
Cmd/Ctrl combos; useCommandPalette now uses it instead of inline
useEffect. Added 5 new tab-switching shortcuts on the project detail
page: O (Overview), M (Milestones), U (Updates), R (Requests),
A (Activity) — disabled when dialogs/sheets are open.

Key decisions:
- Registry is a flat array with group field; getShortcutsByGroup()
  helper preserves insertion order for the help dialog
- Tab shortcuts use the enabled option on useHotkey to disable when
  any dialog/sheet/editing state is active
- useMetaHotkey keeps Cmd+K handling clean without inline useEffect

Files: shortcut-registry.ts, use-hotkey.ts, CommandPalette.tsx,
ShortcutHelpDialog.tsx, ProjectDetailPage.tsx
Closes #96

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant