fix(ui): a workflow link isn't replaced before the list loads

This commit is contained in:
sam committed 2026-11-13 13:56:12 +11:00
1 parent 6d54952cbb
commit 1def83a43f
1 file changed
+4
+4
View File
@@ -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 } });
});