diff --git a/apps/desktop/src/app/session/hooks/use-session-actions.test.tsx b/apps/desktop/src/app/session/hooks/use-session-actions.test.tsx index f165504ad5e..8b806d5bdae 100644 --- a/apps/desktop/src/app/session/hooks/use-session-actions.test.tsx +++ b/apps/desktop/src/app/session/hooks/use-session-actions.test.tsx @@ -112,6 +112,7 @@ describe('createBackendSessionForSend profile routing', () => { cleanup() $newChatProfile.set(null) $activeGatewayProfile.set('default') + $currentCwd.set('') vi.restoreAllMocks() }) @@ -145,6 +146,14 @@ describe('createBackendSessionForSend profile routing', () => { expect(params).toMatchObject({ profile: 'default' }) }) + + it('passes the current workspace cwd into session.create', async () => { + const params = await createWith(() => { + $currentCwd.set('/remote/worktree') + }) + + expect(params).toMatchObject({ cwd: '/remote/worktree' }) + }) }) // ── Resume failure recovery (the "stuck loading session window" bug) ────────── @@ -344,6 +353,7 @@ describe('resumeSession failure recovery', () => { const runtimeIdByStoredSessionIdRef = { current: new Map([['stored-1', 'runtime-stale']]) } satisfies MutableRefObject> + const sessionStateByRuntimeIdRef = { current: new Map([ [