mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-06 00:02:13 +00:00
Each builder already had a Ctrl/Cmd+S keybinding routed through a
saveDraft() no-op left over from the LS-era — the comment said
"persistence happens via the page-level UserDraft autosave" but the
shortcut was the user's only way to actually force a save without
waiting for the 1.5s debounce. Restore the intent.
* UserDraftDbSyncer.flush({ workspace, itemKind, path }) — new method
that re-submits whatever's queued in pendingSaveOpts with
immediate: true. No-op when nothing's pending.
* Editor.svelte.flushPendingChanges() — exposes a synchronous
updateCode() with chain reset, so callers can drain Monaco's own
trailing debounce before asking the syncer to flush. Without this
step a Ctrl+S within ~500ms of typing would POST the pre-burst
content.
* ScriptBuilder.saveDraft() — editor?.flushPendingChanges() →
await tick() → UserDraftDbSyncer.flush(). Toast on result.
* FlowBuilder.saveDraft() — no direct Monaco ref (flows have many
per-module editors); just flushes the syncer. Editor.svelte's new
1s max-wait cap means at most the last <1s of typing in a module
Monaco won't be in this POST; it follows in the next autosave
round.
* RawAppEditor.handleKeydown — adds a 's' case that flushes before
the focus guard, so the shortcut fires regardless of where focus
is in the editor pane.
Windmill frontend
The Windmill frontend written in Svelte 5 + Tailwind CSS
The frontend is under AGPL, see the LICENSE file at the root of this repo