mirror of
https://github.com/stablyai/orca.git
synced 2026-10-19 08:03:13 +00:00
fix(dashboard): enumerate pane-scoped chords instead of a default case
The switch-exhaustiveness gate rejects a `default` over the shortcut-action union — it would let a newly added action be swallowed silently instead of forcing a decision at the preview's boundary.
This commit is contained in:
@@ -125,10 +125,21 @@ export function installPreviewTerminalKeyHandler(args: {
|
||||
// Why: the OS owns this chord — block xterm without preventing the default.
|
||||
event.stopPropagation()
|
||||
return false
|
||||
default:
|
||||
// Pane-scoped chords (splits, search, focus, titles) have no target in a
|
||||
// preview dialog. Swallow them: a pane never sends these bytes to the
|
||||
// shell, and xterm would encode e.g. Ctrl+Shift+D as a bare Ctrl+D.
|
||||
// Why: pane-scoped chords have no target in a preview dialog. Swallow them
|
||||
// — a pane never sends these bytes to the shell, and xterm would encode
|
||||
// e.g. Ctrl+Shift+D as a bare Ctrl+D. Listed one by one rather than under a
|
||||
// `default` so a newly added action has to be classified here, not
|
||||
// silently swallowed.
|
||||
case 'clearActivePane':
|
||||
case 'clearPaneTitle':
|
||||
case 'closeActivePane':
|
||||
case 'copySelection':
|
||||
case 'equalizePaneSizes':
|
||||
case 'focusPane':
|
||||
case 'setTitle':
|
||||
case 'splitActivePane':
|
||||
case 'toggleExpandActivePane':
|
||||
case 'toggleSearch':
|
||||
return consumeEvent(event)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user