diff --git a/frontend/src/lib/components/FlowBuilder.svelte b/frontend/src/lib/components/FlowBuilder.svelte index d3376054a7..9a27d2ba01 100644 --- a/frontend/src/lib/components/FlowBuilder.svelte +++ b/frontend/src/lib/components/FlowBuilder.svelte @@ -192,6 +192,7 @@ if (newFlow) { dispatch('saveInitial', $pathStore) } else if (savedFlow?.draft_only && $pathStore !== initialPath) { + initialPath = $pathStore goto(`/flows/edit/${$pathStore}?selected=${getSelectedId()}`) } sendUserToast('Saved as draft') diff --git a/frontend/src/lib/components/ScriptBuilder.svelte b/frontend/src/lib/components/ScriptBuilder.svelte index 0fed12b79b..0e8f4bda83 100644 --- a/frontend/src/lib/components/ScriptBuilder.svelte +++ b/frontend/src/lib/components/ScriptBuilder.svelte @@ -368,7 +368,6 @@ : script.concurrency_key } }) - initialPath = script.path } await DraftService.createDraft({ workspace: $workspaceStore!, @@ -387,6 +386,7 @@ } as NewScriptWithDraft if (initialPath == '' || (savedScript?.draft_only && script.path !== initialPath)) { + initialPath = script.path goto(`/scripts/edit/${script.path}`) } sendUserToast('Saved as draft')