From 06b01dfe36ac7c4630193d20783694282db50802 Mon Sep 17 00:00:00 2001 From: Diego Imbert Date: Wed, 13 May 2026 15:33:36 +0200 Subject: [PATCH] nit remove comments --- backend/windmill-api-flows/src/flows.rs | 4 +--- backend/windmill-api-scripts/src/scripts.rs | 4 +--- backend/windmill-api/src/apps.rs | 4 +--- frontend/src/lib/components/apps/editor/AppEditor.svelte | 4 ---- 4 files changed, 3 insertions(+), 13 deletions(-) diff --git a/backend/windmill-api-flows/src/flows.rs b/backend/windmill-api-flows/src/flows.rs index 7a6c2aaf1a..8a42bce88e 100644 --- a/backend/windmill-api-flows/src/flows.rs +++ b/backend/windmill-api-flows/src/flows.rs @@ -1480,9 +1480,7 @@ pub struct FlowWDraft { pub extra_perms: serde_json::Value, #[serde(skip_serializing_if = "Option::is_none")] pub draft: Option>>, - /// Timestamp at which the most recent DB draft was created. Used by the - /// frontend's UserDraft staleness check to detect that a teammate (or - /// another tab) pushed a new draft while local autosave was in flight. + /// Timestamp at which the most recent DB draft was created. #[serde(skip_serializing_if = "Option::is_none")] pub draft_created_at: Option>, #[serde(skip_serializing_if = "Option::is_none")] diff --git a/backend/windmill-api-scripts/src/scripts.rs b/backend/windmill-api-scripts/src/scripts.rs index 100352adbd..3237126bba 100644 --- a/backend/windmill-api-scripts/src/scripts.rs +++ b/backend/windmill-api-scripts/src/scripts.rs @@ -93,9 +93,7 @@ pub struct ScriptWDraft { pub tag: Option, #[serde(skip_serializing_if = "Option::is_none")] pub draft: Option>>, - /// Timestamp at which the most recent DB draft was created. Used by the - /// frontend's UserDraft staleness check to detect that a teammate (or - /// another tab) pushed a new draft while local autosave was in flight. + /// Timestamp at which the most recent DB draft was created. #[serde(skip_serializing_if = "Option::is_none")] pub draft_created_at: Option>, pub schema: Option, diff --git a/backend/windmill-api/src/apps.rs b/backend/windmill-api/src/apps.rs index 98b856fcf0..4377f55ed3 100644 --- a/backend/windmill-api/src/apps.rs +++ b/backend/windmill-api/src/apps.rs @@ -217,9 +217,7 @@ pub struct AppWithLastVersionAndDraft { pub draft: Option>>, #[serde(skip_serializing_if = "Option::is_none")] pub draft_only: Option, - /// Timestamp at which the most recent DB draft was created. Used by the - /// frontend's UserDraft staleness check to detect that a teammate (or - /// another tab) pushed a new draft while local autosave was in flight. + /// Timestamp at which the most recent DB draft was created. #[serde(skip_serializing_if = "Option::is_none")] pub draft_created_at: Option>, } diff --git a/frontend/src/lib/components/apps/editor/AppEditor.svelte b/frontend/src/lib/components/apps/editor/AppEditor.svelte index e39b858d67..269ed8c8bd 100644 --- a/frontend/src/lib/components/apps/editor/AppEditor.svelte +++ b/frontend/src/lib/components/apps/editor/AppEditor.svelte @@ -86,10 +86,6 @@ const stateApp = $state(untrack(() => app)) const appStore = writable(stateApp) - // New apps are in-memory only (empty path bypasses localStorage); edits to - // an existing path persist to userdraft/w/{ws}/app/{path}. We register a - // use() handle so subsequent writes go through useLocalStorageValue's - // lastSerialized dedup rather than blindly hitting localStorage each tick. const appDraftPath = newApp ? '' : (path ?? '') const appDraftHandle = UserDraft.use('app', appDraftPath) $effect(() => {