pingdotgg / pingdotgg/t3code

[Bug]: Diff tab loses scroll position when switching threads

Open
#11,571 0 comments 0 reactions 0 assignees View on GitHub

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
  1. Open two agent threads that both have a long diff in the Diff tab.
  2. In thread A, open the Diff tab and scroll down to a later file or hunk. Leave it there.
  3. Switch to thread B.
  4. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.