Add multi-select and batch Start Review to Review Board#212
Open
dhilgaertner wants to merge 1 commit intomainfrom
Open
Add multi-select and batch Start Review to Review Board#212dhilgaertner wants to merge 1 commit intomainfrom
dhilgaertner wants to merge 1 commit intomainfrom
Conversation
d88efea to
9461d63
Compare
dgershman
approved these changes
Apr 24, 2026
Collaborator
dgershman
left a comment
There was a problem hiding this comment.
Code & Security Review
Critical Issues
None found.
Security Review
Strengths:
- No user-controlled input reaches shell commands or file system operations in the new code — the batch handler only passes PR URL strings from
AppState.filteredReviewRequests(already populated byIssueTrackerfrom GitHub API responses) tosessionService.createReviewSession(prURL:). - Closure captures use
[weak self]consistently, preventing retain cycles. - No secrets or credentials are handled in the changed code.
Concerns:
- None. The new
onBatchStartReviewclosure mirrors the existingonStartReviewpattern, which already validates URLs downstream inSessionService.
Code Quality
Well done:
- Cleanly mirrors the Ticket Board's established multi-select pattern (
isSelectionMode+Set<String>+ batch action bar +selectToggleButton), keeping the two boards consistent. isSelectablecorrectly prevents selecting rows that already have a linked review session.- The
batchActionBarbutton filtersfilteredReviewRequestsbyselectedRequestIDsbefore mapping to URLs, so stale IDs (from requests that disappeared mid-selection) are naturally excluded. - Proper pluralization in the selection count label.
- Selection state is correctly cleared on both Cancel and Start Review actions.
Minor observations (non-blocking):
- If
filteredReviewRequestschanges while in selection mode (e.g., a PR is merged or the exclude-repos list changes),selectedRequestIDsmay contain IDs for rows no longer displayed. The batch action bar count would show the selected count (including invisible ones), but the actual URL list is filtered against currentfilteredReviewRequests— so no incorrect reviews would be started. This matches the Ticket Board's behavior and is acceptable. - The
for url in prURLs { Task { ... } }pattern inAppDelegate(line 229) creates independent, unstructuredTasks for each PR. If the user kicks off a large batch, there's no upper bound. In practice, review request lists are small (low tens), so this is fine. If batch sizes grow, aTaskGroupwith a concurrency limit would be safer — but not needed now.
Summary Table
| Priority | Issue |
|---|---|
| 🟢 Green | Stale selection IDs if review list changes mid-select (benign — filtered at dispatch time) |
| 🟢 Green | Unstructured tasks for batch dispatch (fine for realistic batch sizes) |
Recommendation: Approve — clean, consistent implementation that mirrors the established Ticket Board pattern. No security concerns, no logic errors, and the code is well-structured.
Mirrors the Ticket Board pattern: Select/Cancel header toggle, per-row checkmark indicator with tap-to-toggle, and a batch action bar that fires createReviewSession for each selected PR in parallel. Rows already linked to a review session are non-selectable. Closes #192 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
9461d63 to
310eb75
Compare
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.
Summary
TicketCarddisables rows with an active session.AppState.onBatchStartReviewclosure;AppDelegatefires oneTask { await sessionService.createReviewSession(prURL:) }per selected URL (parallel — each PR clones into its owncrow-reviews/<repo>-pr-<n>directory, so concurrent execution is safe).Closes #192
Test plan
make buildsucceeds.[SessionService] Cloning…).🤖 Generated with Claude Code