mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-25 16:02:11 +00:00
d4ecf4b9fd
Rework UserDraft into a purely in-memory two-way sync layer and push every
change to the backend draft table via a new UserDraftDbService.
- userDraft.svelte.ts: no more localStorage, staleness/meta tracking, GC, or
legacy migration. Reactive in-memory cells; the handle setter syncs each edit
through UserDraftDbService (debounced). Callers seed the loaded value with
setInitial() (no write-back); meta/setDraftAndMeta/setMeta kept as inert
shims so non-editor callers compile.
- userDraftDbService.ts (new): save({path, itemKind, content}) maps the kind to
a draft typ (script/flow/app; raw_app→app) and calls createDraft, or
deleteDraft when content is undefined. Debounced; skips kinds without a DB
draft and brand-new items (empty path).
- Remove all draft conflict UX: LocalDraftStaleModal, userDraftToast, the
legacy-migration module, the staleness checks/modals/restore toasts and the
URL-hash sync in the script/flow/app/raw-app editors.
- Drop draft_only everywhere it was read/sent (builders, rows, DraftBadge,
editor headers, list filters include_draft_only, copilot, sessions).
- Editors now load their own value and seed it; edits autosync. "Restore to
deployed" deletes the DB draft explicitly.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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