mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-03 08:02:19 +00:00
fix: keep flow graph rendered between deploy and navigation (#11454)
* fix: keep flow graph rendered between deploy and navigation Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * refactor: rename flow snapshot to avoid shadowing in loadFlow Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
851f6d74c9
commit
c0fb2db244
@@ -96,9 +96,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Discarding the draft after a deploy clears `draftSync.draft` before the
|
||||
// navigation away lands; without this the builder renders an empty flow
|
||||
// for those frames.
|
||||
let flowAtDeploy: Flow | undefined = $state.raw(undefined)
|
||||
|
||||
export const flowStore: StateStore<Flow> = {
|
||||
get val() {
|
||||
return draftSync.draft ?? emptyFlow()
|
||||
return draftSync.draft ?? flowAtDeploy ?? emptyFlow()
|
||||
},
|
||||
set val(v: Flow) {
|
||||
draftSync.draft = v
|
||||
@@ -567,6 +572,7 @@
|
||||
onDeploy={(e) => {
|
||||
// stopSync-bracketed immediate delete; see /scripts/edit's restoreDeployed.
|
||||
if ($workspaceStore) {
|
||||
flowAtDeploy = flowStore.val
|
||||
discardDraftAfterDeploy({
|
||||
workspace: $workspaceStore,
|
||||
itemKind: 'flow',
|
||||
|
||||
Reference in New Issue
Block a user