From 74c2ba8c5716527e3016fb33a243cd85b5eb9555 Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Wed, 26 Aug 2026 23:18:22 -0700 Subject: [PATCH] test(terminal): align resume retirement expectations --- .../terminal-pane/pty-connection-agent-session-resume.test.ts | 2 +- .../pty-connection-cold-restore-resume-command.test.ts | 2 +- .../terminal-pane/pty-connection-hibernation-wake.test.ts | 2 +- .../terminal-pane/pty-connection-remote-runtime-attach.test.ts | 2 +- .../terminal-pane/pty-connection-sleeping-resume-banner.test.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/renderer/src/components/terminal-pane/pty-connection-agent-session-resume.test.ts b/src/renderer/src/components/terminal-pane/pty-connection-agent-session-resume.test.ts index c93294ba2f9..163b3ff05dc 100644 --- a/src/renderer/src/components/terminal-pane/pty-connection-agent-session-resume.test.ts +++ b/src/renderer/src/components/terminal-pane/pty-connection-agent-session-resume.test.ts @@ -752,6 +752,6 @@ describe('connectPanePty', () => { ) expect(deps.onShowSessionRestoredBanner).toHaveBeenCalledTimes(1) expect(deps.onShowSessionRestoredBanner).toHaveBeenCalledWith(2, 'restored') - expect(mockStoreState.clearSleepingAgentSession).toHaveBeenCalledWith(paneKey) + expect(mockStoreState.clearSleepingAgentSessionsByPaneKey).toHaveBeenCalledWith([paneKey]) }) }) diff --git a/src/renderer/src/components/terminal-pane/pty-connection-cold-restore-resume-command.test.ts b/src/renderer/src/components/terminal-pane/pty-connection-cold-restore-resume-command.test.ts index 89bcc7254d1..a92a3911eb9 100644 --- a/src/renderer/src/components/terminal-pane/pty-connection-cold-restore-resume-command.test.ts +++ b/src/renderer/src/components/terminal-pane/pty-connection-cold-restore-resume-command.test.ts @@ -332,7 +332,7 @@ describe('connectPanePty', () => { expect(deps.clearTabPtyId).toHaveBeenCalledWith('tab-1', 'restored-session') expect(deps.syncPanePtyLayoutBinding).not.toHaveBeenCalledWith(2, 'restored-session') expect(deps.syncPanePtyLayoutBinding).toHaveBeenCalledWith(2, 'fresh-resume-pty') - expect(mockStoreState.clearSleepingAgentSession).toHaveBeenCalledWith(paneKey) + expect(mockStoreState.clearSleepingAgentSessionsByPaneKey).toHaveBeenCalledWith([paneKey]) expect(window.api.pty.clearPendingPaneSerializer).toHaveBeenCalledWith(paneKey, 1) } finally { globalThis.setTimeout = originalSetTimeout diff --git a/src/renderer/src/components/terminal-pane/pty-connection-hibernation-wake.test.ts b/src/renderer/src/components/terminal-pane/pty-connection-hibernation-wake.test.ts index 8577c08ea1e..fe2b1b77727 100644 --- a/src/renderer/src/components/terminal-pane/pty-connection-hibernation-wake.test.ts +++ b/src/renderer/src/components/terminal-pane/pty-connection-hibernation-wake.test.ts @@ -369,7 +369,7 @@ describe('connectPanePty', () => { deferredSpawn.resolve('pty-resumed') await flushAsyncTicks() - expect(mockStoreState.clearSleepingAgentSession).toHaveBeenCalledWith(paneKey) + expect(mockStoreState.clearSleepingAgentSessionsByPaneKey).toHaveBeenCalledWith([paneKey]) }) it('re-arms the exact hibernation target after a replacement spawn fails', async () => { diff --git a/src/renderer/src/components/terminal-pane/pty-connection-remote-runtime-attach.test.ts b/src/renderer/src/components/terminal-pane/pty-connection-remote-runtime-attach.test.ts index 23ec29e6323..e360e63fa19 100644 --- a/src/renderer/src/components/terminal-pane/pty-connection-remote-runtime-attach.test.ts +++ b/src/renderer/src/components/terminal-pane/pty-connection-remote-runtime-attach.test.ts @@ -394,7 +394,7 @@ describe('connectPanePty', () => { expect(deps.updateTabPtyId).toHaveBeenCalledWith('tab-1', freshPtyId) expect(window.api.pty.reportRendererSerializerReady).toHaveBeenCalledWith(freshPtyId) expect(transport.sendInput).not.toHaveBeenCalled() - expect(mockStoreState.clearSleepingAgentSession).toHaveBeenCalledWith(paneKey) + expect(mockStoreState.clearSleepingAgentSessionsByPaneKey).toHaveBeenCalledWith([paneKey]) }) it('does not let a restored encoded PTY override the current worktree owner', async () => { diff --git a/src/renderer/src/components/terminal-pane/pty-connection-sleeping-resume-banner.test.ts b/src/renderer/src/components/terminal-pane/pty-connection-sleeping-resume-banner.test.ts index f6d0457e76a..1290ead1f40 100644 --- a/src/renderer/src/components/terminal-pane/pty-connection-sleeping-resume-banner.test.ts +++ b/src/renderer/src/components/terminal-pane/pty-connection-sleeping-resume-banner.test.ts @@ -244,7 +244,7 @@ describe('connectPanePty', () => { expect(deps.onShowSessionRestoredBanner).toHaveBeenCalledTimes(1) expect(deps.onShowSessionRestoredBanner).toHaveBeenCalledWith(2, 'restored') - expect(mockStoreState.clearSleepingAgentSession).toHaveBeenCalledWith(paneKey) + expect(mockStoreState.clearSleepingAgentSessionsByPaneKey).toHaveBeenCalledWith([paneKey]) }) it('says the fresh-spawn resume started fresh when main declined it', async () => {