diff --git a/src/components/messageStream/hooks/usePostStream.ts b/src/components/messageStream/hooks/usePostStream.ts index 646de1f..0d267f0 100644 --- a/src/components/messageStream/hooks/usePostStream.ts +++ b/src/components/messageStream/hooks/usePostStream.ts @@ -288,7 +288,11 @@ export function usePostStream(params: PostStreamParams): PostStreamResult { return; } restoredFromCacheRef.current = false; - setItems([]); + // Stale-while-revalidate: keep showing whatever items were on screen for + // the previous params (e.g. previous locale) while the new fetch runs. + // Clearing to [] here was the root cause of the language-switch flicker + // — the stream went blank between the click and the network response. + // fetchPage(true) below will replace items wholesale once data arrives. cursorRef.current = undefined; setHasMore(true); hasMoreRef.current = true;