Skip to content

fix(audit-sprint-7c): modal Phase 3 — 2 form modals → Dialog primitive - #177

Closed
ejay-dev wants to merge 1 commit into
fix/audit-sprint-4c-modal-primitivesfrom
fix/audit-sprint-7c-form-modals
Closed

fix(audit-sprint-7c): modal Phase 3 — 2 form modals → Dialog primitive#177
ejay-dev wants to merge 1 commit into
fix/audit-sprint-4c-modal-primitivesfrom
fix/audit-sprint-7c-form-modals

Conversation

@ejay-dev

Copy link
Copy Markdown
Owner

Summary

Modal-audit agent flagged 7 form modals for migration. This PR ships 2 of the cleanest as proof; the other 5 have heavier opinionated styling that warrants per-modal decisions and screenshot review — deferred.

Base branch: fix/audit-sprint-4c-modal-primitives (PR #167).

Migrated

File Before After
components/integrations/integration-config-dialog.tsx Ad-hoc fixed inset-0 bg-slate-950/70, "Integration Config" cyan eyebrow, rounded-3xl Shared Dialog + DialogContent/Header/Footer; neutral surface
components/registers/add-certification-modal.tsx Blue→indigo→cyan gradient header badge + submit button, rounded-[2rem] Shared Dialog, neutral surface

Both gain: focus trap, ESC, aria-modal, scroll lock, sonner-mounted z-index from Sprint 6b.

Visual change is real

Both modals lose their bespoke gradient/rounded chrome in favour of the neutral Dialog defaults. This is intentional per the stored "enterprise aesthetic over AI feel" preference and the modal-audit finding that explicitly flagged both as cyan-glow offenders. After-merge screenshot review recommended.

Deferred to follow-up PRs (heavier per-modal decisions)

  • components/team/invite-modal.tsx — white-bg modal needs a deeper light/dark decision before mechanical swap
  • components/team/invite-button.tsx — overlaps with invite-modal
  • components/vault/upload-artifact-modal.tsx — file-upload complexity + a duplicated overlay block the agent flagged as a bug
  • components/vault/credential-inspector-modal.tsx
  • components/compliance-system/plan-activation-flow.tsx — state-machine flow, not a single-screen form

Validation

  • npm run type-check clean
  • npm run lint 0 errors, 18 warnings (baseline)
  • npx jest 5319/5334 pass (no test changes)

Test plan

  • /app/settings/integrations → click Connect on any integration → Dialog opens centered, focus on first field, ESC dismisses, no cyan eyebrow
  • /app/registers → click Record Certification → same Dialog UX, no gradient chrome

🤖 Generated with Claude Code

Modal-audit agent flagged 7 form modals for migration to the Sprint 4c
Dialog primitive. This PR migrates 2 of the cleanest ones as proof; the
other 5 have heavier opinionated styling (white-bg invite modal,
gradient-header vault uploads, etc) that warrant per-modal styling
decisions and screenshot review — deferred to follow-up PRs.

Migrated
  - components/integrations/integration-config-dialog.tsx (~30 LoC
    net trim): swap fixed inset-0 + bg-slate-950/70 wrapper for
    Dialog/DialogContent. Strip "Integration Config" cyan eyebrow and
    rounded-3xl outer chrome per the stored enterprise-aesthetic
    preference. Gain focus trap, ESC, aria-modal, scroll lock.
  - components/registers/add-certification-modal.tsx (~30 LoC net
    trim): same migration. Strip the blue→indigo→cyan gradient header
    badge + submit-button gradient + rounded-[2rem] surface. UI now
    matches the rest of the new primitives — neutral slate dark
    surface, no chrome.

Visual change is real
  Both modals lose their bespoke gradient/rounded styling in favour of
  the neutral Dialog defaults. This is intentional per the stored
  "enterprise aesthetic over AI feel" preference and the modal-audit
  finding that flagged both as cyan-glow offenders. After-merge
  screenshot review recommended.

Deferred to follow-up PRs (heavier per-modal decisions)
  - components/team/invite-modal.tsx (white-bg modal, rounded-[2rem]) —
    can't mechanically swap to dark Dialog default without a deeper
    light/dark decision
  - components/team/invite-button.tsx (overlapping concern with above)
  - components/vault/upload-artifact-modal.tsx (file-upload complexity +
    duplicated overlay block the agent flagged as a bug)
  - components/vault/credential-inspector-modal.tsx
  - components/compliance-system/plan-activation-flow.tsx (state-machine
    flow, not a single-screen form)

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
  - Browse /app/settings/integrations, click any Connect button →
    Dialog opens centered with focus on first field, ESC dismisses,
    no cyan eyebrow
  - Browse /app/registers (staff register), click Record Certification
    → same Dialog UX, no gradient chrome

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 23, 2026 16:18
@vercel

vercel Bot commented May 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
forma-os Ready Ready Preview, Comment May 23, 2026 4:22pm

Request Review

@coderabbitai

coderabbitai Bot commented May 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 481a543e-3127-4a45-97eb-d99c8d001ee7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/audit-sprint-7c-form-modals

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates two form modals from custom “fixed inset-0” overlays to the shared Radix-based Dialog primitive introduced in the modal primitives work, aligning these surfaces with consistent a11y behavior and neutral styling.

Changes:

  • Migrated AddCertificationModal to Dialog/DialogContent/DialogHeader/DialogFooter, removing bespoke gradient/chrome.
  • Migrated IntegrationConfigDialog to the shared Dialog primitive and simplified the header/close affordances.
  • Added audit header comments describing the migration context.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
components/registers/add-certification-modal.tsx Replaced ad-hoc overlay modal with shared Dialog and updated layout/styling.
components/integrations/integration-config-dialog.tsx Replaced ad-hoc overlay modal with shared Dialog, reorganized content into header/body/footer.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ejay-dev
ejay-dev deleted the branch fix/audit-sprint-4c-modal-primitives May 23, 2026 16:55
@ejay-dev ejay-dev closed this May 23, 2026
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