fix(audit-hotfix): unblock Vercel build — two stale re-exports - #191
Conversation
… 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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughRemoved 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. ChangesToast System Export Cleanup
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
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
Validation
🤖 Generated with Claude Code
Summary by CodeRabbit
ComplianceToastexport removed whileComplianceToastProvideranduseComplianceToastremain available.ToastItemremoved from default export.