From 58c2972bc6560c8fd59d41aa061018fda7f637c8 Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Sun, 18 Oct 2026 23:39:20 +1100 Subject: [PATCH] fix(ui): draw no run state on the canvas for a run without a pinned definition --- ui/src/workflows/WorkflowEditor.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ui/src/workflows/WorkflowEditor.vue b/ui/src/workflows/WorkflowEditor.vue index 3fc1f01dc..648f5089c 100644 --- a/ui/src/workflows/WorkflowEditor.vue +++ b/ui/src/workflows/WorkflowEditor.vue @@ -85,7 +85,11 @@ const localError = ref(""); const { runs, error: runsError, loading: runsLoading, watched, watchedRun, stages, attempt, pick, follow, refresh } = useWorkflowRuns(selected); const stepTab = ref("definition"); -const graph = computed(() => withRuns(workflowGraph(yaml.value), stages.value)); +// A run without a pinned definition cannot be matched to the drawn steps, so +// the canvas draws the definition alone. +const unpinned = computed(() => Boolean(watchedRun.value && !watchedRun.value.workflow_definition_yaml)); +const drawnStages = computed(() => unpinned.value ? [] : stages.value); +const graph = computed(() => withRuns(workflowGraph(yaml.value), drawnStages.value)); function toggle(key: string): void { open.value = open.value === key ? null : key; const run = graph.value.nodes.find((node) => JSON.stringify(node.data.path ?? null) === open.value)?.data.run; @@ -445,7 +449,7 @@ function syncScroll(event: Event): void {

Could not load recent runs: {{ runsError }}

-

No workflow snapshot was recorded for this run.

+

No workflow snapshot was recorded for this run.

@@ -459,7 +463,7 @@ function syncScroll(event: Event): void { class="h-auto min-h-0 flex-1" :inert="archieWorking" :yaml="yaml" - :stages="stages" + :stages="drawnStages" :open="open" :triggers="triggers" :types="stepTypeNames"