Skip to content

fix(audit-hotfix): unblock Vercel build — two stale re-exports - #191

Merged
ejay-dev merged 1 commit into
mainfrom
fix/audit-hotfix-vercel-build
May 23, 2026
Merged

fix(audit-hotfix): unblock Vercel build — two stale re-exports#191
ejay-dev merged 1 commit into
mainfrom
fix/audit-hotfix-vercel-build

Conversation

@ejay-dev

@ejay-dev ejay-dev commented May 23, 2026

Copy link
Copy Markdown
Owner

Summary

Every production Vercel deploy since #167 errored with a type-check failure. Two stale re-exports that local `tsc` didn't reach. Both deletions were made in the audit sprints but the re-export sites were missed.

Root cause

1. `components/compliance-system/index.ts:47`

Re-exports `ComplianceToast` (the bespoke render component). Sprint 7b (PR #188) rewrote `compliance-toast.tsx` as a sonner shim and deleted that component — only `ComplianceToastProvider` + `useComplianceToast` remain.

Vercel error: `Type error: '"./compliance-toast"' has no exported member named 'ComplianceToast'. Did you mean 'useComplianceToast'?`

2. `components/motion/InteractionFeedback.tsx:386`

`export default {}` bundle still lists `ToastItem` as shorthand. Sprint 8b (PR #181) deleted `ToastItem` from the same file.

Why local tsc missed this

`tsconfig.typecheck.json`'s `include` scopes type-checking to a subset of the tree — the barrel + default-export bundle below are out of scope. Vercel's `next build` checks the whole app. Out of scope here but `tsconfig.typecheck.json` should be tightened in a follow-up so Vercel isn't the integration test.

Fix

  • Drop `ComplianceToast` from the barrel re-export (zero external importers — confirmed via grep)
  • Drop `ToastItem` from the default-export bundle (zero importers of the default object reach for it)

Validation

  • `npm run build` green end-to-end (Compiled → TypeScript pass → page tree generated, 0 errors)
  • After merge: Vercel deploy succeeds

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Refactor
    • Updated compliance toast system module exports; ComplianceToast export removed while ComplianceToastProvider and useComplianceToast remain available.
    • Reorganized motion component exports; ToastItem removed from default export.

Review Change Stack

… by local tsc

Every Vercel production deploy since #167 (modal primitives) errored
because two re-exports referenced names that the audit sprints had
deleted from their source files. Local `tsc -p tsconfig.typecheck.json`
didn't catch them because its include list misses the barrel +
default-export bundle below.

What was broken
  1. components/compliance-system/index.ts:47 re-exported
     `ComplianceToast` (the bespoke render component). Sprint 7b
     (PR #188) rewrote compliance-toast.tsx as a sonner shim and
     deleted that component — only ComplianceToastProvider and
     useComplianceToast remain.
  2. components/motion/InteractionFeedback.tsx:386 default-export
     bundle still listed `ToastItem` as a shorthand property after
     Sprint 8b (PR #181) deleted the ToastItem function.

Vercel error excerpt (from dpl_98NHQyUnwGo7CoSxKGTuWbfhoros):
  Type error: '"./compliance-toast"' has no exported member named
  'ComplianceToast'. Did you mean 'useComplianceToast'?

Fix
  - Drop ComplianceToast from the barrel re-export. No external
    importers — confirmed via grep.
  - Drop ToastItem from the default-export bundle. Same — zero
    importers of the default object reach for ToastItem.

Validation
  - npm run build: green end-to-end (Compiled successfully →
    TypeScript pass → page tree generated, 0 errors)

Why local tsc didn't catch this
  - tsconfig.typecheck.json's include list scopes type-checking to a
    subset of the tree. Sprint 4c-onwards needed full-app type
    coverage to catch downstream re-export drift. Out of scope here
    but worth tightening tsconfig.typecheck.json in a follow-up so
    Vercel doesn't have to be the integration test.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 23, 2026 17:13
@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 5:17pm

Request Review

@coderabbitai

coderabbitai Bot commented May 23, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8f40af42-11e5-487a-b665-2f249d1fb8bc

📥 Commits

Reviewing files that changed from the base of the PR and between c8953ac and 735ad0b.

📒 Files selected for processing (2)
  • components/compliance-system/index.ts
  • components/motion/InteractionFeedback.tsx

📝 Walkthrough

Walkthrough

Removed toast-related exports (ComplianceToast and ToastItem) from module barrels following toast system refactoring. Compliance-system now re-exports only ComplianceToastProvider and useComplianceToast with updated documentation; motion/InteractionFeedback no longer exports ToastItem from its default object.

Changes

Toast System Export Cleanup

Layer / File(s) Summary
Compliance toast provider exports
components/compliance-system/index.ts
ComplianceToast export removed from barrel; ComplianceToastProvider and useComplianceToast remain. Added inline audit note documenting the component's reimplementation as a Sonner shim.
Motion InteractionFeedback exports
components/motion/InteractionFeedback.tsx
ToastItem removed from default export object; comment added documenting the removal from the bundle.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • ejay-dev/FormaOS#181: Also modifies components/motion/InteractionFeedback.tsx to remove ToastItem from module exports and updates related motion barrel exports.

Poem

A rabbit hops through exports clean,
Removing toasts from the scene—
Sonner shim takes their place,
Providers and hooks embrace,
The API stays in place, serene. 🥕✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/audit-hotfix-vercel-build

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

@ejay-dev
ejay-dev merged commit 0ddf6bb into main May 23, 2026
21 of 28 checks passed
@ejay-dev
ejay-dev deleted the fix/audit-hotfix-vercel-build branch May 23, 2026 17:14
@ejay-dev
ejay-dev removed the request for review from Copilot May 23, 2026 17:34
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