From 1adaeeae9192371e595fa8dd1bf4635f429681a5 Mon Sep 17 00:00:00 2001 From: Ahmed Awan Date: Tue, 24 Feb 2026 14:49:32 -0600 Subject: [PATCH] [25.1] Fix "Create New" in workflow editor not resetting editor state Watch `$route.query` instead of `$route.params` so the handler fires when navigating between `?id=xxx` and no-id query strings. Also increment `editorReloadKey` when entering a new blank workflow so the Editor component is destroyed and re-created (clearing old state), and reset `newWorkflow` to false when loading an existing workflow. Fixes https://github.com/galaxyproject/galaxy/issues/21662 Co-Authored-By: Claude Sonnet 4.6 --- client/src/entry/analysis/modules/WorkflowEditor.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/src/entry/analysis/modules/WorkflowEditor.vue b/client/src/entry/analysis/modules/WorkflowEditor.vue index 8f7ae928299..b216ab27775 100644 --- a/client/src/entry/analysis/modules/WorkflowEditor.vue +++ b/client/src/entry/analysis/modules/WorkflowEditor.vue @@ -29,7 +29,7 @@ export default { }; }, watch: { - "$route.params": { + "$route.query": { handler() { this.getEditorConfig(); }, @@ -50,8 +50,12 @@ export default { const workflowId = this.workflowId || this.storedWorkflowId; if (!workflowId) { this.newWorkflow = true; + if (reloadEditor) { + this.editorReloadKey += 1; + } return; } + this.newWorkflow = false; if (this.workflowId) { const { id: storedWorkflowId } = await getWorkflowInfo(workflowId, this.version, true); this.storedWorkflowId = storedWorkflowId;