Skip to content
Open
Changes from all commits
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
2 changes: 1 addition & 1 deletion apps/sim/serializer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ export class Serializer {
position: serializedBlock.position,
subBlocks,
outputs: serializedBlock.outputs,
enabled: true,
enabled: serializedBlock.enabled ?? true,
triggerMode:
Comment on lines 622 to 626
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change will require updating the existing unit test that currently asserts the buggy behavior. apps/sim/serializer/tests/serializer.extended.test.ts has a case (should deserialize enabled status correctly) where enabled: false is expected to deserialize to true; after preserving enabled, it should assert false (and ideally add a separate assertion for the backward-compat default when enabled is missing).

Copilot uses AI. Check for mistakes.
Comment on lines 624 to 626
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SerializedBlock.enabled is currently typed as a required boolean (apps/sim/serializer/types.ts), but deserialization now treats it as optional via serializedBlock.enabled ?? true for backward compatibility. Consider updating the SerializedBlock type (or introducing a versioned/migrated type) so the TypeScript types match the actual data shape coming from persisted workflows.

Copilot uses AI. Check for mistakes.
serializedBlock.config?.params?.triggerMode === true ||
serializedBlock.metadata?.category === 'triggers',
Expand Down
Loading