Skip to content

feat(review): detect PR updates and prompt refresh #492

Closed as duplicate

Description

@backnotprop

Problem

When reviewing a PR, the review session captures headSha at launch time. If the PR is updated (new commits pushed) while the review is open:

  1. Submitting comments fails with HTTP 422 — GitHub rejects the review because commit_id doesn't match the current PR head
  2. The diff is stale — the reviewer is looking at an old version of the code
  3. There's no indication that the PR has changed

Proposed Solution

Poll the PR head SHA periodically (or use GitHub webhooks if available) and show an indicator in the header when the PR has been updated since the review was launched. Offer a "Refresh" action that re-fetches the diff, file contents, and PR context.

Considerations:

  • Polling interval (every 30-60s?)
  • What happens to in-progress annotations when refreshing?
  • Should the worktree (--local) be updated too?
  • Could also update headSha on refresh so comment submission works again

Context

Discovered during PR #491 development — pushed a fix commit while a review was open, then got a 422 when trying to submit comments.

Activity

  1. backnotprop commented on Jun 13, 2026

    @backnotprop
    OwnerAuthor

    Thanks for the report. I am consolidating the older backlog so related work has one current tracking issue.

    This specific request is now tracked in #908 as part of the review freshness and VCS correctness work. During the June 13, 2026 older-than-two-month triage, I copied the relevant requirement from this issue into #908 and explained why it belongs with the related work.

    I am closing this older issue so the backlog points at the current tracking issue. If there is a newer reproduction or a detail that is missing from #908, please comment there.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions