From 1bb96089e038d9aef2a55cfbb9496137de64cb60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20Andr=C3=A9?= Date: Sat, 15 Aug 2026 10:17:16 +0200 Subject: [PATCH] fix(ui): stop reasoning output scroll jitter Keep bottom-follow anchor correction directional so an already visible sentinel cannot scroll the reasoning output upward between streamed updates. This removes the oscillation caused by bottom padding while preserving downward correction when content grows. Validated with the virtual follow behavior tests, UI typecheck, UI production build, and git diff checks. The reporter's Electron Ubuntu scenario remains the final visual confirmation. --- packages/ui/src/lib/follow-scroll.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ui/src/lib/follow-scroll.tsx b/packages/ui/src/lib/follow-scroll.tsx index 34c407245..137428600 100644 --- a/packages/ui/src/lib/follow-scroll.tsx +++ b/packages/ui/src/lib/follow-scroll.tsx @@ -104,7 +104,7 @@ export function createFollowScroll(options: FollowScrollOptions): FollowScrollHe const containerRect = container.getBoundingClientRect() const sentinelRect = sentinel.getBoundingClientRect() const delta = sentinelRect.bottom - containerRect.bottom - if (Math.abs(delta) > 1) { + if (delta > 1) { suppressNextScrollHandling = true container.scrollBy({ top: delta, behavior: immediate ? "auto" : "smooth" }) }