From 3d85148e954e70e943a6ba83700e35d3a2e6fbd8 Mon Sep 17 00:00:00 2001 From: Jinwoo Hong <73622457+Jinwoo-H@users.noreply.github.com> Date: Sun, 24 May 2026 15:03:08 -0400 Subject: [PATCH] Change floating workspace shortcut default (#2678) Co-authored-by: Orca --- .../remote-runtime-pty-transport.test.ts | 6 +++--- src/shared/keybindings.test.ts | 2 +- src/shared/keybindings.ts | 2 +- src/shared/window-shortcut-policy.test.ts | 16 ++++++++-------- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/renderer/src/components/terminal-pane/remote-runtime-pty-transport.test.ts b/src/renderer/src/components/terminal-pane/remote-runtime-pty-transport.test.ts index cc10dd150..31b66b08d 100644 --- a/src/renderer/src/components/terminal-pane/remote-runtime-pty-transport.test.ts +++ b/src/renderer/src/components/terminal-pane/remote-runtime-pty-transport.test.ts @@ -494,7 +494,7 @@ describe('createRemoteRuntimePtyTransport', () => { expect(transport.getPtyId()).toBeNull() }) - it('processes remote data chunks through title, bell, and OSC 9999 handlers before onData', async () => { + it('delivers cleaned remote data before deferred title, bell, and OSC 9999 handlers', async () => { const { createRemoteRuntimePtyTransport } = await import('./remote-runtime-pty-transport') const onData = vi.fn() const onTitleChange = vi.fn() @@ -515,6 +515,7 @@ describe('createRemoteRuntimePtyTransport', () => { 'before\x1b]9999;{"state":"working","prompt":"ship it","agentType":"codex"}\x07after\x1b]0;. Claude working\x07\x07' ) + expect(onData).toHaveBeenCalledWith('beforeafter\x1b]0;. Claude working\x07\x07') await vi.waitFor(() => expect(onAgentStatus).toHaveBeenCalledWith({ state: 'working', @@ -522,7 +523,6 @@ describe('createRemoteRuntimePtyTransport', () => { agentType: 'codex' }) ) - expect(onData).toHaveBeenCalledWith('beforeafter\x1b]0;. Claude working\x07\x07') expect(onTitleChange).toHaveBeenCalledWith('. Claude working', '. Claude working') expect(onBell).toHaveBeenCalledTimes(1) }) @@ -548,6 +548,7 @@ describe('createRemoteRuntimePtyTransport', () => { 'before\x1b]9999;{"state":"working","prompt":"ship it","agentType":"codex"}\x07after' ) + expect(onData).toHaveBeenCalledWith('beforeafter') await vi.waitFor(() => expect(onAgentStatus).toHaveBeenCalledWith({ state: 'working', @@ -555,7 +556,6 @@ describe('createRemoteRuntimePtyTransport', () => { agentType: 'codex' }) ) - expect(onData).toHaveBeenCalledWith('beforeafter') }) it('resubscribes without surfacing a PTY error when the remote runtime subscription closes', async () => { diff --git a/src/shared/keybindings.test.ts b/src/shared/keybindings.test.ts index 0ea82b947..fd6c073e9 100644 --- a/src/shared/keybindings.test.ts +++ b/src/shared/keybindings.test.ts @@ -192,7 +192,7 @@ describe('keybindings', () => { expect( keybindingMatchesAction( 'floatingTerminal.toggle', - { key: 't', code: 'KeyT', control: true, meta: false, alt: true, shift: false }, + { key: 'a', code: 'KeyA', control: true, meta: false, alt: true, shift: false }, 'linux', undefined, { context: 'terminal', terminalShortcutPolicy: 'terminal-first' } diff --git a/src/shared/keybindings.ts b/src/shared/keybindings.ts index 240349bd6..e170f928c 100644 --- a/src/shared/keybindings.ts +++ b/src/shared/keybindings.ts @@ -317,7 +317,7 @@ export const KEYBINDING_DEFINITIONS: readonly KeybindingDefinition[] = [ group: 'Global', scope: 'global', searchKeywords: ['shortcut', 'floating terminal', 'terminal'], - defaultBindings: platformBindings(['Mod+Alt+T']), + defaultBindings: platformBindings(['Mod+Alt+A']), allowInTerminal: true }, { diff --git a/src/shared/window-shortcut-policy.test.ts b/src/shared/window-shortcut-policy.test.ts index 5cbe7e433..9b4f851f1 100644 --- a/src/shared/window-shortcut-policy.test.ts +++ b/src/shared/window-shortcut-policy.test.ts @@ -347,8 +347,8 @@ describe('resolveWindowShortcutAction', () => { expect( resolveWindowShortcutAction( { - code: 'KeyT', - key: 't', + code: 'KeyA', + key: 'a', meta: true, control: false, alt: true, @@ -361,8 +361,8 @@ describe('resolveWindowShortcutAction', () => { expect( resolveWindowShortcutAction( { - code: 'KeyT', - key: 't', + code: 'KeyA', + key: 'a', meta: false, control: true, alt: true, @@ -377,8 +377,8 @@ describe('resolveWindowShortcutAction', () => { expect( resolveWindowShortcutAction( { - code: 'KeyT', - key: 't', + code: 'KeyA', + key: 'a', meta: true, control: false, alt: true, @@ -391,8 +391,8 @@ describe('resolveWindowShortcutAction', () => { expect( resolveWindowShortcutAction( { - code: 'KeyT', - key: 't', + code: 'KeyA', + key: 'a', meta: true, control: true, alt: true,