fix(chat): glide the anchored end-follow instead of per-line hops

The phase-2 reveal correction now scrolls animated; successive
corrections restart the smooth scroll from the current position, so
streaming follows as one continuous motion. User gestures interrupt the
native smooth scroll, so free-scrolling is unaffected.
This commit is contained in:
Bohdan Triapitsyn
2026-08-25 01:59:53 +03:00
parent 6a00d6a830
commit 1b4b8509ba
@@ -547,9 +547,13 @@ export const useChatTimelineScroll = ({
// The turn still fits: leave the viewport exactly where the
// user is reading.
if (!metrics || metrics.scrollDeltaToRevealEnd <= 1) return;
// Animated: successive corrections restart the smooth scroll
// from the current position, so streaming reads as one
// continuous glide instead of a per-line hop. A real user
// gesture interrupts the native smooth scroll on its own.
void list.scrollToOffset({
offset: list.getState().scroll + metrics.scrollDeltaToRevealEnd,
animated: false,
animated: true,
});
return;
}