mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-08 16:03:27 +00:00
* fix(frontend): open new script/flow/app in AI session without "not found" "Open in AI session" on a never-deployed item opened the session preview against the friendly live-edited path (script.path / $pathStore) instead of the URL draft path the editor loads and saves by, so get-by-path 404'd. It also flushed only queued autosaves, so an untouched new item — which never triggered autosave — had no draft row to load at all. Target the URL draft path (userDraftPath / liveEditorDraftStoragePath; raw-app already used appPath), and add UserDraft.forcePersist to materialize a brand-new draft in beforeOpen, gated to never-deployed items where there is no deployed baseline to discard against. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(frontend): label a new session preview tab by its friendly name A never-deployed item's preview tab read draft_<uuid> instead of the typed/ auto name. The sessions page can't reactively read a runtime cell's state across reactive roots, so the live editor (SessionEditorTarget, handed the runtime as a prop) now stamps a transient friendlyLabel onto the tab model — which the page does observe — via a pure draftFriendlyLeaf helper. Unifies scripts, flows and raw apps through one path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(frontend): address review nits on AI-session open - Flow drawer (FlowEditorDrawer) mounts FlowBuilder with no liveEditorDraftStoragePath, so gating the AI button solely on it hid the session entry point there; fall back to $pathStore (the pre-PR behavior for those deployed-flow drawers) while the main editor still prefers the URL draft path. - Clear a tab's stamped friendlyLabel when it is retargeted, so a draft tab's friendly name no longer lingers after navigating to a plain page. - Trim the repeated persist-hook comments to satisfy the AGENTS.md comment rule. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Ruben Fiszel <ruben@windmill.dev>