diff --git a/apps/desktop/src/app/contrib/hooks/use-background-sync.test.ts b/apps/desktop/src/app/contrib/hooks/use-background-sync.test.ts index 794fbe53b6..8a56eeb293 100644 --- a/apps/desktop/src/app/contrib/hooks/use-background-sync.test.ts +++ b/apps/desktop/src/app/contrib/hooks/use-background-sync.test.ts @@ -653,7 +653,19 @@ describe('typing-aware sessions.changed deferral', () => { refreshCurrentModel: vi.fn(), refreshHermesConfig: vi.fn(), refreshMessagingSessions: vi.fn(), - requestGateway: vi.fn(async () => ({ sessions: [] })) as never + requestGateway: vi.fn(async () => ({ sessions: [] })) as never, + // Required by the hook's params. This harness never drives the + // transcript path, so the updater just runs against a throwaway state — + // but it must live in `stable` like every other prop, since a fresh + // identity per render would re-run the connect-reseed effect. + updateSessionState: vi.fn( + ( + _sessionId: string, + updater: (state: ReturnType) => ReturnType< + typeof createClientSessionState + > + ) => updater(createClientSessionState(ACTIVE_STORED_ID)) + ) } return renderHook(() => {