GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(web): pull request panel polls go around the server's hold by ylcn91 · Pull Request #9491 · pingdotgg/t3code

Conversation

@ylcn91

@ylcn91 ylcn91 commented Sep 3, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

What Changed

apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx: the panel's automatic refresh (the five-minute interval, and the read on returning to the window) now invalidates the pull request on the server before re-reading its detail, the same way the Refresh menu action already does. The invalidation is scoped to that one pull request (bumpRefEpoch), so no listing, viewer, or other pull request is dropped with it. The poll still bumps the diff token that #9496 added, so the code tab re-reads with it.

Rebased on main over #9496, which restructured this block. #9496 refreshes when an agent turn ends; this is the other case #8640 describes: a change arriving from outside a turn (a push from another machine, a check finishing) while the panel sits open, which still reads through the hold.

Why

Fixes #8640.

The server answers an ordinary detail read from what it already holds and refreshes behind the answer (lastGoodDetail.serveHeld(..., "revalidate")). That suits reopening a panel, but a poll exists for what the refresh brings back, and nothing pushes that value to a panel already told the old one. So each automatic read showed the previous read's data, and because polling stops after six idle minutes, a person passively watching CI after a push never got a second read: the panel stayed on the old title or check state until they pressed Refresh. That matches the reporter's reproduction, where the automatic request receives the changed detail and the heading keeps the original title.

The cache comment in PullRequestService states the rule: reads that must not be answered from the hold go through invalidate rather than a flag on the read. The panel's poll is such a read, so it now takes that path. The cost is what the interval already intends to spend, one host read per open panel per tick, and the ten-second minimum interval still bounds the arrival reads.

Verification

Web typecheck and lint on the file. The change is wiring on top of the existing manual-refresh path, so it adds no test of its own.

Then the reporter's reproduction, on today's main and on this branch, in an isolated dev server whose gh is wrapped by a shim that delegates to the real CLI and rewrites title in gh pr view --json answers. The poll is fired by the panel's own live-refresh handler (the return-to-window read); the shim log shows what the host answered, the DOM shows what the panel kept.

panel file host title changed poll reaches host host answers panel heading after the poll
main 10:47:12 10:53:09 new title, 10:53:12 old title at 10:53:16
main, again from a manual Refresh 10:57:57 10:58:38 new title, 10:58:39 previous title at 10:58:45
this branch 10:55:06 10:55:25 new title, 10:55:27 new title at 10:55:31

The two main rows are the issue's log line for line: the automatic request reaches the host and gets the changed detail, the heading keeps the earlier one. The branch row is the same poll answering with what the host just said.

Model and harness: Claude Fable 5.1 in Claude Code.


Note

Low Risk
Small client-side wiring change to refresh semantics for one panel; invalidation is scoped to a single PR reference and reuses the existing manual-refresh command.

Overview
Automatic pull request panel refresh (interval + return-to-window via useLiveRefresh) now invalidates that PR on the server before re-fetching detail, matching the manual Refresh path instead of calling detailQuery.refresh() alone.

Ordinary detail reads can be answered from the server’s held snapshot while a background refresh runs, which left passive viewers stuck on stale titles/checks until they hit Refresh. Polls are wired through a new refreshDetailFromHost callback (invalidate then detail refresh); the menu refresh still invalidates and refreshes detail, activity, and diff via the existing token path. Comments were updated to document poll vs manual behavior.

Reviewed by Cursor Bugbot for commit 9cf9cf649ab9ea95245f3899b64d0e07755db4a5. Configure here.

Note

Fix PullRequestDetailPanel polling to invalidate cached PR data before refresh

The live-refresh (polling) callback in PullRequestDetailPanel.tsx now invalidates the pull-request data for the current environment and reference before re-fetching the detail query. Previously, polling read the existing cached response directly, which kept it stuck on the server's held data. The manual refresh path was already doing this and is unchanged.

Macroscope summarized 9cf9cf6.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Sep 3, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Sep 3, 2026
View reviewed changes
@macroscopeapp

macroscopeapp Bot commented Sep 3, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 9913a15

Macroscope's review found this PR approvable — This one-file change narrowly fixes stale pull-request panel polling by reusing the existing per-request invalidation path before refreshing detail and diff data. Its added host activity is limited to the existing polling cadence and does not affect schemas, defaults, or unrelated pull requests.

You can add or adjust custom eligibility rules. Learn more.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ylcn91
fix(web): pull request panel polls go around the server's hold
9913a15
@ylcn91
ylcn91 force-pushed the fix/pr-panel-live-refresh-bypasses-hold branch from 9cf9cf6 to 9913a15 Compare September 4, 2026 08:03
@macroscopeapp
macroscopeapp Bot dismissed their stale review September 4, 2026 08:04

Dismissing prior approval to re-evaluate 9913a15

@ylcn91

ylcn91 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto main over #9496, which rewrote this block and conflicted. Kept its poll-time bump of the diff token and put the invalidation in front of the poll's detail read, so the poll now does what the Refresh action does minus the activity read.

On why this is still needed after #9496: that change refreshes when an agent turn ends. #8640 is the other case, a push from elsewhere or a check finishing while the panel sits open, and that poll still answers from the hold. I re-ran the reporter's reproduction on today's main and on this branch; the timeline is in the description.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

macroscopeapp[bot]
macroscopeapp Bot approved these changes Sep 4, 2026
View reviewed changes
@lnieuwenhuis lnieuwenhuis mentioned this pull request Sep 4, 2026
fix(web): pull request panel polls go around the server hold #9829
Closed
@juliusmarminge juliusmarminge closed this Sep 7, 2026
@juliusmarminge

juliusmarminge commented Sep 7, 2026

Copy link
Copy Markdown
Member

Closing as part of the open-PR backlog sweep (wave 2).

Reason: Superseded by #9829, which ports this poll-invalidate with tests and is CLEAN
Related: #9829

Reopen if this is still wanted and you’re willing to rebase onto current main.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[Bug]: Pull request detail panel stays stale after automatic refresh

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@ylcn91 @juliusmarminge
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.