Files
windmill/frontend
Guilhem LemouelandClaude Opus 5 c2067894c4 fix: settle the deployed path before listing, and stop the drafts page guessing
Two findings from a local review round.

`storagePathForChosenName` fetched the workspace-wide draft listing before the
deployed-item check that can answer on its own. A path with nothing staged under
it is the common case — every read of a deployed item — and it now costs one
indexed `exists` instead of a listing carrying a per-row owner aggregate.
A write also no longer refuses when the listing fails but something is deployed
at exactly that path, which is the one case the name is unambiguous anyway.

The drafts page resolved every listed row by chosen name, although the only case
it needs help with is a live editor's staged rename. A legacy row (one with no
owner) has no draft of this user at its path, so the resolution walked on to the
listing and matched an unrelated draft staged under the same name — Discard then
removed that one and left the clicked row. `liveGlobalDraftTarget` follows the
editor rename alone, synchronously, so "Clear all" also stops issuing a request
per row.

Tests: the name rule gains the flow-shaped case, where the name lives in
`draft_path` rather than `value.path`, and `retargetEditorItem` gains one case
per branch. Three `exists` mocks move from a single-use value to a path-scoped
implementation: resolution asks the same question the write's own probe does, so
counting calls made the mock answer the wrong caller, and a test's unconsumed
`getScriptByPath` then leaked into the next one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-25 13:32:05 +02:00
..
…
…
…
…
…
…
…

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