mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-11 16:09:39 +00:00
* feat(sessions): persist artifact version selection in preview tabs The artifact viewer's version pin was component-local state, so picking an older version from the history dropdown was lost on reload. It now rides on the preview tab's URL (`artifact:<id>?v=<n>#<name>`), which is persisted with the tab, so a reload lands the reader back on the version they were reading. Omitting a version means "leave the reader where they are", not "show the latest". Every artifact tool re-opens the document it just wrote, so an omitted version that cleared the pin would yank a reader out of the version they chose on every single edit. That rule lives in keptVersion(), which targetUrl() applies to every path that re-points a tab, so open() and navigate() cannot disagree about it — the breadcrumb picker opens highlighting the artifact the active tab already shows, and re-picking it must not double as a reset to latest. A pin belongs to a (tab, artifact) pair, so a tab re-pointed at a different document carries nothing over, and a new tab starts unpinned. Moving off a pin is the reader's own action, through the version dropdown, "Back to latest", or the new pinArtifactVersion(). Since the pin is part of the tab model, get_preview_status now reports it, so the assistant can tell that the reader is not looking at what it just wrote. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(sessions): bound a stamped artifact version to a safe integer Number.isInteger(1e21) is true, but interpolating it yields `?v=1e+21` while parseArtifactRoute matches digits only, so artifactUrl could stamp a url that reads back as null — the one outcome the guard exists to prevent, and one that would persist with the tab. Safe integers always interpolate in decimal. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(artifacts): tell a failed version read apart from a missing version getArtifactVersion swallowed a rejected read and returned undefined, so a transient IndexedDB failure was indistinguishable from a pruned snapshot. Both its callers act on that distinction, and both acted wrongly: the artifact viewer clears the reader's pinned version on absence — now that the pin is persisted with the tab, clearing it destroys it — and read_artifact tells the model the version is gone and to call list_artifact_versions. It now rejects instead. The store still answers for the current version, which it holds in memory and can serve without the DB; anything older propagates, the viewer keeps the pin and leaves the document on screen, and read_artifact reports a read it could not make rather than a version that does not exist. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <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