ack comments

This commit is contained in:
waleed
2026-01-27 14:38:38 -08:00
parent 37dbfe393a
commit 08bad4da9f
2 changed files with 15 additions and 3 deletions

View File

@@ -2188,10 +2188,9 @@ const WorkflowContent = React.memo(() => {
selected: selectedIds.has(node.id),
}))
})
}, [derivedNodes, blocks, pendingSelection, clearPendingSelection, syncPanelWithSelection])
}, [derivedNodes, blocks, pendingSelection, clearPendingSelection])
// Phase 2: When displayNodes updates, check if pending zoom blocks are ready
// (Phase 1 is located earlier in the file where pendingZoomBlockIdsRef is defined)
useEffect(() => {
const pendingBlockIds = pendingZoomBlockIdsRef.current
if (!pendingBlockIds || pendingBlockIds.size === 0) {

View File

@@ -615,7 +615,20 @@ export const useWorkflowStore = create<WorkflowStore>()(
options?: { updateLastSaved?: boolean }
) => {
set((state) => {
const nextBlocks = workflowState.blocks || {}
const incomingBlocks = workflowState.blocks || {}
const nextBlocks: typeof incomingBlocks = {}
for (const [id, block] of Object.entries(incomingBlocks)) {
if (block.data?.parentId && !incomingBlocks[block.data.parentId]) {
nextBlocks[id] = {
...block,
data: { ...block.data, parentId: undefined, extent: undefined },
}
} else {
nextBlocks[id] = block
}
}
const nextEdges = filterValidEdges(workflowState.edges || [], nextBlocks)
const nextLoops =
Object.keys(workflowState.loops || {}).length > 0