Skip to content

fix(emcn): Calendar icon collision + prism side-effect registration#5261

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/emcn-calendar-icon-collision
Jun 29, 2026
Merged

fix(emcn): Calendar icon collision + prism side-effect registration#5261
waleedlatif1 merged 1 commit into
stagingfrom
fix/emcn-calendar-icon-collision

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Two regressions surfaced after the @sim/emcn extraction (#5257):

  • Calendar icon rendered a date picker (e.g. the Scheduled Tasks header). The barrel resolves the Calendar name-collision to the date-picker component (symmetric with Table). Scheduled-tasks imported Calendar from the barrel but used it as an icon, so it rendered the picker. Routed the icon consumers (scheduled-tasks.tsx, loading.tsx) to @sim/emcn/icons, matching the "icons come from the /icons subpath" convention. Added a barrel note so the component re-export isn't re-introduced.
  • Prism is not defined on page load. The package's new sideEffects: ["**/*.css"] marked code/prism.ts as side-effect-free, but it registers prismjs languages on the global Prism (a real JS side effect). The bundler could drop/reorder its core init. Added code/prism.ts to sideEffects.

Type of Change

  • Bug fix

Testing

  • Calendar fix: apps/sim typecheck clean (0 errors); a comprehensive sweep confirms no remaining collision-named icon (Calendar/Table) is imported from the barrel as an icon. High confidence.
  • sideEffects fix: config-correct (prism.ts genuinely has JS side effects), but it's a bundler-level change that typecheck/static analysis cannot confirm — needs a runtime check on a real build to verify Prism is not defined is gone.

Not in scope (verified NOT emcn-caused)

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

…rve prism side effects

Two post-extraction regressions:

1. The barrel resolves the Calendar name-collision to the date-picker COMPONENT (symmetric with Table). Scheduled-tasks imported Calendar from the barrel but used it as an ICON, so its header rendered a date picker. Route the icon consumers (scheduled-tasks + loading) to @sim/emcn/icons, matching the 'icons come from the /icons subpath' convention.

2. The package's new sideEffects: ['**/*.css'] marked code/prism.ts as side-effect-free, but it registers prismjs languages on the global Prism (a real JS side effect). The bundler could drop/reorder its core init, causing 'Prism is not defined'. Add code/prism.ts to sideEffects so the bundler preserves it.
@waleedlatif1 waleedlatif1 requested a review from a team as a code owner June 29, 2026 16:18
@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Jun 29, 2026 4:22pm

Request Review

@cursor

cursor Bot commented Jun 29, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Targeted import-path and bundler metadata fixes with no auth, data, or API behavior changes.

Overview
Fixes two regressions from the @sim/emcn package split.

Scheduled Tasks header imported Calendar from the main @sim/emcn barrel, which resolves Calendar to the date-picker component (same name collision as Table). The header and loading fallback now import Calendar and Plus from @sim/emcn/icons so the chrome shows the icon, not the picker.

@sim/emcn package.json now lists **/components/code/prism.ts in sideEffects alongside CSS. With only **/*.css marked, the bundler could treat prism language registration as dead code and drop or reorder it, causing Prism is not defined at runtime.

Reviewed by Cursor Bugbot for commit 9417da2. Configure here.

@greptile-apps

greptile-apps Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes two regressions from the EMCN extraction. The main changes are:

  • Scheduled-tasks icon consumers now import from @sim/emcn/icons.
  • The Calendar name collision stays resolved to the date-picker component in the main barrel.
  • The Prism registration module is listed as a JavaScript side effect in packages/emcn.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.
  • The icon subpath exports the changed symbols.
  • The Prism side-effect entry matches the source package layout used by consumers.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/scheduled-tasks/loading.tsx The fallback header icons now come from the EMCN icons subpath.
apps/sim/app/workspace/[workspaceId]/scheduled-tasks/scheduled-tasks.tsx The scheduled-tasks header action icons now use the icon export path.
packages/emcn/package.json The Prism registration file is now marked as side-effectful for bundlers.

Reviews (1): Last reviewed commit: "fix(emcn): resolve Calendar icon/compone..." | Re-trigger Greptile

@waleedlatif1 waleedlatif1 merged commit f5116f4 into staging Jun 29, 2026
17 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/emcn-calendar-icon-collision branch June 29, 2026 16:29
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