fix(hotkeys): restore F-key screen navigation off the console page (#2403) - #2404
Merged
Conversation
…2403) #1218 gated the whole useHotkeys hook on activeWorkspace === "console" to keep the capture-phase listener off other screens — but the F-key SCREEN-navigation hotkeys (switch rail workspaces) live in that same hook, so they stopped firing anywhere but the console page (F2 from GitHub did nothing). - Extract the screen-nav match into a shared `screenForEvent` helper and add an always-on listener that handles F-key nav on every page. It's gated OFF the console page; the console page keeps handling nav in its own effect (after the broadcast intercept, so an F-key still broadcasts in broadcast mode) — no double-firing. - Console-OPERATION hotkeys (broadcast, pane-select, view-switch, zoom, clear-input, redraw, focus-next, tab-switch) stay console-only, exactly as #1218 intended. - Drop the `F1 → console` screen-nav binding (screen-console) — the console page is being retired (#2372), so there's no point navigating to it by hotkey. Tests: off-console F6 navigates to GitHub; F1 no longer navigates; keybindings/shortcuts suites updated for the removed screen-console entry. Closes #2403. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
#1218 gated the whole
useHotkeyshook onactiveWorkspace === "console"(to keep its capture-phase listener off other screens). But the F-key screen-navigation hotkeys (switch rail workspaces) live in that same hook — so they stopped firing anywhere but the console page (F2 from GitHub/Planner/etc. did nothing).Fix
screenForEventhelper and add an always-on listener that handles F-key nav on every page. It's gated off the console page; the console page keeps handling nav in its own effect (after the broadcast intercept, so an F-key still broadcasts in broadcast mode) — no double-firing.F1 → consolescreen-nav binding (screen-console) acrossSCREEN_HOTKEYS,DEFAULT_BINDINGS,REBINDABLE_IDS, and the staleSHORTCUT_REGISTRY— the console page is being retired (Epic: retire the console page — Glance becomes the sole execution surface #2372).Verification
npm run typecheckclean ·npm run lint0 errors.useHotkeys.test.tsxis behavioral (dispatches realkeydownevents, assertssetWorkspace): off-console F6 → GitHub, F1 → no-op. keybindings/shortcuts suites updated for the removedscreen-consoleentry.Closes #2403.
🤖 Generated with Claude Code