mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-16 00:03:02 +00:00
Third CI round, third P1 from the same source. `ResolvedDraftTarget` carried the draft's value alongside its key, so that a body reading the draft it just resolved would not fetch twice. Every reader that merges onto that value can be stale by the time it runs: a tool awaits other work before writing, and the user can edit, save and close the editor in that window. The first two rounds patched `readGlobalDraftValue` — once for the open editor, once for the editor that closed. Codex then found the same bug in the next reader along: `write_flow` restores `inline_script.<id>` placeholders through `getGlobalDraft`, so a body saved during the wait came back as the old code. Worse than before the patches, since the metadata around it was now preserved: the user would see their settings survive and their code silently revert. So the value is gone from the type. A resolved target is a path and a storage key, nothing else, and the two readers below it fetch: the cell if an editor holds one, else the backend. The cost is one request on calls that used to answer from the carried value; three P1s came out of saving it. `addressedDisplayPath` named the item from that value; it now asks the open editor, which answers synchronously and is the only place a name can be fresher than the stored draft anyway. Tests: the placeholder race Codex described, which fails against the previous commit's code. Also drops a comment line the `fresh` removal left restating the sentence above it. 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