Skip to content

fix(workflows): port the canvas card icons off lucide-react - #6523

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/canvas-card-house-icons
Aug 11, 2026
Merged

fix(workflows): port the canvas card icons off lucide-react#6523
waleedlatif1 merged 1 commit into
stagingfrom
fix/canvas-card-house-icons

Conversation

@icecrasher321

Copy link
Copy Markdown
Collaborator

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/icons set. next build fails on both files:

sim:build: Module not found: Can't resolve 'lucide-react'
  > 10 | import {
  > 11 |   ArrowLeftRight,
  ...
  > 26 | } from 'lucide-react'

Why nothing caught it

fumadocs-ui pulls lucide-react in for apps/docs, and the install hoists it into apps/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-specifiers exists 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:

lucide house icon
Braces TypeJson curly braces
Hash TypeNumber hash
KeyRound Key round-bow key

The 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 24 viewBox, stroked at the house 1.55. Confirmed exact against zap on 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:

message-square-text    bbox  15.48 x  15.48   center ( 10.25,   9.75)
skip-forward           bbox  12.04 x  13.76   center ( 10.25,   9.75)
sliders-horizontal     bbox  15.48 x   17.2   center ( 10.25,   9.75)
toggle-left            bbox   17.2 x  12.04   center ( 10.25,   9.75)

Verified

  • bun run type-checkapps/sim and packages/emcn clean
  • biome check clean; check:bare-icons and check:icon-paths pass
  • No lucide-react reference left in any source file
  • Rendered all four at 56px against the existing set and at the real 14px meta-row size, light and dark

🤖 Generated with Claude Code

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>
@vercel

vercel Bot commented Aug 11, 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 Aug 11, 2026 2:47am

Request Review

@cursor

cursor Bot commented Aug 11, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Icon import swaps and new SVG components only; no workflow logic, auth, or data handling changes.

Overview
Fixes next build failures where workflow canvas code still imported lucide-react after that dependency was removed from apps/sim — a phantom resolve when docs hoists the package locally.

connection-block-selector and workflow-block now import Search, X, and the meta-row icon set from @sim/emcn/icons. Lucide Braces, Hash, and KeyRound map to existing TypeJson, TypeNumber, and Key.

Four new house icons (MessageSquareText, SkipForward, SlidersHorizontal, ToggleLeft) follow the same geometry/stroke conventions as the rest of packages/emcn, with exports added in icons/index.ts.

Reviewed by Cursor Bugbot for commit 287319a. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR removes undeclared lucide-react usage from workflow canvas cards and switches those call sites to the repository’s declared EMCN icon package.

  • Replaces Lucide imports in the workflow block and connection block selector.
  • Maps three existing glyphs to equivalent EMCN icons.
  • Adds and exports four new house-style SVG icons.

Confidence Score: 5/5

The 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.

Important Files Changed

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

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.

2 participants