Commit 849575d
Add per-view hotkeys, in-window-only by explicit decision (task #9)
New capability, not previously named anywhere in SPEC.md. Cmd+1
through Cmd+5 jump straight to a top-level view (Composition/Configure/
Activity/Runs/Spec, matching the sidebar's own order) via a plain
keydown listener in App.tsx calling the existing useAppStore setView --
no new navigation mechanism, reuses exactly what the sidebar's own nav
links already call.
Deliberately in-window-only, not a real OS-level golang.design/x/hotkey
registration the way per-workflow and summon hotkeys use (§3.4/§3.7):
registering these globally would mean checking each combo against
TriggerService's own claimed-combo conflict space, the same
bidirectional check the summon hotkey already goes through -- a bigger
design surface this pass intentionally didn't take on. The safer,
reversible default named directly in the session goal that built this.
Active regardless of which element has focus -- matches browsers'/
Slack's own Cmd+1-9 tab-switching precedent (Cmd+digit isn't a combo
real typing produces, so there's no need to scope it away from text
inputs). Verified directly, not assumed: a real e2e test confirms a
hotkey fires correctly even while a text field has focus.
Verified end-to-end via Playwright against the real server-mode
backend (view-hotkeys.spec.ts, run twice): all five hotkeys navigate
correctly from a cold start, checked against real existing markers
per view (Composition/Configure's own tablist aria-labels, Activity/
Runs' own h1 headings, Spec's own capability-index testid) rather than
new testids added just for this; a bare digit key without Cmd does
nothing. Full frontend check suite (tsc, eslint, boundaries, vitest)
clean. Documented in docs/SPEC.md §3.7.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FYwojT8GdUbYSoggbvEFft1 parent 7fe6ec9 commit 849575d
2 files changed
Lines changed: 83 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
50 | 84 | | |
51 | 85 | | |
52 | 86 | | |
| |||
0 commit comments