Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(deploy): skip expensive state merge when deployedState is null
Avoid running mergeSubblockStateWithValues on every render for
non-deployed workflows where changeDetected always returns false.
  • Loading branch information
waleedlatif1 committed Mar 16, 2026
commit 71e604e58555dcec8ca640d63f539ea462eff8d4
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export function useChangeDetection({
const needsClientFallback = serverNeedsRedeployment === undefined && !isServerLoading

const currentState = useMemo((): WorkflowState | null => {
if (!needsClientFallback || !workflowId) return null
if (!needsClientFallback || !workflowId || !deployedState) return null

const mergedBlocks = mergeSubblockStateWithValues(blocks, subBlockValues ?? {})

Expand All @@ -112,6 +112,7 @@ export function useChangeDetection({
}, [
needsClientFallback,
workflowId,
deployedState,
blocks,
edges,
loops,
Expand Down
Loading