From ea34364562d08dfd0b1634d8563cb7d39aecabe4 Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Fri, 28 Aug 2026 10:54:05 -0700 Subject: [PATCH] test(terminal): reconcile the direct-SSH hydration wake with retained records #16750 landed this test after the branch was written, so it still asserted the eager clear the four sibling suites were already updated away from. --- ...leeping-agent-session-direct-ssh-hydration-gap.test.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/renderer/src/lib/resume-sleeping-agent-session-direct-ssh-hydration-gap.test.ts b/src/renderer/src/lib/resume-sleeping-agent-session-direct-ssh-hydration-gap.test.ts index be73993c49c..4c30b9a59c6 100644 --- a/src/renderer/src/lib/resume-sleeping-agent-session-direct-ssh-hydration-gap.test.ts +++ b/src/renderer/src/lib/resume-sleeping-agent-session-direct-ssh-hydration-gap.test.ts @@ -114,7 +114,13 @@ describe('sleeping-agent resume across the direct-SSH hydration gap', () => { expect(launched, 'the deferred agent never woke after the host answered').toBe(1) const state = useAppStore.getState() expect(state.tabsByWorktree[WORKTREE_ID]?.[0]?.launchAgent).toBe('claude') - expect(state.sleepingAgentSessionsByPaneKey[record.paneKey]).toBeUndefined() + // The wake only queues the startup; the record is retained until a fresh PTY spawn + // consumes it, so a launch that never spawns stays retryable. + const resumedTabId = state.tabsByWorktree[WORKTREE_ID]?.[0]?.id + expect(state.pendingStartupByTabId[resumedTabId!]?.sleepingAgentResumeIdentity?.paneKey).toBe( + record.paneKey + ) + expect(state.sleepingAgentSessionsByPaneKey[record.paneKey]).toBeDefined() }) it('leaves a purely local workspace resuming with no added latency', () => {