Repository navigation
feat(pr-review): show existing reviews/approvals on the PR at load - #413
Merged
Merged
Conversation
At PR load, surface whether someone has already reviewed it — so you don't
duplicate a review that's already done:
- Approval tally: "X / N approvals" where N is the branch rule's
required_approving_review_count (from branch protection), or just "X
approvals" when that count can't be read. "✓" once it has enough to merge.
- Change requests: a red "✗ Changes requested" chip when a reviewer is blocking.
- Who reviewed: per-reviewer state (approved / changes / commented).
- Discussion comment count.
All read live from GitHub in ONE `gh pr view --json reviewDecision,reviews,
comments,baseRefName` call, plus a best-effort branch-protection lookup for the
required count. Read-only and cheap. Everything degrades gracefully: a private
repo / offline gh / unreadable protection yields {status:null} (or 0 required)
and the strip simply doesn't render — never blocks the page.
Backend: prreview.ReviewStatus + GET /prs/<id>/review-status (browser) and
/api/prs/<id>/review-status (conductor, in the OpenAPI spec). Frontend: a
compact ReviewStatusStrip under the action bar.
Tests: TestAPIPRReviewStatusRoute (graceful null path); OpenAPI drift passes;
prreview + dashboard build & pass; frontend typechecks + builds.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
At PR load, show whether someone has already reviewed/approved it — so you don't redo a review that's already done, and you can see if it's close to mergeable.
A compact strip under the action bar shows:
X / N approvals, where N is the branch rule'srequired_approving_review_count(from branch protection).✓once it has enough to merge. Falls back to justX approvalswhen the required count can't be read.✗ Changes requestedchip when a reviewer is blocking.Is it lightweight? Yes.
One
gh pr view <n> --json reviewDecision,reviews,comments,baseRefNamecall gives the decision, per-reviewer state, and comment count. A second best-effortgh api repos/<repo>/branches/<base>/protectioncall gets the required-approval count.Everything degrades gracefully: a private repo, offline
gh, or unreadable branch protection yields{status:null}(orrequiredApprovals: 0) and the strip simply doesn't render — it never errors or blocks the page.Endpoints
GET /prs/<id>/review-status(browser) andGET /api/prs/<id>/review-status(conductor, in the OpenAPI spec so it's discoverable). Read-only.Tests
TestAPIPRReviewStatusRoute(the graceful-null path, no network needed); OpenAPI drift passes;internal/prreview+internal/dashboardbuild & pass; frontend typechecks + builds.🤖 Generated with Claude Code