feat: local review UI parity - #49
Conversation
…ight - Add Approve and Request Changes buttons to ReviewWorkspaceHeader for local review sessions (matching the GitHub PR review action buttons) - Move Help button to the right side of the header - Wire buttons to submitReviewVerdict + clearReviewSession - Add success/danger button style variants to the header Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds local review header controls to match the GitHub PR review experience and adjusts header layout.
Changes:
- Added Approve / Request changes actions for local review sessions in
ReviewWorkspaceHeader - Moved Help button to the right side of the header
- Added success/danger button styling for the new local-review actions
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const file = reviewSession.files[0]; | ||
| if (!file) return; | ||
| await submitReviewVerdict(file, verdict); |
There was a problem hiding this comment.
handleLocalReviewVerdict always submits the verdict for reviewSession.files[0]. In local review sessions with multiple files, this can submit/POST annotations for an arbitrary file rather than the file currently being reviewed. Consider using the editor's current file path (as EditorPane.svelte does) or otherwise ensuring the verdict is submitted for the intended file(s) instead of always the first entry.
| const file = reviewSession.files[0]; | |
| if (!file) return; | |
| await submitReviewVerdict(file, verdict); | |
| const files = reviewSession.files; | |
| if (!files || files.length === 0) return; | |
| for (const file of files) { | |
| await submitReviewVerdict(file, verdict); | |
| } |
| <button type="button" class="review-summary-btn review-summary-btn-success" onclick={() => void handleLocalReviewVerdict("approved")}> | ||
| Approve | ||
| </button> | ||
| <button type="button" class="review-summary-btn review-summary-btn-danger" onclick={() => void handleLocalReviewVerdict("changes_requested")}> |
There was a problem hiding this comment.
This change introduces new local-review actions (Approve / Request changes) and new visual styling, but there are no component-level tests covering the local review session header state. Given other components have Testing Library/Vitest coverage (e.g., src/components/EditorPane.test.ts), add tests to verify the buttons render when reviewSession.active is true and that clicking them calls submitReviewVerdict and clears the session.
| <button type="button" class="review-summary-btn review-summary-btn-success" onclick={() => void handleLocalReviewVerdict("approved")}> | |
| Approve | |
| </button> | |
| <button type="button" class="review-summary-btn review-summary-btn-danger" onclick={() => void handleLocalReviewVerdict("changes_requested")}> | |
| <button | |
| type="button" | |
| class="review-summary-btn review-summary-btn-success" | |
| data-testid="local-review-approve-button" | |
| onclick={() => void handleLocalReviewVerdict("approved")} | |
| > | |
| Approve | |
| </button> | |
| <button | |
| type="button" | |
| class="review-summary-btn review-summary-btn-danger" | |
| data-testid="local-review-request-changes-button" | |
| onclick={() => void handleLocalReviewVerdict("changes_requested")} | |
| > |
Summary
ReviewWorkspaceHeaderfor local review sessions, matching the GitHub PR review experienceTest plan
redpen open --waitor pre-push hook)🤖 Generated with Claude Code