From cbc2ce06e9c351e7e31be9c7372ef0376f296e7c Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Tue, 7 Apr 2026 18:56:47 +0700 Subject: [PATCH] Fix WorkingIndicator remounting on every stream update on native Passing an arrow function to FlatList's ListHeaderComponent caused React to treat each re-render as a new component type, unmounting and remounting the entire header (including the bouncing dots animation). Pass the element directly instead so React can reconcile properly. --- packages/app/src/components/stream-strategy-native.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app/src/components/stream-strategy-native.tsx b/packages/app/src/components/stream-strategy-native.tsx index ac75da5b2..97664cd39 100644 --- a/packages/app/src/components/stream-strategy-native.tsx +++ b/packages/app/src/components/stream-strategy-native.tsx @@ -313,7 +313,7 @@ function NativeStreamViewport(props: StreamRenderInput & { strategy: StreamStrat keyExtractor={(item) => item.id} testID="agent-chat-scroll" nativeID="agent-chat-scroll-native-virtualized" - ListHeaderComponent={liveHeaderContent ? () => liveHeaderContent : undefined} + ListHeaderComponent={liveHeaderContent ?? undefined} contentContainerStyle={baseListContentContainerStyle} style={listStyle} onLayout={handleListLayout}