Skip to content

feat: local review UI parity - #49

Merged
sam-phinizy merged 1 commit into
mainfrom
local-review-parity
Mar 29, 2026
Merged

feat: local review UI parity#49
sam-phinizy merged 1 commit into
mainfrom
local-review-parity

Conversation

@sam-phinizy

Copy link
Copy Markdown
Contributor

Summary

  • Adds Approve and Request changes buttons to the ReviewWorkspaceHeader for local review sessions, matching the GitHub PR review experience
  • Moves the Help button to the right side of the header

Test plan

  • Trigger a local review session (redpen open --wait or pre-push hook)
  • Verify Approve / Request changes buttons appear in the header
  • Verify Help button is on the right
  • Verify GitHub PR review header is unchanged

🤖 Generated with Claude Code

…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>
Copilot AI review requested due to automatic review settings March 29, 2026 18:01
@sam-phinizy
sam-phinizy merged commit ccbfa81 into main Mar 29, 2026
9 of 16 checks passed
@sam-phinizy
sam-phinizy deleted the local-review-parity branch March 29, 2026 18:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment on lines +100 to +102
const file = reviewSession.files[0];
if (!file) return;
await submitReviewVerdict(file, verdict);

Copilot AI Mar 29, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Suggested change
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);
}

Copilot uses AI. Check for mistakes.
Comment on lines +230 to +233
<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")}>

Copilot AI Mar 29, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Suggested change
<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")}
>

Copilot uses AI. Check for mistakes.
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.

2 participants