From 9a3f91cd0eb3a9498dee43a0ed1ee27c8fa94fc3 Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Tue, 4 Aug 2026 02:11:13 -0700 Subject: [PATCH] test(mobile): assert the whole reconnect window, not just its first frame The re-subscribe lands a commit after the first render of the swap, so a regression that cleared the held list there left frame 0 green and still blanked the transcript. Verified: clearing the cache in the subscribe cleanup now fails this test, where before only the view-toggle test caught it. --- mobile/src/session/use-mobile-native-chat-session.test.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mobile/src/session/use-mobile-native-chat-session.test.ts b/mobile/src/session/use-mobile-native-chat-session.test.ts index 2b7c4b0898a..037a72885a3 100644 --- a/mobile/src/session/use-mobile-native-chat-session.test.ts +++ b/mobile/src/session/use-mobile-native-chat-session.test.ts @@ -350,6 +350,10 @@ describe('useMobileNativeChatSession transcriptLoading', () => { transcriptLoading: true, ids: ['a-1'] }) + // Every commit of the window, not just the first: the re-subscribe lands a + // commit after it, so clearing the cache there blanks the transcript the + // user actually sees while leaving a first-frame assertion green. + expect([...new Set(renders.map((entry) => entry.ids.join(',')))]).toEqual(['a-1']) // The fresh client's snapshot supersedes the held list. await act(async () =>