[Bug]: Diff tab loses scroll position when switching threads
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 23k
- Forks
- 5.9k
- Avg merge
- 11h 14m
- Merged PRs (30d)
- 357
Description
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
- Open two agent threads that both have a long diff in the Diff tab.
- In thread A, open the Diff tab and scroll down to a later file or hunk. Leave it there.
- Switch to thread B.
- Switch back to thread A.
Expected behavior
The Diff tab in thread A should restore the last scroll position, so review can continue from the same place.
Actual behavior
The Diff tab jumps back to the top. The previous scroll position is discarded, so a long diff has to be scrolled through again after every thread switch.
This happens while staying on the Diff tab; the trigger is switching threads, not switching right-panel tabs.
Related: #8759 covers losing Diff scroll/fold state when switching to another right-panel tab (Files, Browser, etc.) in the same thread. PR #8826 is open for that path and keys some viewport state by environment/thread, but the thread-switch roundtrip described here is still broken in current use.
Impact
Major degradation or frequent failure
It is consistent and especially painful on long diffs, which are common when reviewing agent work across multiple threads.
Version or commit
Current T3 Code (observed 2026-09-13)
Environment
Linux (Ubuntu 26.04), T3 Code web/desktop UI
Workaround
Stay in one thread until the review is finished, or re-scroll the Diff tab after every switch.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in apps/web by reproducing the Diff tab behavior with two agent threads and a long diff, then trace how the tab handles thread switching and scroll state. Done means returning to thread A restores its previous Diff scroll position without requiring a re-scroll; verify the related right-panel-tab behavior remains separate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 74/100