mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-19 00:02:03 +00:00
7cb2f4e3a5
A script open in both a session preview and the full-page editor (same tab, same workspace) shares one DraftEntry keyed on (workspace, kind, path). The entry's sync $effect.root was created inside the first-acquiring component (the session); when that component unmounted during nav while the other editor still held the entry, the root stopped being scheduled and autosave silently died. Own every entry's sync effect in one app-lifetime $effect.root (a reactive SvelteSet of active keys -> child roots) so its lifetime is decoupled from any component. Move autosave config (discardIf / canBeDisabled) onto the entry, read live at POST time and applied additively across handles sharing a key (never weakened), so a full-page editor sharing a key a session opened first keeps its discard/toggle behavior regardless of open order. Tear the child root down synchronously in releaseEntry to avoid a stale-root race on same-tick release+re-acquire during SPA nav. Co-Authored-By: Claude Opus 4.8 (1M context) <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