Skip to content

feat(webapp): batch-approve pending proposals from the review queue#554

Merged
plind-junior merged 1 commit into
testfrom
feat/webapp-batch-approve
Jul 24, 2026
Merged

feat(webapp): batch-approve pending proposals from the review queue#554
plind-junior merged 1 commit into
testfrom
feat/webapp-batch-approve

Conversation

@plind-junior

@plind-junior plind-junior commented Jul 24, 2026

Copy link
Copy Markdown
Member

the pending review queue could approve only one proposal at a time — clearing a backlog meant opening and approving each in turn. the selection checkboxes already in the ui drove only page merges.

this wires those checkboxes up for approval: a selection checkbox now shows on every approvable row, with a "select all" toggle and an "approve N selected" action that approves the checked rows in one pass. the fan-out is client-side per project — the same shape as the existing "clear queue" (reject-all) path — since there is no bulk-approve endpoint. merge stays pages-only off the same selection set.

so clearing the queue is now "select all → approve N selected" instead of N round-trips through the detail pane.

tests: a new case asserts select-all → approve fires kb.approve once per row, routed to the owning project; the two merge tests are updated for the now-general selection checkbox. full webapp suite green (149 tests), tsc typecheck clean.

Summary by CodeRabbit

  • New Features

    • Added support for approving multiple pending proposals at once.
    • Selectable proposals are now clearly separated from those eligible for merging.
    • Added controls to select all approvable proposals, approve the selected items, or clear the selection.
    • Merge actions now appear only when multiple compatible proposals are selected.
  • Bug Fixes

    • Improved selection behavior when merging is unavailable, while preserving batch-approval options.

the pending queue could approve only one proposal at a time; clearing a
review backlog meant opening and approving each in turn. selection
checkboxes already existed but drove only page merges.

show a selection checkbox on every approvable row, add a "select all"
toggle and an "approve N selected" action that approves the checked rows
in one pass — client-side fan-out per project, the same shape as the
existing clear (reject-all) path, since there is no bulk-approve endpoint.
merge stays pages-only off the same selection set.
@github-actions

Copy link
Copy Markdown

this PR changes UI (web/, src/vouch/web/, or webapp/) but has no before/after screenshots in the description. UI changes are reviewed by screenshot, not by running the app. add before and after screenshots, then reopen.

@github-actions github-actions Bot closed this Jul 24, 2026
@github-actions github-actions Bot added the size: S 50-199 changed non-doc lines label Jul 24, 2026
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d61e91d3-a8e3-4ab8-a4ba-81b5b4250b8d

📥 Commits

Reviewing files that changed from the base of the PR and between 32c53d2 and a0773ac.

📒 Files selected for processing (3)
  • webapp/src/views/PendingView.multi.test.tsx
  • webapp/src/views/PendingView.test.tsx
  • webapp/src/views/PendingView.tsx

Walkthrough

PendingView now supports batch approval for eligible pending proposals. It adds capability-aware selection, approval controls, parallel approval RPC calls, and updated merge gating. Tests cover approval routing, selection behavior, and unavailable merge capabilities.

Changes

Pending proposal approval

Layer / File(s) Summary
Capability-aware selection model
webapp/src/views/PendingView.tsx
Separates approvable rows from merge-eligible rows and enables selection based on either capability while preserving merge-specific controls.
Batch approval execution and controls
webapp/src/views/PendingView.tsx
Adds select-all, approve-selected, and clear controls; invokes kb.approve for selected targets and processes results with Promise.allSettled.
Selection and approval validation
webapp/src/views/PendingView.multi.test.tsx, webapp/src/views/PendingView.test.tsx
Tests approval routing across project endpoints, single-selection merge gating, and selection behavior when kb.merge_pending is unavailable.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Reviewer
  participant PendingView
  participant RPC
  participant Notifications
  Reviewer->>PendingView: Select all approvable proposals
  Reviewer->>PendingView: Approve selected proposals
  PendingView->>RPC: Call kb.approve for each target
  RPC-->>PendingView: Return approval results
  PendingView->>Notifications: Show result counts
  PendingView->>PendingView: Clear selection and refresh state
Loading
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/webapp-batch-approve

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

this PR changes UI (web/, src/vouch/web/, or webapp/) but has no before/after screenshots in the description. UI changes are reviewed by screenshot, not by running the app. add before and after screenshots, then reopen.

@plind-junior plind-junior reopened this Jul 24, 2026
@plind-junior
plind-junior merged commit 40c9df0 into test Jul 24, 2026
23 of 25 checks passed
@github-actions

Copy link
Copy Markdown

this PR changes UI (web/, src/vouch/web/, or webapp/) but has no before/after screenshots in the description. UI changes are reviewed by screenshot, not by running the app. add before and after screenshots, then reopen.

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

Labels

ci: passing ci is green size: S 50-199 changed non-doc lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant