Skip to content

feat: show multi-PR review status#397

Open
neversettle17-101 wants to merge 7 commits into
ao/agent-orchestrator-16/review-multi-pr-backendfrom
ao/agent-orchestrator-16/review-multi-pr-frontend
Open

feat: show multi-PR review status#397
neversettle17-101 wants to merge 7 commits into
ao/agent-orchestrator-16/review-multi-pr-backendfrom
ao/agent-orchestrator-16/review-multi-pr-frontend

Conversation

@neversettle17-101

@neversettle17-101 neversettle17-101 commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • update the Reviews tab to render PR-scoped review state from reviews
  • show per-PR statuses for needed, running, changes-requested, up-to-date, and ineligible reviews
  • use each review row's latestRun for harness/terminal metadata when needed
  • keep one session-level Run needed reviews action and one shared Open terminal action for the reviewer terminal

Tests

  • cd frontend && npm run typecheck
  • cd frontend && npm test -- SessionInspector

Stacked on #396. Refs #395

@neversettle17-101 neversettle17-101 force-pushed the ao/agent-orchestrator-16/review-multi-pr-backend branch 2 times, most recently from d66c60f to 19d895b Compare June 23, 2026 16:13
@neversettle17-101 neversettle17-101 force-pushed the ao/agent-orchestrator-16/review-multi-pr-frontend branch from d0e994d to 0b5963c Compare June 23, 2026 16:15
@neversettle17-101 neversettle17-101 force-pushed the ao/agent-orchestrator-16/review-multi-pr-backend branch from 19d895b to 58426b8 Compare June 24, 2026 08:27
@neversettle17-101 neversettle17-101 force-pushed the ao/agent-orchestrator-16/review-multi-pr-frontend branch from 9bc1b58 to 5cf6314 Compare June 24, 2026 08:30
@neversettle17-101 neversettle17-101 force-pushed the ao/agent-orchestrator-16/review-multi-pr-backend branch from 58426b8 to e9a97f3 Compare June 24, 2026 08:33
@neversettle17-101 neversettle17-101 force-pushed the ao/agent-orchestrator-16/review-multi-pr-frontend branch from 64be09f to 2bf91d4 Compare June 24, 2026 08:35
@neversettle17-101 neversettle17-101 force-pushed the ao/agent-orchestrator-16/review-multi-pr-backend branch from e9a97f3 to 7520adc Compare June 24, 2026 09:10
@neversettle17-101 neversettle17-101 force-pushed the ao/agent-orchestrator-16/review-multi-pr-frontend branch from d263a56 to 6524140 Compare June 24, 2026 09:12
@neversettle17-101 neversettle17-101 force-pushed the ao/agent-orchestrator-16/review-multi-pr-backend branch from 7520adc to 46879fc Compare June 24, 2026 09:32
@neversettle17-101 neversettle17-101 force-pushed the ao/agent-orchestrator-16/review-multi-pr-frontend branch from d34243b to a5403ac Compare June 24, 2026 09:33
@neversettle17-101 neversettle17-101 force-pushed the ao/agent-orchestrator-16/review-multi-pr-backend branch from 46879fc to b45f263 Compare June 24, 2026 12:50
@neversettle17-101 neversettle17-101 force-pushed the ao/agent-orchestrator-16/review-multi-pr-frontend branch 2 times, most recently from f30d6dc to eba6186 Compare June 24, 2026 17:37

@neversettle17-101 neversettle17-101 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 reviewState with a latestRun (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: ReviewStateCard mixes the existing BEM reviewer-card__* classes with Tailwind utilities (mt-2, opacity-70, arbitrary text-[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>

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{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;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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">

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@neversettle17-101 neversettle17-101 force-pushed the ao/agent-orchestrator-16/review-multi-pr-frontend branch from eba6186 to 7dbf25d Compare June 25, 2026 04:56
@neversettle17-101 neversettle17-101 force-pushed the ao/agent-orchestrator-16/review-multi-pr-backend branch from 2be6ed1 to a132ce0 Compare June 25, 2026 04:56
@neversettle17-101 neversettle17-101 force-pushed the ao/agent-orchestrator-16/review-multi-pr-frontend branch from 7dbf25d to b9c101e Compare June 25, 2026 04:57
@neversettle17-101 neversettle17-101 force-pushed the ao/agent-orchestrator-16/review-multi-pr-frontend branch from b9c101e to 7874ae8 Compare June 25, 2026 11:19

@neversettle17-101 neversettle17-101 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 PRs pluralization nit is gone — the count chip was replaced by the aggregate verdict / session header.
  • Client-side verdict derivation stays removed; reviewVerdict/sessionReviewVerdict map the server status straight through.
  • runDisabled correctly blocks re-triggering while any PR is running or when every PR is ineligible, and the poll keeps refetching at 2500ms while anything is running.
  • Unused icon imports were cleaned up; pr.Title is now surfaced in the row with a PR #n fallback.

Verified locally: tsc --noEmit clean and vitest run SessionInspector.test.tsx → 11/11 pass.

Minor notes (non-blocking)

  • sessionReviewVerdict returns Not run when there are eligible PRs that are a mix of up_to_date and needs_review (since every(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.
  • reviewVerdict collapses both needs_review and ineligible to Not run (ineligible rows only differ by opacity-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;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 neversettle17-101 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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__name and .reviewer-card__identity in styles.css (around lines 1031/1056) with no remaining component references — dead CSS worth dropping in a cleanup.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant