From 6ce3422f90c999a4251a60a328bdbf0aec7fe536 Mon Sep 17 00:00:00 2001 From: waleed Date: Fri, 19 Dec 2025 13:15:09 -0800 Subject: [PATCH] fix(edges): prevent autoconnect outgoing edges from response block --- .../app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx index 42d3c40419..58dcb95bd3 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx @@ -555,6 +555,7 @@ const WorkflowContent = React.memo(() => { const candidates = Object.entries(blocks) .filter(([id, block]) => { if (!block.enabled) return false + if (block.type === 'response') return false const node = nodeIndex.get(id) if (!node) return false @@ -726,7 +727,9 @@ const WorkflowContent = React.memo(() => { ) { if (existingChildBlocks.length > 0) { // Connect to the nearest existing child block within the container + // Filter out response blocks since they have no outgoing handles const closestBlock = existingChildBlocks + .filter((b) => b.type !== 'response') .map((b) => ({ block: b, distance: Math.sqrt( @@ -2048,7 +2051,9 @@ const WorkflowContent = React.memo(() => { if (existingChildBlocks.length > 0) { // Connect from nearest existing child inside the container + // Filter out response blocks since they have no outgoing handles const closestBlock = existingChildBlocks + .filter((b) => b.type !== 'response') .map((b) => ({ block: b, distance: Math.sqrt(