Workspace's context menu shows keyboard shortcuts (Ctrl+A, Ctrl+D, Ctrl+G, Ctrl+Shift+G) but the workspace has none — clicking shows the hint, the keys do nothing #176

Closed
opened 2026-10-03 17:37:51 +00:00 by Mark · 1 comment
Owner

Finding

src/components/workspace/ContextMenu.tsx:73-94 lists 7 context menu items with keyboard shortcut hints:

  • Select All — Ctrl+A
  • Duplicate — Ctrl+D
  • Delete — Del
  • Group — Ctrl+G
  • Ungroup — Ctrl+Shift+G
  • Bring to Front — (no shortcut shown)
  • Send to Back — (no shortcut shown)

The workspace has no global keyboard shortcut handler (per #156, still open). A user sees the shortcut hint next to the menu item, presses the key, nothing happens. The hint is a lie.

Verified: grep -rn 'addEventListener.*keydown\|useKeyboardShortcuts' src/components/workspace/ returns 0 matches for the global workspace (only the BottomThreadBar's AlternativesPopover Escape handler and the AppHeader's filename-edit Enter/Escape handler are wired, neither of which is a global shortcut).

The Editor has the shortcuts (per useKeyboardShortcuts.ts); the Workspace doesn't.

Where

  • Context menu hints: src/components/workspace/ContextMenu.tsx:73-94
  • No workspace shortcut hook: anywhere in src/components/workspace/

Suggested fix shape

Two options:

  1. Remove the shortcut hints from the context menu. The hints promise functionality that doesn't exist. Drop the shortcut: field for workspace menu items until the shortcuts are implemented.

  2. Implement the shortcuts. Add a useWorkspaceShortcuts hook that registers Ctrl+A, Ctrl+D, Del, Ctrl+G, Ctrl+Shift+G, Ctrl+Shift+], Ctrl+Shift+[ against the workspace's existing handleSelectAll, handleDelete, handleDuplicate, handleGroup, handleUngroup, handleBringToFront, handleSendToBack callbacks. The pattern is the same as the Editor's useKeyboardShortcuts.ts — copy the shape.

Option 2 is the right product move. The Editor already has the model. The Workspace is the bulk-of-time surface; users will expect power-user shortcuts.

Severity

Medium. The hint in the UI is a UI lie. Power users will press the keys and find nothing.

Discovered by

Gap analysis (2026-10-02) of context menu affordances.

  • #156 (open) — Home page advertises keyboard shortcuts but Workspace has zero. This is the same gap from a different angle.
## Finding `src/components/workspace/ContextMenu.tsx:73-94` lists 7 context menu items with keyboard shortcut hints: - **Select All** — `Ctrl+A` - **Duplicate** — `Ctrl+D` - **Delete** — `Del` - **Group** — `Ctrl+G` - **Ungroup** — `Ctrl+Shift+G` - **Bring to Front** — (no shortcut shown) - **Send to Back** — (no shortcut shown) The workspace has **no global keyboard shortcut handler** (per #156, still open). A user sees the shortcut hint next to the menu item, presses the key, nothing happens. The hint is a lie. Verified: `grep -rn 'addEventListener.*keydown\|useKeyboardShortcuts' src/components/workspace/` returns 0 matches for the global workspace (only the BottomThreadBar's AlternativesPopover Escape handler and the AppHeader's filename-edit Enter/Escape handler are wired, neither of which is a global shortcut). The Editor has the shortcuts (per `useKeyboardShortcuts.ts`); the Workspace doesn't. ## Where - Context menu hints: `src/components/workspace/ContextMenu.tsx:73-94` - No workspace shortcut hook: anywhere in `src/components/workspace/` ## Suggested fix shape Two options: 1. **Remove the shortcut hints from the context menu.** The hints promise functionality that doesn't exist. Drop the `shortcut:` field for workspace menu items until the shortcuts are implemented. 2. **Implement the shortcuts.** Add a `useWorkspaceShortcuts` hook that registers `Ctrl+A`, `Ctrl+D`, `Del`, `Ctrl+G`, `Ctrl+Shift+G`, `Ctrl+Shift+]`, `Ctrl+Shift+[` against the workspace's existing `handleSelectAll`, `handleDelete`, `handleDuplicate`, `handleGroup`, `handleUngroup`, `handleBringToFront`, `handleSendToBack` callbacks. The pattern is the same as the Editor's `useKeyboardShortcuts.ts` — copy the shape. Option 2 is the right product move. The Editor already has the model. The Workspace is the bulk-of-time surface; users will expect power-user shortcuts. ## Severity Medium. The hint in the UI is a UI lie. Power users will press the keys and find nothing. ## Discovered by Gap analysis (2026-10-02) of context menu affordances. ## Related - #156 (open) — Home page advertises keyboard shortcuts but Workspace has zero. This is the same gap from a different angle.
Author
Owner

False positive

The workspace already has global keyboard shortcuts — fb4ed81 (fix #156, 2026-10-03 10:18 PT) shipped useKeyboardShortcuts.ts + the wiring in Workspace.tsx + a 22-test unit suite + a Help-modal cheatsheet. This issue was filed ~20 min after that commit landed (2026-10-03T17:37:51Z), so the "no workspace shortcut hook" claim is stale.

Evidence:

  • Hook source: src/components/workspace/useKeyboardShortcuts.ts:97-220 registers the global keydown listener and dispatches Ctrl/Cmd + A/D/G (with Shift+G for ungroup), Ctrl/Cmd + Shift+D for auto-digitize, Delete/Backspace for delete, plus undo/redo/save/export/zoom/help/escape. Test file src/components/workspace/useKeyboardShortcuts.test.ts covers all 22 cases — all pass on main (commit 5fa763d).
  • Workspace wiring: src/pages/Workspace.tsx:114-165 calls useKeyboardShortcuts({ onSelectAll, onDuplicate, onDelete, onGroup, onUngroup, … }) and the hook's onDelete / onDuplicate / onGroup / onUngroup callbacks route to the same dispatch({ type: 'DELETE_SELECTED' | 'DUPLICATE_SELECTED' | 'GROUP_SELECTED' | 'UNGROUP_SELECTED' }) actions used by the context-menu handleSelectAll / handleDelete / handleDuplicate / handleGroup / handleUngroup at lines 227-249.
  • Context-menu item handlers (onSelectAll/onDelete/onDuplicate/onGroup/onUngroup passed to <ContextMenu> at lines 364-368) are equivalent dispatch paths — both invoke the same reducer actions, so pressing the key and clicking the menu item produce the same state transition.

The advertised hints therefore do exactly what the menu does; no UI lie.

The only honest residual gap is that Bring to Front and Send to Back (lines 257-268) have no keyboard shortcut. If you want to add Ctrl+Shift+] / Ctrl+Shift+[, that's a small follow-up — but the issue as filed is inaccurate, so closing.

## False positive The workspace already has global keyboard shortcuts — `fb4ed81` (fix #156, 2026-10-03 10:18 PT) shipped `useKeyboardShortcuts.ts` + the wiring in `Workspace.tsx` + a 22-test unit suite + a Help-modal cheatsheet. This issue was filed ~20 min after that commit landed (`2026-10-03T17:37:51Z`), so the "no workspace shortcut hook" claim is stale. Evidence: - Hook source: `src/components/workspace/useKeyboardShortcuts.ts:97-220` registers the global `keydown` listener and dispatches `Ctrl/Cmd + A/D/G` (with Shift+G for ungroup), `Ctrl/Cmd + Shift+D` for auto-digitize, `Delete`/`Backspace` for delete, plus undo/redo/save/export/zoom/help/escape. Test file `src/components/workspace/useKeyboardShortcuts.test.ts` covers all 22 cases — all pass on `main` (commit 5fa763d). - Workspace wiring: `src/pages/Workspace.tsx:114-165` calls `useKeyboardShortcuts({ onSelectAll, onDuplicate, onDelete, onGroup, onUngroup, … })` and the hook's `onDelete` / `onDuplicate` / `onGroup` / `onUngroup` callbacks route to the same `dispatch({ type: 'DELETE_SELECTED' | 'DUPLICATE_SELECTED' | 'GROUP_SELECTED' | 'UNGROUP_SELECTED' })` actions used by the context-menu `handleSelectAll` / `handleDelete` / `handleDuplicate` / `handleGroup` / `handleUngroup` at lines 227-249. - Context-menu item handlers (`onSelectAll`/`onDelete`/`onDuplicate`/`onGroup`/`onUngroup` passed to `<ContextMenu>` at lines 364-368) are equivalent dispatch paths — both invoke the same reducer actions, so pressing the key and clicking the menu item produce the same state transition. The advertised hints therefore do exactly what the menu does; no UI lie. The only honest residual gap is that `Bring to Front` and `Send to Back` (lines 257-268) have no keyboard shortcut. If you want to add `Ctrl+Shift+]` / `Ctrl+Shift+[`, that's a small follow-up — but the issue as filed is inaccurate, so closing.
Mark closed this issue 2026-10-03 19:34:03 +00:00
Sign in to join this conversation.
No description provided.