diff --git a/ui/src/workflows/WorkflowsPage.vue b/ui/src/workflows/WorkflowsPage.vue index 5b5491e0c..0405344ed 100644 --- a/ui/src/workflows/WorkflowsPage.vue +++ b/ui/src/workflows/WorkflowsPage.vue @@ -115,6 +115,10 @@ watch( // it, and the chat's page context tells Archie which workflow is open. watch(selected, (id) => { if (!id || route.query.workflow === id) return; + // A workflow named in the URL but not listed yet is still coming; the + // stand-in selected meanwhile must not replace it. + const wanted = route.query.workflow; + if (typeof wanted === "string" && wanted !== applied && !rows.value.some((row) => row.id === wanted)) return; applied = id; void router.replace({ query: { ...route.query, workflow: id } }); });