Repository navigation
fix(web): returning to a finished thread no longer scrolls through its new work - #38754
Closed
pouyarezvani wants to merge 1 commit into
Closed
pouyarezvani wants to merge 1 commit into
pouyarezvani wants to merge 1 commit into
Conversation
…s new work A thread the client stopped following reopens from its disk cache, which can still say the run is working. The timeline used LegendList's animated keep-at-end mode for that stale copy, and when the fresh snapshot landed the in-flight animation was retargeted to the new end and scrolled through every new row. Animate the follow only once the thread is live again, so a cached or catching-up copy lands at the end at once. Fixes pingdotgg#38753 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
Closing: pouyarezvani already has 3 or more open PRs here, which is the limit for contributors who are not vouched. Once one of them is merged or closed, open this again. See the open PR limit. |
Member
|
Thanks for this. #38765 makes the same change and is the one being kept. #38765 carries the exact same fix and regression test at the same commit. It is the open replacement for this submission after the contributor PR limit closed it. Your implementation and supporting evidence remain intact there, so review should continue on that submission. Closing as a duplicate. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Leave a thread while its agent works, come back after it finishes (more than 5 minutes later), and the timeline slides through everything the agent did before it reaches the end. On a long run it reads as a scroll from top to bottom.
Five minutes after you leave a thread, the client stops following it, so coming back reopens the thread from its disk cache. That copy still says the run is working.
MessagesTimelinepicks LegendList's animated keep-at-end mode wheneverisWorkingis true, so it starts an animated scroll to the end of the stale copy. When the server's fresh snapshot lands, LegendList retargets the scroll already in flight to the new end, and the animation runs through every new row.Fixes #38753.
Change
The animated keep-at-end mode is for rows that stream in while you watch.
MessagesTimelinenow uses it only when the thread is live:ThreadTimelinepasses its existingsyncingflag through, and while the thread shows a cached or catching-up copy the list keeps the end without animating. A snapshot lands while the thread still reportssynchronizing, so the catch-up arrives at the end in one step. Once the thread is live again, streaming keeps its smooth follow.Scope
Verification
Recorded on a dev server holding only demo data. The demo thread copies the shape of a real long run (counts, order and sizes of its items) with filler text. A page reload stands in for the 5-minute absence; both reopen the thread from the disk cache.
Frames right after clicking back in, 100 ms apart. Before (
main): the stale "Working for…" view, then the content glides up for about 450 ms.After: the stale view, then the end on the next frame.
Before and after side by side, quarter speed:
return-slide-quarter-speed.mp4
Real speed:
return-slide-realtime.mp4
Same thread, same starting point (
scrollTop279 of 1027):scrollTopper frame after the clickscrollTocallsmainscrollTo. It fails onmain(a smooth scroll to 2191).vp test run apps/web/src/components/chat/MessagesTimeline.browser.test.tsx: 72 passed.vp run check:changed: format, lint, knip, typecheck, tests and React compiler pass.Claude Opus 5.5 in Claude Code (T3 Code).
🤖 Generated with Claude Code