Skip to content

✨ feat(dashboard): expose the per-PR review perspective cap in the Review Gate dialog - #7550

Merged
clubanderson merged 1 commit into
v4from
feat/review-max-perspectives-ui
Sep 18, 2026
Merged

clubanderson merged 1 commit into
v4from
feat/review-max-perspectives-ui

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Problem

review.max_perspectives_per_pr shipped in #7528 with no way to set it from the dashboard. The Review Gate section renders require_approval, fan_out, max_parallel_reviews, reviewer_agents, all_authors, acknowledge_no_findings, fixer_agent and human_decision_label — and handleReviewConfigPut accepts exactly those keys. The cap was reachable only by hand-editing YAML, which on a hosted spoke means editing a file the dashboard overlay then rewrites.

So the lever is effectively unavailable on the deployment that needs it most.

Why it matters

Parallel review slots are a fixed budget spent in PR order. Without a cap, the first PR in a deep queue absorbs every slot for its own perspectives — adding reviewers buys more opinions on one PR instead of coverage across many. And now that reviewers publish, that one PR collects every comment at once.

Observed on a bluefin spoke before the cap was reachable: a single PR had accumulated 6 reviews while most of a 480-PR queue had none.

Change

  • max_perspectives_per_pr added to the PUT body, with the same >= 0 validation max_parallel_reviews already uses.
  • Number input in Settings → Features → Review Gate, placed next to Max parallel reviews (the budget it divides).
  • 0 or empty is unchanged: no cap, fan every perspective out at once. No existing hive changes shape.

Tests

TestReviewConfigPut_MaxPerspectivesPerPR covers reject-negative (and that the rejected write does not mutate config), apply, absent-key-leaves-untouched, and explicit-0-clears-the-cap.

  • go build ./... clean
  • go test ./pkg/dashboard/ -run 'TestReviewConfig|Static|Index|Shuffle' pass
  • .github/scripts/check-inline-js.js passes on static/index.html (syntax + no-undef)
  • gofmt clean

…view Gate dialog

review.max_perspectives_per_pr shipped with no way to set it from the
dashboard: the Review Gate section renders require_approval, fan_out,
max_parallel_reviews, reviewer_agents, all_authors,
acknowledge_no_findings, fixer_agent and human_decision_label, and the
PUT handler accepts exactly those keys. The cap was reachable only by
hand-editing YAML, which on a hosted spoke means editing a file the
dashboard overlay then rewrites.

That made the lever effectively unavailable on the deployment that needs
it most. Parallel review slots are a fixed budget spent in PR order, so
without a cap the first PR in a deep queue absorbs every slot for its own
perspectives — adding reviewers buys more opinions on one PR instead of
coverage across many, and that one PR collects every comment at once now
that reviewers publish.

Adds the field to the PUT body with the same >= 0 validation
max_parallel_reviews uses, and a number input to the Review Gate section.
0 or empty is unchanged: no cap, fan every perspective out at once.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Sep 18, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign danathar for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 18, 2026
@clubanderson
clubanderson merged commit 31840e3 into v4 Sep 18, 2026
61 of 64 checks passed
@clubanderson
clubanderson deleted the feat/review-max-perspectives-ui branch September 18, 2026 05:01
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

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

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant