Repository navigation
Conversation
|
Warning Review limit reachedOnly developers with an assigned seat can use this organization's usage-based review budget, and seats here are assigned manually. Ask an admin to assign a seat, or change the review continuation mode in Billing. Next included review available in 15 seconds. View limit detailsLimit details: You’ve used all 10 included reviews currently available. Review configuration: ⚙️ Run configurationConfiguration used: Repository: pingdotgg/t3code/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Comment |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a localized, tested fix to preserve loaded pull-request diff pages during background updates while retaining the existing manual refresh reset. Its runtime impact is confined to the PR Code tab, with no schema, infrastructure, security, billing, or configuration-sensitive changes. Notes:
You can add or adjust custom eligibility rules. Learn more. |
Dismissing prior approval to re-evaluate 699de7d
Problem
Fixes #14483. Replaces #14513, which was closed for incomplete UI verification; this adds multi-page recordings and fixes the CodeRabbit finding there. The PR panel's Code tab threw away every loaded diff page and showed "Loading pull request diff..." whenever a turn finished anywhere in the environment, or when the pull request's
updatedAtmoved (comments, reviews, pushes). Both background signals reused the Refresh button's token. A reader lost the diff and their scroll position mid-review even when nothing in it changed.Change
The Code tab now takes two tokens:
refreshToken: the Refresh button only. Same hard reset as before.backgroundRefreshToken: finished turns plus newupdatedAtrevisions. Every loaded page stays on screen. The tab re-reads them in order from the first page, and only accepts answers fetched after the refresh began, so a cached page cannot vouch for itself. An unchanged page moves the walk to the next one. A changed page replaces itself and drops the pages after it, since their cursors pointed into the old diff. Loading the next page waits until the walk catches up.The slice reconcile step moved into
reconcileDiffSlicesinpullRequestDiff.logic.tsso it can be tested on its own.This supersedes the turn-only part of #13835 and also covers the
updatedAtpath described in the triage.Verification
Isolated Playwright browser against a worktree dev server with fresh
.t3state. A second tab sent a one-line prompt in an unrelated thread, so a turn completed in the same environment while the Code tab was open.Multi-page: #14215, 476 files across 5 diff pages, all loaded, scrolled near the bottom.
A temporary console trace (removed before commit) confirmed the walk in the after run. Each of pages 1 through 5 first saw its cached answer, refreshed it, then advanced once the fresh answer matched.
Single page: #14497. Before, the diff unmounted to the loading skeleton with "0 files". After, it stayed mounted with no loading state, across repeated turns.
Tests and checks:
vp test run apps/web/src/components/pullRequest/pullRequestDiff.logic.test.ts: 17 passed. The new cases cover appending a page, walking forward through unchanged pages, and replacing a changed later page while dropping the pages after it.Not checked live:
updatedAtpath. It needs a pull request that changes while open, and it uses the same token as the turn path.Unrelated, seen on main too: the first diff read sometimes fails with a 503 when an earlier request is aborted (499) while a shared fetch is in flight. Reloading recovers.
Made with Claude Opus 5.5 in Claude Code (via T3 Code).