Files
windmill/frontend/src/lib/components
GuilhemandClaude Opus 4.8 46288b6143 fix(frontend): session Drafts drawer uses raw_app kind for the raw-app diff (#9617)
* fix(frontend): session Drafts drawer uses raw_app kind for the raw-app diff

Follow-up to #9601. DraftDiffDrawer mapped a raw_app row back to `app` before
calling getDraftDiffValues(), but that helper sends `rawApp:true` only for the
exact kind `raw_app` (which a never-deployed raw app needs). With `app` it hit
the normal app endpoint and 404'd instead of rendering the added diff. `raw_app`
isn't in the deploy-kind maps anyway, so just pass the row kind through.

Caught by the Codex auto-review on #9601, which posted after that PR had already
merged (locked conversation), so the fix lands separately here.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(frontend): show friendly draft path + summary for all kinds in session Drafts drawer

A never-deployed app/raw_app is parked at a synthetic `u/.../draft_<uuid>`
storage path with the user's typed name in the draft JSON's `draft_path`; the
Drafts drawer rendered that UUID path. The list endpoint already returns
`draft_path` and `summary` for every kind, but `fetchDrafts` dropped them and
the drawer only had the lazily-derived summary.

Thread both through the shared row: `WorkspaceDiffDrawer` gains optional
`displayPath` (shown in tree/header/search, while `path` stays the storage key
for value-loading, item keys and edit links) and `summary` (preferred over the
value-derived one, shown before the diff loads). `DraftDiffDrawer` populates
them from the draft list (`draft_path ?? path`, `summary`).

Both fields are opt-in via `?? path` / lazy fallback, so ForkDiffDrawer — the
other consumer of the component — is unchanged. The symptom only surfaced for
apps/raw apps because their storage path diverges from the friendly name;
scripts already kept a readable path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(frontend): use friendly display path for single-segment draft tree nodes

buildTree splits displayPathOf(d), but the `< 2 parts` branch still named the
file node from the storage `path` — a draft whose friendly path is a bare name
(no `/`) would show `…/draft_<uuid>` in the sidebar tree. Name it from
displayPathOf(d) too, consistent with the rest of the tree/header/search.

Addresses Codex and claude review nits on #9617.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 17:11:01 +02:00
..
2026-06-15 10:23:16 +02:00
2026-04-07 21:03:06 +00:00
2026-06-15 10:23:16 +02:00
2026-03-05 18:11:40 +01:00
2025-10-30 06:47:26 +00:00
2025-10-28 17:52:04 +00:00
2026-03-05 18:11:40 +01:00
2026-04-07 21:03:06 +00:00
2025-12-16 21:16:42 +00:00
2025-11-04 19:13:09 +00:00
2025-11-29 01:23:47 +00:00
2026-03-05 18:11:40 +01:00
2025-11-04 19:13:09 +00:00
2026-02-17 12:48:58 +00:00
2026-02-11 06:27:21 +00:00
2026-02-19 09:33:33 +00:00
2025-11-29 01:23:47 +00:00
2026-03-05 18:11:40 +01:00
2026-02-19 09:33:33 +00:00
2026-03-05 18:11:40 +01:00
2026-03-05 18:11:40 +01:00