fix(canvas): repair React Flow v12 and dependency upgrade regressions - #7355
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThe PR repairs regressions introduced by React Flow v12 and related dependency upgrades.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx | Integrates theme-aware React Flow rendering, manual z-index behavior, nested-node classes, initial dimensions, and measurement-preserving reconciliation. |
| apps/sim/app/workspace/[workspaceId]/w/[workflowId]/utils/workflow-canvas-helpers.ts | Adds the nested-node class identifier and preserves measured dimensions and selection overrides during reconciliation. |
| apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-workflow/preview-workflow.tsx | Applies matching color mode, z-index mode, and nested-node metadata to workflow previews. |
| apps/sim/lib/media/ffmpeg.ts | Restores shared overwrite and stdin flags while retaining output-side seeking for accurate trim starts. |
| apps/sim/next.config.ts | Externalizes pdfjs-dist so its runtime worker resolution remains available after bundling. |
| packages/workflow-renderer/src/canvas-layers.ts | Exposes the manual React Flow z-index mode alongside the shared canvas layer scale. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
Theme[Application theme] --> Mode[Canvas color mode]
Mode --> RF[React Flow mounts]
Layers[Shared canvas z-scale] --> Manual[Manual z-index mode]
Manual --> RF
Derived[Derived workflow nodes] --> Reconcile[Node reconciliation]
Measured[Measured dimensions] --> Reconcile
Selection[Pending selection] --> Reconcile
Reconcile --> RF
Reviews (3): Last reviewed commit: "fix(trigger): keep pdfjs-dist external t..." | Re-trigger Greptile
There was a problem hiding this comment.
All reported issues were addressed across 26 files
Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.
Fix all with cubic | Re-trigger cubic
|
@cubic review |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 26 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.
Re-trigger cubic
Summary
colorModeclass (defaultlight) on the.react-flowwrapper, which cancels everydark:Tailwind utility under our:not(:where(.light, .light *))dark variant — the canvas now derivescolorModefrom the app theme (editor, log preview, and docs previews)zIndexMode: 'basic'adds a parented node's internal z to every touching edge, lifting container edges above the cards they must render behind — all ReactFlow mounts now passzIndexMode={CANVAS_Z_INDEX_MODE}exported beside the z-scale in@sim/workflow-renderermeasuredforward inreconcileCanvasNodes(with a selection override for paste/duplicate) so v12 doesn't wipe handle bounds and re-measure on every node re-derivationwidth/height(fixed inline styles in v12) toinitialWidth/initialHeight, preserving v11 seed-then-measure sizing[data-parent-node-id]CSS hook with an app-stamped.subflow-child-nodeclass in both the editor and preview canvases; drop the inertedgesReconnectableproppdfjs-distinnext.config.tsandtrigger.config.ts— pdf.js resolves its worker via a runtime-relative dynamic import that breaks when bundled (the reasonunpdfwas external before)-y -nostdin(lost with fluent-ffmpeg; an existing output otherwise prompts on an unread stdin pipe and hangs) as sharedFFMPEG_BASE_ARGS, and keeptrimon output-side-ssfor frame-accurate starts--frozen-lockfilefromdocker/realtime.Dockerfile(same pruned-lockfile fix already applied to the app and db images)packages/dbvia newdb:generateand the existingdb:pushscripts (the oldapps/simconfig no longer exists, anddb:pushalso runs the resource-policy reconcile)renderimported from thereact-emailmeta-package, restore the officeparser default-function module shape, stop/demofrom crashing at module scope on a malformed Cal link env var, and align the@next/envpin inpackages/sim-setupType of Change
Testing
Type-check across sim, docs, and workflow-renderer; affected vitest suites (canvas helpers, viewport, ffmpeg, extractor, email boundary, officeparser, demo scheduler, workflow-renderer, docs preview) all green;
bun run lint,check:audits(40/40), andcheck:api-validationpassChecklist