mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-21 00:02:30 +00:00
FlowEditor unmounts and remounts on two same-flow transitions:
- /flows/add → /flows/edit/{path} when the first save promotes the draft
- /flows/edit/{path} → /flows/edit/{same path}?selected=... on a save-draft
refresh / selected-step query change
In both cases onDestroy ran saveAndClear() + changeMode(NAVIGATOR), wiping a
FLOW-mode conversation the user is still actively having about the very flow
they're still editing.
A beforeNavigate guard sets preserveChatOnDestroy when the destination is the
same flow (or the add→edit promotion), so onDestroy keeps the chat; the fresh
onMount detects mode is still FLOW and skips the clearing saveAndClear. Cross-
flow / leave-editor navigation is unaffected and still clears as before.
Co-Authored-By: Claude Opus 4.7 <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