Browse Source

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 <noreply@anthropic.com>
handoff-20260429-1057
shrimbly 3 months ago
parent
commit
7d022c131f
  1. 1
      src/components/WorkflowCanvas.tsx
  2. 2
      src/store/execution/runWithFallback.ts
  3. 1
      src/store/workflowStore.ts

1
src/components/WorkflowCanvas.tsx

@ -2499,6 +2499,7 @@ export function WorkflowCanvas() {
displayName: model.name, displayName: model.name,
capabilities: model.capabilities, capabilities: model.capabilities,
}, },
fallbackParameters: {},
}); });
setFallbackDialogState(null); setFallbackDialogState(null);
}} }}

2
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. // Clear error state and stale output, show the fallback is now running.
updateNodeData(nodeId, { updateNodeData(nodeId, {
...clearOutput, ...clearOutput,
status: "running", status: "loading",
error: null, error: null,
__usedFallback: true, __usedFallback: true,
__fallbackModelUsed: fallback.displayName, __fallbackModelUsed: fallback.displayName,

1
src/store/workflowStore.ts

@ -1673,6 +1673,7 @@ const workflowStoreImpl: StateCreator<WorkflowStore> = (set, get) => ({
const mockImageUrl = "/tutorial/owl-aviator.png"; const mockImageUrl = "/tutorial/owl-aviator.png";
try { try {
const response = await fetch(mockImageUrl, { signal }); 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 blob = await response.blob();
const reader = new FileReader(); const reader = new FileReader();

Loading…
Cancel
Save