From b580505bd12871bbe5cf7bb6c132a02764118501 Mon Sep 17 00:00:00 2001 From: vaeho Date: Thu, 2 Apr 2026 20:24:59 +0400 Subject: [PATCH] fix: prevent scroll-to-bottom flicker near bottom --- apps/web/src/components/ChatView.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index 76133712d4..1fe15d83f5 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -1993,13 +1993,13 @@ export default function ChatView({ threadId }: ChatViewProps) { pendingUserScrollUpIntentRef.current = false; } else if (shouldAutoScrollRef.current && pendingUserScrollUpIntentRef.current) { const scrolledUp = currentScrollTop < lastKnownScrollTopRef.current - 1; - if (scrolledUp) { + if (scrolledUp && !isNearBottom) { shouldAutoScrollRef.current = false; } pendingUserScrollUpIntentRef.current = false; } else if (shouldAutoScrollRef.current && isPointerScrollActiveRef.current) { const scrolledUp = currentScrollTop < lastKnownScrollTopRef.current - 1; - if (scrolledUp) { + if (scrolledUp && !isNearBottom) { shouldAutoScrollRef.current = false; } } else if (shouldAutoScrollRef.current && !isNearBottom) {