Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: PR pane code tab periodically auto hard refreshes, making it difficult to review diffs #14483

Closedmadebycaliper(GitHub profile, opens in a new tab) opened this issue 4 comments

Before submitting

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

Area

apps/desktop

Steps to reproduce

  1. Create a PR while working in a session
  2. Open the PR panel
  3. Click the code tab to view the diff
  4. Wait until refresh

note: I tried to reproduce this while writing up the ticket and the behavior (auto-refresh) seems to have stopped. I'm wondering if this reload is triggered only when the PR returns new data and after a while of no changes to the PR, it stops refreshing.

Edit: I think this refresh is caused by changes to the diff while viewing it. When I resumed work on the PR and the agent made changes in the background, it refreshed that pane a few times. I don't know if this is intended behavior – the entire code pane reloads every time the diff changes – but I believe an incremental update to the code pane would be preferable to a full refresh.

Expected behavior

The diff pane should not refresh on its own and remain interactive despite fetching new data from the PR in the background.

Actual behavior

The diff/PR pane does a full refresh. It saves the scroll position but its still really disorienting when trying to read code. (I know I know, I shouldn't be reading code anymore sorry!)

Impact

Minor bug or occasional failure

Version or commit

0.0.44 (451afcb22d93)

Environment

macOs 26.6.2 (25G83) desktop T3 code app 0.0.44 (451afcb22d93)

Logs or stack traces

Screenshots, recordings, or supporting files

No response

Workaround

No response

  1. madebycaliper(GitHub profile, opens in a new tab) added labelsneeds-triage

  2. Note

    Grok responding on behalf of Julius.

    Triage

    Confirmed on 0.0.44 and on current main. This is the shared web pull request panel (desktop just hosts it), and nothing since 0.0.44 changes this path.

    The Code tab isn't on a timer by itself. Two separate signals reuse the Refresh button's token, and that token drops every loaded diff page and shows "Loading pull request diff…", which unmounts the viewer:

    1. Any finished agent turn in the environment. CheckpointReactor calls refreshAfterTurn on turn.completed / turn.aborted, which bumps one environment-wide epoch. PullRequestDetailPanel adds that epoch to the Code tab's refresh token (codeRefreshToken = refreshToken + (turnRefresh ?? 0)). So a turn in this thread, another thread, or even another project tears the diff down when this pull request didn't change. That fits "while working in a session", and it stops when turns stop.
    2. A newer updatedAt on the same pull request. While the window is visible and in use, the details are re-read about every 5 minutes, and the polling stops after about 6 minutes without a click, key, or scroll. If updatedAt changed, the panel bumps the same token and does the full reload. Comments, reviews, and pushes all move updatedAt, not just a new diff. That fits it only happening when the pull request comes back different, and stopping once things go quiet.

    The background fetches are fine. The bug is using them to clear the pages on screen. The diff should stay mounted and interactive, and only replace pages whose patch actually changed.

    Related: open PR #13835 softens the first case only. A finished turn re-reads page one in place and keeps scroll, but an updatedAt change still does the full reload.

  3. juliusmarminge removed labelsneeds-triage

  4. juliusmarminge added labelsvia-triage

  5. ℹ️ Written by GPT-6.1 Sol on behalf of AndreiShenets

    Additional report: refreshes discard in-progress review text and navigation state

    This matches the reported Code-tab refresh/flicker, but the impact is more than visual disruption: in-progress comment/review text disappears, and the active tab and selected file can also be lost.

    Reproduction A: another session updates while a review is in progress

    1. Open a pull request in T3 Code and select its Code tab.
    2. Select a file and start typing a comment or review without submitting it.
    3. While leaving that review open, let another session/thread finish work, update files, or commit.
    4. The Code view flickers/refreshes. The in-progress text disappears, and the previously selected file is not always reopened. The Code tab/file selection can also be reset.

    This is reported with activity in sessions other than the one being reviewed, not only with changes deliberately made in the current review. It is consistent with the environment-wide turn-refresh trigger described in the existing triage, although this report does not independently establish the underlying cause or narrow down workspace/project boundaries.

    Reproduction B: open a file for editing, then return to the PR review

    1. Open the PR's Code tab, select a file, and start typing a comment/review without submitting it.
    2. Open a file for editing.
    3. Return to the same PR review.
    4. The review state is not restored: the Code tab is no longer selected, the previously selected file is no longer selected, and in-progress review text is lost.

    This is a round trip through the file editor, not just switching between Summary, Timeline, and Code within the PR panel.

    Expected behavior

    • Activity in unrelated sessions must not reset, flicker, or interrupt the current review. In particular, an unchanged PR/diff should not be reloaded merely because another session finished work or committed.
    • Files that are not currently being reviewed may refresh in the background without tearing down the active review. A non-disruptive update indicator is sufficient; the existing Changed indicator may already cover this.
    • If the agent changes the very file currently being reviewed, preserve all in-progress comment/review text while surfacing that the file changed. Refreshing the diff must not silently discard the draft.
    • Preserve the selected Code tab and selected file across background updates and when opening a file for editing and returning to the same PR review.

    Impact

    Loss of user-entered review text, in addition to flicker and losing the review location. The original issue currently describes the impact as minor; draft loss makes this substantially more disruptive.

    Environment and scope

    • T3 Code Nightly desktop on Windows, build 26200.9448 (25H2).
    • Installed app executable reports 0.0.46-nightly.20261014.3093.
    • These are user-observed symptoms; the posting agent has not independently reproduced them. Exact frequency and whether every trigger discards every draft have not been measured.

    Related: #13279 covers Viewed-file fold state being lost after leaving/reopening the PR panel. The editor round trip above also loses tab/file selection and in-progress text, so restoring only fold state would not address the full report.

  6. juliusmarminge added labelsneeds more info

  7. juliusmarminge added labelsneeds-julius

  8. @juliusmarminge does it also cover the following use cases?

    • The PR changes while its Code tab is open—for example, a push, comment or review.
    • Another thread finishes while an unfinished inline comment is being typed.
    • A file is opened for editing, then the user returns to the PR review.

    In those cases, are the selected tab/file, scroll position, file expansion and unfinished comment text preserved?

  9. Note

    🤖 Claude Opus 5.5 responding on behalf of Theo

    Thanks for the report. One part of this is fixed on main in #13835. Please test on the nightly built from main on 2026-10-21, or on the next stable release. One part is still open: refreshes on PR updates and loss of draft or selection after opening an editor. If that part still matters to you, please open a new issue for that part only.

  10. juliusmarminge removed labelsneeds more info

Sign in to join this conversation.