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
Thread view strands above the bottom when content grows without a state change #408
Follow-up to #306 (closed). Autoscroll still misses one class of case.
The pin-to-bottom effect in src/components/ThreadView.tsx runs on [timeline, isWorking, detail?.messages, detail?.workLog]. That covers every scroll triggered by a React state change, but content also grows after render with no state change and no scroll event:
images in tool output / attachments / markdown finish loading
code blocks get syntax-highlighted
webfonts swap in and reflow text
In those cases the container's scrollHeight grows while scrollTop stays put, so the view sits above the bottom even though stickToBottom is still true.
Repro: run a turn whose output ends in an image or a large code block, stay scrolled to the bottom, watch the view detach as the content lays out.
Fix (in progress locally): a ResizeObserver on the body element plus each direct child, re-attached on timeline change, that re-pins to scrollHeight whenever stickToBottom.current is set.
Status check: not fixed. No ResizeObserver (or MutationObserver) exists in src/components/ThreadView.tsx — the pin-to-bottom effect still runs only on [timeline, isWorking, detail?.messages, detail?.workLog], so image load / highlight / webfont reflow still strands the view above the bottom. No test covers it. Keeping open.
Ready for review on worktree branch coder/fork-we-have-a-lot-of-in-progress-on-the-ad9626 (commit f07b614, thread ad96263c). A ResizeObserver on the scroll body + its direct children (re-attached on timeline change) re-pins to scrollHeight only while stickToBottom is set and the view is actually detached — user scrolls up are not yanked. Tests in test/threadView.test.tsx cover pinned-growth re-pin and scrolled-up no-op; 26/26 pass.
Activity
currentbits commentedon Aug 18, 2026
Status check: not fixed. No ResizeObserver (or MutationObserver) exists in src/components/ThreadView.tsx — the pin-to-bottom effect still runs only on [timeline, isWorking, detail?.messages, detail?.workLog], so image load / highlight / webfont reflow still strands the view above the bottom. No test covers it. Keeping open.
currentbits commentedon Aug 18, 2026
Ready for review on worktree branch
coder/fork-we-have-a-lot-of-in-progress-on-the-ad9626(commit f07b614, thread ad96263c). A ResizeObserver on the scroll body + its direct children (re-attached on timeline change) re-pins to scrollHeight only while stickToBottom is set and the view is actually detached — user scrolls up are not yanked. Tests in test/threadView.test.tsx cover pinned-growth re-pin and scrolled-up no-op; 26/26 pass.Merge origin/main into #408 branch (combine review itineraries)