mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-14 00:02:55 +00:00
Round-4 review found a P1 in the previous commit's own fix. Writing the chosen name into the value was right for a script, whose `path` is its name, and wrong for every other kind. A flow keeps the storage key in `path` and its typed rename in `draft_path`, and the editor compares the two: equal means "rename applied", so it deletes `draft_path` on the next autosave (FlowBuilder.svelte, FlowEditorView.svelte:87). A chat edit of a named flow draft therefore cost it its name — the lists fell back to `draft_<uuid>`, a later name-addressed write forked a second draft, and the deploy card reported the key. Both kinds want the same thing, so there is no split to get wrong: keep the path the value already carries, and let only a create take one from the call. That is all the original bug ever was — the addressed path was written over a field that already held the right answer. The deployed-item check moves back behind the drafts listing, where it is reached only once something is staged under the name. Hoisting it ahead of the listing saved a workspace-wide read on the common path, but it put the check on every call and swallowing its failure let a `delete_workspace_item` or `deploy_workspace_item` fall through to a namesake draft. The listing-failure salvage it was added for stays, inside the catch, where a failed probe only means the write is still refused. Tests: the flow case now pins `path` as the storage key, and the suite resets the three deployed-existence mocks per test — `clearAllMocks` keeps implementations, which is what made one test's leftovers answer for the next. Co-Authored-By: Claude Opus 5 (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