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:
- Submitting comments fails with HTTP 422 — GitHub rejects the review because
commit_id doesn't match the current PR head
- The diff is stale — the reviewer is looking at an old version of the code
- 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.
Problem
When reviewing a PR, the review session captures
headShaat launch time. If the PR is updated (new commits pushed) while the review is open:commit_iddoesn't match the current PR headProposed 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:
headShaon refresh so comment submission works againContext
Discovered during PR #491 development — pushed a fix commit while a review was open, then got a 422 when trying to submit comments.