Skip to content

feat(workflow-renderer): extract edge, subflow, and note Views into @sim/workflow-renderer#5263

Merged
waleedlatif1 merged 1 commit into
stagingfrom
feat/workflow-renderer-pkg
Jun 29, 2026
Merged

feat(workflow-renderer): extract edge, subflow, and note Views into @sim/workflow-renderer#5263
waleedlatif1 merged 1 commit into
stagingfrom
feat/workflow-renderer-pkg

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

First step of the shared workflow renderer: a @sim/workflow-renderer package holding pure, props-driven Views that the editor and the (future) docs preview both render.

  • WorkflowEdgeView, SubflowNodeView, NoteBlockView — pure renderers with no store/socket/permission coupling. Each editor node becomes a thin Container that wires stores + permissions and injects the editor-only ActionBar through a slot.
  • Moves the block-dimension constants into the package (dimensions.ts); rewrites the importers to @sim/workflow-renderer.
  • next.config: both @sim/emcn and @sim/workflow-renderer in transpilePackages, neither in optimizePackageImports (avoids the toast-style module duplication). Tailwind scans both package sources.

Visual output is unchanged — the editor renders the same markup; the View is just where it now lives.

Type of Change

  • Refactor (no functional/visual change)

Testing

  • apps/sim typecheck 0 errors; @sim/workflow-renderer + @sim/emcn typecheck 0; monorepo boundaries + biome clean.

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)

@waleedlatif1 waleedlatif1 requested a review from a team as a code owner June 29, 2026 17:56
@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 6:42pm

Request Review

@cursor

cursor Bot commented Jun 29, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Large structural move across canvas rendering and layout math; behavior is intended to be identical but regressions in edges, subflow rings, or note embeds would be user-visible.

Overview
Introduces @sim/workflow-renderer, a workspace package with props-only ReactFlow views (NoteBlockView, SubflowNodeView, WorkflowEdgeView) plus shared BLOCK_DIMENSIONS / CONTAINER_DIMENSIONS / HANDLE_POSITIONS.

Editor note, subflow, and edge components are reduced to containers that read stores and permissions, resolve diff/run/focus state, and pass it into the views—ActionBar still mounts via an actionBar slot. Markdown rendering, media embeds, and subflow chrome move out of note-block.tsx / subflow-node.tsx into the package; SubflowNodeData is exported from the package instead of the app subflows barrel.

apps/sim now depends on the package (lockfile, transpilePackages, Tailwind content scan). Autolayout, canvas helpers, preview handles, and deterministic sizing import dimensions from @sim/workflow-renderer instead of @/lib/workflows/blocks/block-dimensions.

Reviewed by Cursor Bugbot for commit 777ee74. Configure here.

@greptile-apps

greptile-apps Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR moves shared workflow rendering into a new package. The main changes are:

  • New @sim/workflow-renderer package for edge, subflow, and note views.
  • Shared block and container dimension constants exported from the package.
  • Editor and preview code updated to import the shared renderers and dimensions.
  • Next and Tailwind config updated so the new package is transpiled and scanned.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
packages/workflow-renderer/package.json Defines the new renderer package and preserves stylesheet side effects for the note renderer.
packages/workflow-renderer/src/note/note-block-view.tsx Moves the note card and markdown rendering into the shared renderer package.
apps/sim/next.config.ts Adds the shared renderer package to the app transpilation list.

Reviews (4): Last reviewed commit: "feat(workflow-renderer): extract edge, s..." | Re-trigger Greptile

Comment thread packages/workflow-renderer/package.json Outdated
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1 waleedlatif1 force-pushed the feat/workflow-renderer-pkg branch from a670e69 to 460fbf5 Compare June 29, 2026 18:13
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 460fbf5. Configure here.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile re-review — the flagged sideEffects issue was already fixed in the current HEAD before this review; please re-run against 460fbf5af6.

…sim/workflow-renderer

Adds a @sim/workflow-renderer package with pure, props-driven WorkflowEdgeView, SubflowNodeView, and NoteBlockView shared by the editor and (future) docs preview. Moves block-dimensions constants into the package. Each editor node becomes a thin Container that wires stores/permissions and injects the editor-only ActionBar via a slot. No optimizePackageImports for the workspace component packages (avoids the toast-style module duplication); Tailwind scans the package source.
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1 waleedlatif1 force-pushed the feat/workflow-renderer-pkg branch from 460fbf5 to 777ee74 Compare June 29, 2026 18:38
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 777ee74. Configure here.

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