Uh oh!
There was an error while loading. Please reload this page.
fix(emcn): repair unstyled UI after package extraction - #5258
Conversation
…tion Two regressions from moving emcn into @sim/emcn: 1. optimizePackageImports['@sim/emcn'] rewrote barrel imports to direct subpaths, duplicating the toast module so ToastProvider (layout) and useToast (workspace permissions provider) resolved different ToastContext objects — useToast threw 'must be used within <ToastProvider>' on every workspace route. Removed @sim/emcn from optimizePackageImports. 2. emcn's source left apps/sim's Tailwind content globs (and docs' v4 auto-content scope, which excludes node_modules), so utility classes used only inside emcn components stopped generating and components rendered unstyled. Added the package to apps/sim's Tailwind content and a @source to docs.
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview Workspace routes were failing because Unstyled emcn UI happened because Tailwind stopped scanning Reviewed by Cursor Bugbot for commit 9c5c0d4. Configure here. |
Greptile SummaryThis PR fixes styling and runtime regressions from the EMCN package extraction.
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (2): Last reviewed commit: "fix(emcn): repair app-wide crash and uns..." | Re-trigger Greptile |
Uh oh!
There was an error while loading. Please reload this page.
waleedlatif1
commented
Jun 29, 2026
waleedlatif1
commented
Jun 29, 2026
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 9c5c0d4. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
Summary
Two runtime regressions from the
@sim/emcnextraction (#5257), both invisible to typecheck:optimizePackageImports: ['@sim/emcn']rewrites barrel imports to direct subpaths and, for this barrel, duplicates the toast module — so<ToastProvider>(workspace layout) anduseToast()(workspace permissions provider, rendered on every route) ended up with differentToastContextobjects.useToastthen threwmust be used within <ToastProvider>, which the routeerror.tsxboundaries caught ("Failed to load …"). The simple Button-only error fallback still rendered, which is why the error UI showed. Fix: removed@sim/emcnfromoptimizePackageImports(normal bundling already tree-shakes it; the optimizer is incompatible with the barrel's collision re-exports).apps/sim/components, its source fell outside apps/sim's Tailwindcontentglobs and docs' Tailwind v4 auto-content scope (which excludes node_modules), so utility classes used only inside emcn stopped being generated. Fix: addedpackages/emcn/srcto apps/sim's Tailwindcontentand a@sourceto docs' global CSS.Type of Change
Testing
useToastnull-context throw + the optimizer/module-duplication mechanism). Config-only changes; typecheck unaffected. Verified live against the running app.Checklist