From 7d022c131f0df15cae46a4d3532ac583dd429354 Mon Sep 17 00:00:00 2001 From: shrimbly Date: Wed, 15 Apr 2026 19:46:40 +1200 Subject: [PATCH] fix: correct fallback status, clear stale params, and check tutorial fetch - runWithFallback: use "loading" (valid NodeStatus) instead of "running" - WorkflowCanvas: clear fallbackParameters when selecting a new fallback model - workflowStore: add response.ok check before reading tutorial image blob Co-Authored-By: Claude Opus 4.6 --- src/components/WorkflowCanvas.tsx | 1 + src/store/execution/runWithFallback.ts | 2 +- src/store/workflowStore.ts | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/WorkflowCanvas.tsx b/src/components/WorkflowCanvas.tsx index 9c5513aa..cce173e5 100644 --- a/src/components/WorkflowCanvas.tsx +++ b/src/components/WorkflowCanvas.tsx @@ -2499,6 +2499,7 @@ export function WorkflowCanvas() { displayName: model.name, capabilities: model.capabilities, }, + fallbackParameters: {}, }); setFallbackDialogState(null); }} diff --git a/src/store/execution/runWithFallback.ts b/src/store/execution/runWithFallback.ts index e2739aaa..f23fd00b 100644 --- a/src/store/execution/runWithFallback.ts +++ b/src/store/execution/runWithFallback.ts @@ -71,7 +71,7 @@ export async function runWithFallback( // Clear error state and stale output, show the fallback is now running. updateNodeData(nodeId, { ...clearOutput, - status: "running", + status: "loading", error: null, __usedFallback: true, __fallbackModelUsed: fallback.displayName, diff --git a/src/store/workflowStore.ts b/src/store/workflowStore.ts index 98980f89..4b326e4b 100644 --- a/src/store/workflowStore.ts +++ b/src/store/workflowStore.ts @@ -1673,6 +1673,7 @@ const workflowStoreImpl: StateCreator = (set, get) => ({ const mockImageUrl = "/tutorial/owl-aviator.png"; try { const response = await fetch(mockImageUrl, { signal }); + if (!response.ok) throw new Error(`Failed to fetch tutorial image: ${response.status}`); const blob = await response.blob(); const reader = new FileReader();