Skip to content

feat: distinct "Approved" state for review-finish modal#427

Merged
tomasz-tomczyk merged 1 commit intomainfrom
approved-modal-state
May 2, 2026
Merged

feat: distinct "Approved" state for review-finish modal#427
tomasz-tomczyk merged 1 commit intomainfrom
approved-modal-state

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

Summary

  • When /api/finish returns approved=true, the waiting modal now shows an animated success-mark (green ring + check), heading "Approved", and conclusive copy instead of the generic spinner. Prompt block and Copy button are hidden in that state — the prompt is still auto-copied to the clipboard so the manual-paste fallback survives silently.
  • prefers-reduced-motion disables the draw animations.
  • Waiting state (unresolved comments) is unchanged.
  • Adds two regression tests for Ctrl+Enter on comment-edit and reply-edit textareas, matching the existing reply-create coverage.

Test plan

  • make e2e — green
  • Approve a review with no comments — see success-mark + "Approved" + conclusive copy
  • Finish a review with unresolved comments — modal still shows spinner + "Waiting for updates"
  • Edit a top-level comment, hit Ctrl+Enter — saves
  • Edit a reply, hit Ctrl+Enter — saves
  • Toggle OS reduced-motion preference — animations disabled, mark still visible

🤖 Generated with Claude Code

The post-finish modal previously showed the same dot spinner and
"Waiting for updates" copy in every case — including approvals where
no further work is expected. This was confusing when a plan was
approved with no comments to process.

When `/api/finish` returns `approved=true`, the modal now switches to
an animated success-mark (green ring + check, drawn one-shot, glow
afterward), heading "Approved", and conclusive copy. The prompt block
and Copy button are hidden in that state — the prompt is still
auto-copied to the clipboard so the manual-paste fallback is preserved
silently. `prefers-reduced-motion` disables the draw animations.

Waiting state (data.approved=false) is unchanged.

Also adds two missing regression tests for Ctrl+Enter on comment-edit
and reply-edit textareas, matching the existing reply-create coverage.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.41%. Comparing base (b270678) to head (7d8632c).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #427      +/-   ##
==========================================
+ Coverage   67.38%   67.41%   +0.03%     
==========================================
  Files          26       26              
  Lines        9747     9747              
==========================================
+ Hits         6568     6571       +3     
+ Misses       2663     2661       -2     
+ Partials      516      515       -1     
Flag Coverage Δ
e2e 34.08% <ø> (+0.21%) ⬆️
unit 63.66% <ø> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tomasz-tomczyk tomasz-tomczyk merged commit 8f94397 into main May 2, 2026
8 checks passed
@tomasz-tomczyk tomasz-tomczyk deleted the approved-modal-state branch May 2, 2026 11:01
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.

1 participant