mirror of
https://github.com/stablyai/orca.git
synced 2026-11-19 04:23:57 +00:00
fix(tabs): let the shortcut recorder capture workspace shortcuts and open reopened workspaces as user opens
This commit is contained in:
@@ -12,7 +12,7 @@ export function reopenClosedWorkspaceTab(activeWorktreeId: string | null): void
|
||||
return
|
||||
}
|
||||
if (!activeWorktreeId) {
|
||||
// History entries may be folder workspace keys; this is the activator history replay uses.
|
||||
activateAndRevealWorkspace(worktreeId)
|
||||
// Same activation as history replay: entries may be folder workspace keys, and this is a user open.
|
||||
activateAndRevealWorkspace(worktreeId, { navigationIntent: 'user-open' })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -259,7 +259,9 @@ describe('reopen closed tab from the welcome screen', () => {
|
||||
})
|
||||
act(() => window.dispatchEvent(event))
|
||||
expect(reopenClosedTab).toHaveBeenCalledExactlyOnceWith(worktreeId)
|
||||
expect(activateAndRevealWorkspace).toHaveBeenCalledExactlyOnceWith(worktreeId)
|
||||
expect(activateAndRevealWorkspace).toHaveBeenCalledExactlyOnceWith(worktreeId, {
|
||||
navigationIntent: 'user-open'
|
||||
})
|
||||
expect(event.defaultPrevented).toBe(true)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -50,6 +50,10 @@ export function handleTerminalWorkspaceKeyDown(
|
||||
mobileEmulatorEnabled,
|
||||
terminalShortcutPolicy
|
||||
} = controller
|
||||
// Let the focused Settings recorder capture shortcuts without executing them.
|
||||
if (event.target instanceof Element && event.target.closest('[data-shortcut-recorder-active]')) {
|
||||
return
|
||||
}
|
||||
const context = getKeybindingContext(event.target)
|
||||
const floatingWorkspaceFocused =
|
||||
isEventTargetInsideFloatingWorkspacePanel(event.target) || isFloatingWorkspacePanelFocused()
|
||||
|
||||
Reference in New Issue
Block a user