fix(app): stop updates after chat teardown (#1997)

Plain chat views started the history virtualizer even without virtualized rows. Its delayed scroll callback could outlive the mounted view and make the app test job fail during environment teardown.
This commit is contained in:
Mohamed Boudra authored and GitHub committed 2026-07-11 09:12:28 +00:00
1 parent 28a27b02d3
commit 6c764f211a
1 file changed
+1
@@ -152,6 +152,7 @@ function WebStreamViewport(props: StreamRenderInput & { isMobileBreakpoint: bool
const rowVirtualizer = useVirtualizer({
count: segments.historyVirtualized.length,
enabled: shouldUseVirtualizer,
getScrollElement: () => scrollContainerRef.current,
getItemKey: (index: number) => segments.historyVirtualized[index]?.id ?? index,
estimateSize: (index: number) => {