-
Notifications
You must be signed in to change notification settings - Fork 263
feat(review): detect PR updates and prompt refresh #492
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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_iddoesn'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
headShaon 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request