fix(workflows): port the canvas card icons off lucide-react - #6523
Conversation
The new workflow block card (#6458) imports 16 icons from `lucide-react`, which #6241 removed from the dependency tree in favour of the in-house `@sim/emcn/icons` set. `next build` fails on both files: Module not found: Can't resolve 'lucide-react' It builds green locally because `fumadocs-ui` pulls lucide-react in for `apps/docs` and the install hoists it into `apps/sim/node_modules`, so dev, `tsc`, and biome all resolve it. Only an install that excludes the docs app — the Docker build — sees it missing. `check-import-specifiers` does not cover this, as it skips bare npm specifiers by design. Eleven of the icons already existed in the house set. Three map onto existing glyphs that are already the same drawing: `Braces` -> `TypeJson` (curly braces), `Hash` -> `TypeNumber` (hash), `KeyRound` -> `Key`. The remaining four are new, ported with the same transform #6241 used — lucide geometry scaled 0.86 and translated so its (12, 12) centre lands on (10.25, 9.75) in a `-1 -2 24 24` viewBox, stroked at the house 1.55. Every icon ported in #6241 sits on that centre; these four measure there exactly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview
Four new house icons ( Reviewed by Cursor Bugbot for commit 287319a. Configure here. |
Greptile SummaryThe PR removes undeclared
Confidence Score: 5/5The PR appears safe to merge with no actionable defects identified. The replacement icon subpath is exported and declared, every imported symbol is available, and the new SVG components satisfy the existing metadata-row rendering and repository icon conventions.
|
| Filename | Overview |
|---|---|
| apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/connection-block-selector/connection-block-selector.tsx | Moves Search and X to the canonical, exported @sim/emcn/icons subpath. |
| apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/workflow-block.tsx | Replaces Lucide metadata icons with compatible EMCN icon components while preserving the existing lookup and rendering contracts. |
| packages/emcn/src/icons/index.ts | Exports all four newly added icons through the package’s public icon barrel. |
| packages/emcn/src/icons/message-square-text.tsx | Adds a MessageSquareText SVG following established EMCN sizing, stroke, accessibility, and prop-forwarding conventions. |
| packages/emcn/src/icons/skip-forward.tsx | Adds a SkipForward SVG following established EMCN icon conventions. |
| packages/emcn/src/icons/sliders-horizontal.tsx | Adds a SlidersHorizontal SVG following established EMCN icon conventions. |
| packages/emcn/src/icons/toggle-left.tsx | Adds a ToggleLeft SVG following established EMCN icon conventions. |
Reviews (1): Last reviewed commit: "fix(workflows): port the canvas card ico..." | Re-trigger Greptile
The break
The new workflow block card (#6458) imports 16 icons from
lucide-react, which #6241 removed from the dependency tree in favour of the in-house@sim/emcn/iconsset.next buildfails on both files:Why nothing caught it
fumadocs-uipullslucide-reactin forapps/docs, and the install hoists it intoapps/sim/node_modules. So dev,tsc, biome, and editor autocomplete all resolve it — a phantom dependency. Only an install that excludes the docs app (the Docker build) sees it missing.check-import-specifiersexists for exactly this "Module not found" class but skips bare npm specifiers by design ("node_modules' business, and flaky on install state"), so this fell through the gap. Worth a follow-up: validating bare specifiers against each workspace's declared deps would close it.The fix
Two files, 16 icons. Eleven already existed in the house set under the same name.
Three map onto existing glyphs that are already the same drawing:
BracesTypeJsonHashTypeNumberKeyRoundKeyThe remaining four are new:
MessageSquareText,SkipForward,SlidersHorizontal,ToggleLeft.How the four were ported
Same mechanical transform #6241 used, reverse-engineered from the icons it ported rather than eyeballed — lucide geometry scaled 0.86 and translated so lucide's (12, 12) centre lands on (10.25, 9.75) in a
-1 -2 24 24viewBox, stroked at the house1.55. Confirmed exact againstzapon all five vertices.Every icon ported in #6241 measures to that centre (21 of 21 sampled, via
getBBox()in a real browser). The four new ones measure there exactly, and their bboxes are exact 0.86 multiples of the lucide originals:Verified
bun run type-check—apps/simandpackages/emcncleanbiome checkclean;check:bare-iconsandcheck:icon-pathspasslucide-reactreference left in any source file🤖 Generated with Claude Code