From 0fb084b9e402fbc93f4664904f87d69651611bc9 Mon Sep 17 00:00:00 2001 From: Waleed Date: Sat, 13 Dec 2025 17:38:59 -0800 Subject: [PATCH] fix(subflows): prevent cross-boundary connections on autoconnect drop between subflow blocks and regular blocks (#2366) --- .../app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx index de70d6b67e..c28ff8dc27 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx @@ -579,8 +579,10 @@ const WorkflowContent = React.memo(() => { const node = nodeIndex.get(id) if (!node) return false - // If dropping outside containers, ignore blocks that are inside a container - if (!containerAtPoint && blocks[id]?.data?.parentId) return false + const blockParentId = blocks[id]?.data?.parentId + const dropParentId = containerAtPoint?.loopId + if (dropParentId !== blockParentId) return false + return true }) .map(([id, block]) => {