Skip to content

Commit 2a8d74c

Browse files
author
GanJiaKouN16
committed
fix: stop marking newly created apps as draft in playground
The atom returned when was null. For ephemeral/newly-created entities (no server baseline), always exists, so every new app was falsely marked as dirty — showing an unexpected "draft" badge on the node name tag in SingleLayout. Change the fallback to : an entity with no server baseline is clean until the user makes actual edits. Fixes #4556
1 parent 1e8500c commit 2a8d74c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • web/packages/agenta-entities/src/workflow/state

web/packages/agenta-entities/src/workflow/state/store.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1623,7 +1623,9 @@ export const workflowIsDirtyAtomFamily = atomFamily((workflowId: string) =>
16231623
const serverData = get(workflowServerDataSelectorFamily(workflowId))
16241624

16251625
if (!serverData) {
1626-
return !!entityData
1626+
// No server baseline (ephemeral / newly created entity) —
1627+
// treat as clean until the user makes actual edits.
1628+
return false
16271629
}
16281630
if (!entityData) return false
16291631

0 commit comments

Comments
 (0)