fix(audit-sprint-8a): invite-button → Dialog (resubmit, was #183) - #190
Conversation
Continues the modal Phase 3 migration from Sprint 7c. This PR migrates
components/team/invite-button.tsx — one of the 5 form modals left over
from that pass.
What this PR migrates
- components/team/invite-button.tsx: rewrap the ad-hoc fixed-inset-0
modal as a Dialog/DialogContent. Strip the cyan→indigo→blue
gradient on the trigger button + submit button per the stored
enterprise-aesthetic preference. Add a clean resetState() helper
so close-paths (cancel / esc / outside-click via Dialog) all
converge on the same teardown.
What this PR does NOT migrate (and why)
- components/vault/credential-inspector-modal.tsx — wide
side-by-side layout (iframe preview left + metadata/approval
sidebar right) that's actively used as a workflow surface, not a
typical form modal. A centered Dialog or right-side Sheet would
destroy the side-by-side review pattern. Needs design pass, not
mechanical migration.
- components/team/invite-modal.tsx — light-themed white-bg modal
that would need a deeper light/dark decision before mechanical
swap (Dialog primitive defaults dark).
- components/vault/upload-artifact-modal.tsx — file-upload
complexity + the agent flagged a duplicated overlay block as a
pre-existing bug. Needs investigation before migration.
- components/compliance-system/plan-activation-flow.tsx — multi-
step state-machine flow, not a single-screen form. Different
primitive concern entirely.
Visual change
- Trigger button + submit go from `bg-gradient-to-r from-blue-600
via-indigo-600 to-cyan-500` to neutral `bg-slate-100 text-slate-900`.
Intentional — matches the new primitive style and the audit's
"enterprise aesthetic over AI feel" finding. After-merge
screenshot review recommended for /app/team.
Built on top of fix/audit-sprint-4c-modal-primitives (PR #167) for
the Dialog primitive.
Validation
- tsc -p tsconfig.typecheck.json: clean
- eslint: 0 errors, 18 warnings (baseline)
- jest: 5319/5334 pass (no test changes)
Test plan
- /app/team → click Invite member → Dialog opens centered, ESC
dismisses, focus on email field, role picker tab order works
- Submit invite → success state shows; auto-close after 1.5s on
the email-sent path, sticky with copy-link on manual-share path
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThe PR refactors ChangesDialog Modal Migration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0dcf4fb9dc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| onOpenChange={(o) => { | ||
| if (!o) resetState() | ||
| else setOpen(true) |
There was a problem hiding this comment.
Refresh team state when dialog is dismissed externally
When an invite returns manual_share_required, dismissing the dialog via the built-in Dialog close affordances (top-right X, Escape, or outside click) runs onOpenChange and calls resetState() without router.refresh(). That leaves the Team page using stale server data (pending invite count/limit) until a hard navigation, unlike the explicit Close button path which does refresh. This regression appears in the Dialog migration because those extra close paths did not exist in the previous modal flow.
Useful? React with 👍 / 👎.
♿ Accessibility Test ResultsTests Performed:
Artifacts: Download the accessibility reports from the "Artifacts" section for detailed results. |
Resubmit after base 4c branch deletion. Rebased onto main.
Summary by CodeRabbit