fix: use instant scroll instead of disabling scroll on initial load

The previous fix returned `false` which disabled scrolling entirely,
causing incorrect scroll position. Changed to return "auto" which
scrolls instantly (no animation) while still positioning correctly.

https://claude.ai/code/session_0174r1Ddh5e2RuhHf2ZrFiNc
This commit is contained in:
Claude
2026-02-02 10:26:02 +00:00
parent 6545e2af29
commit 23a54fda02

View File

@@ -1085,10 +1085,10 @@ export function ChatViewer({
data={messagesWithMarkers}
initialTopMostItemIndex={messagesWithMarkers.length - 1}
followOutput={() => {
// Skip smooth scroll on initial load to avoid slow scroll animation
// Use instant scroll on initial load to avoid slow scroll animation
if (!isInitialScrollDone.current) {
isInitialScrollDone.current = true;
return false;
return "auto"; // Instant scroll (no animation)
}
return "smooth";
}}