You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Main panel does not always autoscroll to the latest message #306
Reported by Willem: the thread main panel sometimes fails to autoscroll to the newest message, so you have to scroll down manually to see the latest agent output.
Likely suspects to check: scroll anchoring when new messages render while the user is scrolled up (should stay put, but maybe misdetects position), image/markdown content loading after the scroll (shifts layout after anchor), and long-message streaming updates not re-triggering the scroll. Reproduce by running a long turn with streamed output and intermittent user scrolling.
Fixed (uncommitted in the working tree, ready for review).
Root cause: the autoscroll effect in ThreadView.tsx only runs when React state changes (timeline, isWorking, messages, workLog). Content that grows WITHOUT a state change — images finishing loading, code blocks highlighting, font swaps — increased scrollHeight after the scroll had run, stranding the view above the latest message while stickToBottom stayed true (no scroll event fires for content growth, so nothing re-evaluated it).
Fix: a ResizeObserver on the scroll container (covers window resize) and on every direct child (covers content growth) re-pins scrollTop to scrollHeight whenever stickToBottom is set (ThreadView.tsx, next to the existing effect). Re-observes on timeline change so new blocks are covered. User scroll-up behavior unchanged: scrolling more than 80px from the bottom still unsticks, so the observer never fights the user.
Verified: tsc clean, renderer suite 873/873, vite build clean, smoke-booted the built renderer in a hidden Electron window with zero console errors.
Activity
currentbits commentedon Aug 17, 2026
Fixed (uncommitted in the working tree, ready for review).
Root cause: the autoscroll effect in ThreadView.tsx only runs when React state changes (timeline, isWorking, messages, workLog). Content that grows WITHOUT a state change — images finishing loading, code blocks highlighting, font swaps — increased scrollHeight after the scroll had run, stranding the view above the latest message while stickToBottom stayed true (no scroll event fires for content growth, so nothing re-evaluated it).
Fix: a ResizeObserver on the scroll container (covers window resize) and on every direct child (covers content growth) re-pins scrollTop to scrollHeight whenever stickToBottom is set (ThreadView.tsx, next to the existing effect). Re-observes on timeline change so new blocks are covered. User scroll-up behavior unchanged: scrolling more than 80px from the bottom still unsticks, so the observer never fights the user.
Verified: tsc clean, renderer suite 873/873, vite build clean, smoke-booted the built renderer in a hidden Electron window with zero console errors.
On main: wip: ThreadView pin-on-resize #306