PR review loses its position and file state after updates or returning from the editor#22886

opened17d agobyAAndreiShenets

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

Context

Follow-up to #14483, as requested in this maintainer comment.

This concerns the remaining cases—not simply another thread finishing while the PR stays unchanged, which #13835 addresses.

What happens

I frequently encounter interruptions while reading PR diffs and sending review findings to an agent:

  • If the PR receives new commits, comments, or reviews while I’m reading its Code tab, the view can reload and interrupt my review.
  • If the diff changes while I have particular files expanded or collapsed, those choices can be lost.
  • If I open a file for editing and then return to the PR review, my scroll position, expanded files, or selected commit can be lost.
  • If I type an inline comment, open a file for editing, then return, my unfinished comment and selected lines can disappear, even when the file being reviewed has not changed.

Reproduction flows

PR update while reviewing

  1. Open a PR’s Code tab.
  2. Expand some files, collapse others, and scroll to a review location.
  3. Have an agent push changes to the PR, or add a comment/review.
  4. Continue reviewing and observe whether the view reloads or loses its position and expansion state.

Editor round trip

  1. Open a PR’s Code tab and navigate to a particular file or commit.
  2. Open a file for editing.
  3. Return to the same PR review.
  4. Observe whether the previous review location and file state are restored.

Unfinished comment during an editor round trip

  1. Open a PR’s Code tab, select lines, and start typing an inline comment without submitting it.
  2. Open a file for editing.
  3. Return to the same PR review without changing the file being commented on.
  4. Observe whether the unfinished comment text and selected lines are still present.

Expected behavior

Background updates should not clear the review view. Preserve the reader’s position and expanded/collapsed files where possible.

Returning from the editor should restore the previous review location and selected commit.

If the file being commented on has not changed, returning from the editor should also preserve the unfinished inline comment and selected lines.

I’m not asking to preserve an exact line position when that file itself changes—best-effort preservation is sufficient.

Losing the unfinished comment if that file itself changes is acceptable; relocating comments onto changed code is not required.

Impact

This happens often during my review workflow. Repeatedly finding my place and reopening files makes reviewing and reporting findings to the agent frustrating.

Losing an unfinished inline comment also means losing review findings I have already written.

Environment / verification

Windows desktop, T3 Code Nightly.

These are previously observed symptoms. Reverification on the nightly built from main on 2026-10-21 and a recording are still pending.