You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 41b6804
Browse filesBrowse the repository at this point in the historyBrowse files
fix(deploy): compare edge handles by port, not by spelling
Two places answer "does this need redeploying?" and they load their sides
differently. The client diffs the live store against `/api/workflows/[id]/deployed`;
the server diffs the normalized tables against the version's raw jsonb. Only
some of those paths run handles through `loadWorkflowFromNormalizedTables`, so a
snapshot holding a side-anchored id (`source-right`) met a canonical one
(`source`) on the other side and the set comparison read it as every edge being
removed and re-added.
Each answer therefore differed, and they arrive on separate query timelines: the
button reads the client's, the modal badge reads the server's, so the state
flipped between Live and "Update deployment" with whichever query landed last
until both settled.
`normalizeEdge` now canonicalizes both handles, so the comparison cannot tell
two spellings of one port apart no matter how its inputs were loaded. The
existing normalization in `materializeDeploymentState` stays — that path also
feeds React Flow, which needs the handle it mounts to match.
The preview's error port had the mirror problem: it rendered for every
non-trigger block regardless of `errorEnabled`, so a card with no error row grew
a red knob anyway. It now gates the way the editor canvas does, keeping the port
mounted when an error edge already leaves it so React Flow cannot drop that edge.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-workflow/components/block/block.tsx
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-workflow/preview-workflow.tsx
+21Lines changed: 21 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -371,10 +371,28 @@ export function PreviewWorkflow({
371
371
}
372
372
},[workflowState.edges,isValidWorkflowState])
373
373
374
+
/**
375
+
* Blocks that already route failures somewhere, as a content key.
376
+
*
377
+
* Such a block keeps its error port whatever its own flag says — React Flow
378
+
* drops an edge whose handle never mounts. A string rather than a Set so a
379
+
* re-received edges array with the same content does not rebuild every node.
380
+
* The raw handle is safe to test: `normalizeWorkflowEdgeHandles` only rewrites
0 commit comments