Skip to content

Returning to a thread that finished while you were away scrolls through its new work #38753

Closed

Description

@pouyarezvani

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Open a thread that already has a lot of history and give the agent a long task.
  2. While it works, switch to another thread and stay there for more than 5 minutes.
  3. When the sidebar shows the thread as Done, click into it.

Expected behavior

The thread opens at its end.

Actual behavior

The timeline opens on what the thread looked like when you left it (still "Working for…"), then smoothly scrolls through everything the agent did while you were away until it reaches the end. On a long run it reads as the view sliding from top to bottom.

Cause: 5 minutes after you leave a thread, the client stops following it. Coming back loads the cached copy from disk, which still says the run is working. MessagesTimeline picks LegendList's animated keep-at-end mode (TIMELINE_MAINTAIN_SCROLL_AT_END_SMOOTH) whenever isWorking is true, so it starts an animated scroll to the end of that 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 all the new rows.

Impact

Minor bug or occasional failure

Version or commit

0.1.11-nightly.20261118.4890; also reproduced on main at f3b168b

Environment

macOS desktop app; reproduced in Chrome against a dev server

Screenshots, recordings, or supporting files

Recorded on a dev server holding only demo data (a Replay thread). A page reload stands in for the 5-minute absence; both make the client reopen the thread from its disk cache.

Frames right after clicking back in, 100 ms apart: the stale "Working for…" view, then the content gliding up for about 450 ms.

return-before-frames

Quarter speed (left side is main):

return-slide-quarter-speed.mp4

Trace of the scroller's scrollTop per frame after the click: 279 → 281 → 290 → 306 → 337 → 392 → 486 → 601 → … → 1034, with LegendList calling scrollTo({ behavior: "smooth" }) from its keep-at-end handler.

Workaround

None.

Activity

  1. juliusmarminge commented on Nov 19, 2026

    @juliusmarminge
    Member

    A fix for this was proposed in #38765, but when the reported steps were run in the real app the problem did not appear.

    What was run on ba640037e8, the commit before this change:

    On both commits: seeded twelve completed replay turns, opened Long task, started a long replay task, switched to Other work, stayed away for more than five real minutes until Long task showed Done, waited for the sidebar row transition to settle, and clicked Long task. Recorded the return and captured the final position.

    How: Real web app and server on each commit, driven by the scenario runner in Chromium on Linux, 1280×800, dark theme, reduced motion disabled. Fresh isolated databases, identical synthetic history, and the free replay provider. Captures and recordings were inspected before final reporting.

    Could you share the exact steps, what you see, and the version and platform you are on? The pull request is closed for now; the fix is picked up again once the problem can be shown.

  2. added
    needs more info
    on Nov 19, 2026
  3. pouyarezvani commented on Nov 19, 2026

    @pouyarezvani
    ContributorAuthor

    Thanks for running it. I made a mistake in the report: my recordings used a page reload as a stand-in for the 5-minute absence, and those turn out to be different paths. On current main with demo data:

    • Real 9-minute absence, then opening the thread after it shows Done: no slide, same as your run.
    • Same steps with a page reload while away: the stale "Working for…" copy shows, then the view animates to the end through LegendList's smooth keep-at-end.

    I still see the long slide in everyday use of the desktop app (0.1.11-nightly.20261118.4890, macOS), but I don't have reliable steps for it yet. I'll capture it the next time it happens and post the details here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs more info

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions