From 5035869a9a3db3840ccc74257c3755f6a091e6fd Mon Sep 17 00:00:00 2001 From: lawrence3699 Date: Sun, 5 Apr 2026 08:52:17 +1000 Subject: [PATCH] fix(serializer): preserve block enabled state during deserialization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The deserializer hardcodes `enabled: true` for regular blocks, ignoring the `enabled` field that was correctly saved during serialization. This causes disabled blocks to silently become re-enabled when a workflow is loaded, imported, or round-tripped through serialize/deserialize. The loop/parallel branch already handles this correctly with `serializedBlock.enabled ?? true` — apply the same pattern to regular blocks. --- apps/sim/serializer/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/sim/serializer/index.ts b/apps/sim/serializer/index.ts index 485b4e3cc2c..e47a33627a9 100644 --- a/apps/sim/serializer/index.ts +++ b/apps/sim/serializer/index.ts @@ -622,7 +622,7 @@ export class Serializer { position: serializedBlock.position, subBlocks, outputs: serializedBlock.outputs, - enabled: true, + enabled: serializedBlock.enabled ?? true, triggerMode: serializedBlock.config?.params?.triggerMode === true || serializedBlock.metadata?.category === 'triggers',