feat: show multi-PR review status#397
Conversation
d66c60f to
19d895b
Compare
d0e994d to
0b5963c
Compare
19d895b to
58426b8
Compare
9bc1b58 to
5cf6314
Compare
58426b8 to
e9a97f3
Compare
64be09f to
2bf91d4
Compare
e9a97f3 to
7520adc
Compare
d263a56 to
6524140
Compare
7520adc to
46879fc
Compare
d34243b to
a5403ac
Compare
46879fc to
b45f263
Compare
f30d6dc to
eba6186
Compare
neversettle17-101
left a comment
There was a problem hiding this comment.
AO review — feat: show multi-PR review status
Verdict: Approve (ready to merge; only minor nits).
This is a clean frontend follow-up to the multi-PR backend change. ReviewsView now renders the new PRReviewState[] from the API: a single reviewer header card (harness + PR count + run/terminal actions) over a per-PR list of ReviewStateCards driven by the server-computed status enum (needs_review/running/up_to_date/changes_requested/ineligible). The latestReview/client-side verdict-derivation logic is correctly removed in favor of the backend's status, the refetch poll keeps running while any PR is running, and the trigger onSuccess opens the reviewer terminal only when a run was actually started.
Verified locally: tsc --noEmit clean and vitest run SessionInspector.test.tsx → 10/10 pass. Test coverage for the multi-PR rows and the reuse-notice path is good.
No blocking issues. A few nits below.
Nits (non-blocking)
- Pluralization: the header badge renders
{reviewStates.length} PRs, so a single-PR session shows "1 PRs". Consider pluralizing. - Status derivation for the header harness now picks the first
reviewStatewith alatestRun(PR-number order) rather than the most-recent run as before. Fine in practice since the harness is session-wide, but it's a slight behavior change worth a comment. - Styling consistency:
ReviewStateCardmixes the existing BEMreviewer-card__*classes with Tailwind utilities (mt-2,opacity-70, arbitrarytext-[10.5px]). Matches some existing usage but the fractional-pixel arbitrary value is unusual — a shared token/class would read cleaner per the design-system guidance.
| <Shield aria-hidden="true" /> | ||
| <span>{harness}</span> | ||
| </div> | ||
| <span className="reviewer-status reviewer-status--neutral">{reviewStates.length} PRs</span> |
There was a problem hiding this comment.
{reviewStates.length} PRs renders "1 PRs" for a single-PR session. Consider pluralizing (e.g. ${n} PR${n === 1 ? "" : "s"}).
| } | ||
|
|
||
| const latest = latestReview(reviews); | ||
| const latest = reviewStates.find((review) => review.latestRun)?.latestRun; |
There was a problem hiding this comment.
Header harness now derives from the first reviewState with a latestRun (PR-number order) rather than the most-recent run as the old latestReview() did. Harmless since harness is session-wide, but worth a brief comment so the change of intent is clear.
| Open terminal | ||
| </button> | ||
| ) : null} | ||
| <div className="mt-2 min-w-0 truncate font-mono text-[10.5px] text-passive"> |
There was a problem hiding this comment.
Arbitrary text-[10.5px] (fractional px) mixed with the BEM reviewer-card__* classes. Minor, but a shared token/utility would be more consistent with the design system.
eba6186 to
7dbf25d
Compare
2be6ed1 to
a132ce0
Compare
7dbf25d to
b9c101e
Compare
b9c101e to
7874ae8
Compare
neversettle17-101
left a comment
There was a problem hiding this comment.
AO re-review — feat: show multi-PR review status (frontend)
Verdict: Approve (clean redesign; prior nits addressed, only trivia left).
The Reviews tab now renders a single "review session" card with a per-PR summary list (ReviewStateRow) plus an aggregate verdict badge, driven entirely by the backend's PRReviewState enum. Nicely done:
- My earlier
1 PRspluralization nit is gone — the count chip was replaced by the aggregate verdict / session header. - Client-side verdict derivation stays removed;
reviewVerdict/sessionReviewVerdictmap the server status straight through. runDisabledcorrectly blocks re-triggering while any PR isrunningor when every PR isineligible, and the poll keeps refetching at 2500ms while anything isrunning.- Unused icon imports were cleaned up;
pr.Titleis now surfaced in the row with aPR #nfallback.
Verified locally: tsc --noEmit clean and vitest run SessionInspector.test.tsx → 11/11 pass.
Minor notes (non-blocking)
sessionReviewVerdictreturnsNot runwhen there are eligible PRs that are a mix ofup_to_dateandneeds_review(sinceevery(up_to_date)is false). That's defensible, but a partially-reviewed session reading "Not run" may surprise; consider a "Partially reviewed"/in-progress state if it matters.reviewVerdictcollapses bothneeds_reviewandineligibletoNot run(ineligible rows only differ byopacity-70). Fine as a simplification, but an ineligible PR (draft/closed) reading "Not run" is slightly ambiguous.- Styling now leans on a large set of new BEM classes in
styles.css(reviewer-row*,reviewer-kicker, etc.); worth a quick visual pass against the agent-orchestrator reference per the design-system guidance.
| } | ||
|
|
||
| function reviewVerdict(reviewState: PRReviewState): { | ||
| label: string; |
There was a problem hiding this comment.
When eligible PRs are a mix of up_to_date and needs_review, this falls through to Not run (the every(up_to_date) check fails). Defensible, but a partially-reviewed session showing "Not run" can read as misleading — consider an in-progress/partial label.
neversettle17-101
left a comment
There was a problem hiding this comment.
AO re-review — feat: show multi-PR review status (frontend)
Verdict: Approve.
fix: remove review session label is a small, clean follow-up: the review card header now shows a static "Pull requests" label instead of the worker session id + "review session" subtitle, with the .reviewer-card__session style renamed to .reviewer-card__label and the test updated to assert the old strings are gone. Behavior is otherwise unchanged. tsc --noEmit clean and vitest run SessionInspector.test.tsx → 11/11 pass.
Minor note (non-blocking)
- Removing the identity block leaves
.reviewer-card__nameand.reviewer-card__identityinstyles.css(around lines 1031/1056) with no remaining component references — dead CSS worth dropping in a cleanup.
Summary
Tests
Stacked on #396. Refs #395