Skip to content

fix(web): keep pull request diffs stable during refresh - #457

Merged
incognitojam merged 2 commits into
mainfrom
styal/fix-pr-tab-refresh
Sep 25, 2026
Merged

incognitojam merged 2 commits into
mainfrom
styal/fix-pr-tab-refresh

Conversation

@incognitojam

@incognitojam incognitojam commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

Problem

Finishing an unrelated agent turn could reload an open PR's Code tab. A refresh also hid the diff behind a loading skeleton.

Change

  • Refresh the diff when that PR changes or the reader requests it.
  • Keep the current diff visible while the replacement loads. If the new first page differs, discard old continuation pages before loading more.
  • Pause line-comment actions during the replacement.

Checked

  • On PR fix(project-file): preserve valid values during decoding #286, all eight files stayed visible during refresh. Switching to a commit diff and back worked.
  • On PR ci(nightly): promote verified stack to main on every run #87, a resolved five-comment conversation stayed visible during refresh. With a locally substituted diff response, the Code tab kept the old two-file diff while loading, then showed the new three-file diff and retained the conversation. A real refresh restored the two-file diff.
  • Focused tests passed (113), as did web typecheck, targeted lint and format checks, and ledger validation. No browser or server errors appeared.

An agent turn and an inline conversation on a current hunk were not exercised in the browser.

Evidence

Before/after video: the left side clears during refresh; the right side keeps the diff visible.

Before After
Diff replaced by loading skeleton Diff stays visible during refresh

Written by an agent (Codex, GPT-6).

@incognitojam
incognitojam marked this pull request as ready for review September 25, 2026 11:03
@incognitojam
incognitojam marked this pull request as draft September 25, 2026 11:12
@incognitojam
incognitojam marked this pull request as ready for review September 25, 2026 11:27
@incognitojam
incognitojam merged commit c20e293 into main Sep 25, 2026
27 of 28 checks passed
@incognitojam
incognitojam deleted the styal/fix-pr-tab-refresh branch September 25, 2026 11:51
incognitojam pushed a commit that referenced this pull request Oct 30, 2026
…ingdotgg#19701)

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Julius Marminge <[email protected]>

Fork adaptation: Retain fork stale-check-summary and refresh recovery browser fixtures from 9ad6a0b (the adapted pingdotgg#20901 import), combining them with upstream's read-only PR selection scenarios through the existing liveDetail fixture. Line selection keeps fork #457's refresh guard, so a draft cannot switch from Add to review to Add to agent while the diff refreshes.

(cherry picked from commit ee3a3e8)
Upstream-PR: 19701
Fork-Feature: pull-request-live-refresh, pull-request-required-checks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant