codeburn/app/renderer/sections
ozymandiashh c10ae84e4a fix(desktop): make keyboard shortcuts work on Windows and Linux
Closes #918.

The renderer's keydown handler required event.metaKey and explicitly
rejected event.ctrlKey, so every shortcut was dead outside macOS: on
Windows and Linux metaKey is the Super key, which the OS shell takes.
Navigation (1-8), Settings (,) and Refresh (R) all did nothing. The
sidebar and footer hints also hardcoded the Cmd glyph, so a Windows
user was shown chords that could not fire.

Add app/renderer/lib/platform.ts as the single source of truth for
platform-aware shortcuts, reading the platform the preload already
exposes (window.codeburn.platform) with a user-agent fallback for the
non-Electron cases. isModifierChord accepts Cmd-without-Ctrl on darwin
and Ctrl-without-Cmd elsewhere; altKey stays rejected on both, because
AltGr on European Windows layouts arrives as Ctrl+Alt and must not
hijack a typed character. Every visible shortcut label now resolves
through shortcutLabel() at render time, so the sidebar shows Ctrl+1
where macOS shows the Cmd glyph.

The mac chord condition is unchanged: the old guard admitted
metaKey && !altKey && !ctrlKey && !shiftKey, and the new one admits
exactly the same set on darwin.

The Electron application menu is deliberately left alone. It ships no
reload/forceReload role and no CmdOrCtrl+R accelerator, which is what
leaves Ctrl+R free for the renderer to handle on Windows.

Also corrects the Settings navigation hint, which read 1-7 while the
sidebar has eight numbered destinations.

Tests cover both platforms for labels and dispatch, including the
negatives: Meta on win32, Ctrl on darwin, and the Ctrl+Alt AltGr shape.
2026-08-04 22:48:39 +03:00
..
Compare.test.tsx fix(app): accuracy batch A — provider scoping, honest chart axes, range threading, stale-error banner 2026-07-16 01:14:41 -07:00
Compare.tsx feat(app): refresh cadence, instant switching, cache coherence, telemetry v1 2026-07-16 11:47:05 -07:00
Models.test.tsx fix(app): models rows name their provider; picker shows all detected 2026-07-16 09:27:46 -07:00
Models.tsx feat(app): refresh cadence, instant switching, cache coherence, telemetry v1 2026-07-16 11:47:05 -07:00
Optimize.test.tsx feat(app): refresh cadence, instant switching, cache coherence, telemetry v1 2026-07-16 11:47:05 -07:00
Optimize.tsx feat(app): refresh cadence, instant switching, cache coherence, telemetry v1 2026-07-16 11:47:05 -07:00
Overview.test.tsx feat(dashboard): add combined-device scope to desktop app and menubar badge 2026-07-31 15:12:29 -06:00
Overview.tsx feat(dashboard): add combined-device scope to desktop app and menubar badge 2026-07-31 15:12:29 -06:00
Plans.test.tsx fix: audit batch — prefetch one-shot, turn-anchored day bucketing, warm-path collapse 2026-07-16 15:37:03 -07:00
Plans.tsx feat(app): refresh cadence, instant switching, cache coherence, telemetry v1 2026-07-16 11:47:05 -07:00
PullRequests.test.tsx sessions: correlate cross-provider work with pull requests (#792) 2026-07-21 11:50:11 +02:00
PullRequests.tsx sessions: correlate cross-provider work with pull requests (#792) 2026-07-21 11:50:11 +02:00
Sessions.test.tsx app: Workflow card on Overview and session titles in the Sessions view (#784) 2026-07-20 13:55:33 -07:00
Sessions.tsx app: Workflow card on Overview and session titles in the Sessions view (#784) 2026-07-20 13:55:33 -07:00
Settings.test.tsx feat(dashboard): add combined-device scope to desktop app and menubar badge 2026-07-31 15:12:29 -06:00
Settings.tsx fix(desktop): make keyboard shortcuts work on Windows and Linux 2026-08-04 22:48:39 +03:00
Spend.test.tsx feat(app): Sessions provider quick-filter + Spend project inline expand 2026-07-16 02:49:17 -07:00
Spend.tsx app,dash: render pre-history days as no data, not a currency zero (#765) 2026-07-20 08:03:24 -07:00