From 1b4b8509ba2c20cf42d11572b7e56fce6c556e93 Mon Sep 17 00:00:00 2001 From: Bohdan Triapitsyn Date: Tue, 25 Aug 2026 01:59:53 +0300 Subject: [PATCH] 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. --- packages/ui/src/hooks/useChatTimelineScroll.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/ui/src/hooks/useChatTimelineScroll.ts b/packages/ui/src/hooks/useChatTimelineScroll.ts index 08acd2bb..e034e688 100644 --- a/packages/ui/src/hooks/useChatTimelineScroll.ts +++ b/packages/ui/src/hooks/useChatTimelineScroll.ts @@ -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; }