Browse Source

fix: clear error state when navigating generation carousel

Error overlay persisted on nodes when cycling through history to
previous successful generations. Now resets status/error on carousel
navigation in image, video, and audio generation nodes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
handoff-20260429-1057
shrimbly 4 months ago
parent
commit
a5a1c1dfbd
  1. 4
      src/components/nodes/GenerateAudioNode.tsx
  2. 4
      src/components/nodes/GenerateImageNode.tsx
  3. 4
      src/components/nodes/GenerateVideoNode.tsx

4
src/components/nodes/GenerateAudioNode.tsx

@ -160,6 +160,8 @@ export function GenerateAudioNode({ id, data, selected }: NodeProps<GenerateAudi
updateNodeData(id, {
outputAudio: audio,
selectedAudioHistoryIndex: newIndex,
status: "idle",
error: null,
});
}
}, [id, nodeData.audioHistory, nodeData.selectedAudioHistoryIndex, isLoadingCarouselAudio, loadAudioById, updateNodeData]);
@ -180,6 +182,8 @@ export function GenerateAudioNode({ id, data, selected }: NodeProps<GenerateAudi
updateNodeData(id, {
outputAudio: audio,
selectedAudioHistoryIndex: newIndex,
status: "idle",
error: null,
});
}
}, [id, nodeData.audioHistory, nodeData.selectedAudioHistoryIndex, isLoadingCarouselAudio, loadAudioById, updateNodeData]);

4
src/components/nodes/GenerateImageNode.tsx

@ -357,6 +357,8 @@ export function GenerateImageNode({ id, data, selected }: NodeProps<NanoBananaNo
updateNodeData(id, {
outputImage: image,
selectedHistoryIndex: newIndex,
status: "idle",
error: null,
});
}
}, [id, nodeData.imageHistory, nodeData.selectedHistoryIndex, isLoadingCarouselImage, loadImageById, updateNodeData]);
@ -377,6 +379,8 @@ export function GenerateImageNode({ id, data, selected }: NodeProps<NanoBananaNo
updateNodeData(id, {
outputImage: image,
selectedHistoryIndex: newIndex,
status: "idle",
error: null,
});
}
}, [id, nodeData.imageHistory, nodeData.selectedHistoryIndex, isLoadingCarouselImage, loadImageById, updateNodeData]);

4
src/components/nodes/GenerateVideoNode.tsx

@ -274,6 +274,8 @@ export function GenerateVideoNode({ id, data, selected }: NodeProps<GenerateVide
updateNodeData(id, {
outputVideo: video,
selectedVideoHistoryIndex: newIndex,
status: "idle",
error: null,
});
}
}, [id, nodeData.videoHistory, nodeData.selectedVideoHistoryIndex, isLoadingCarouselVideo, loadVideoById, updateNodeData]);
@ -294,6 +296,8 @@ export function GenerateVideoNode({ id, data, selected }: NodeProps<GenerateVide
updateNodeData(id, {
outputVideo: video,
selectedVideoHistoryIndex: newIndex,
status: "idle",
error: null,
});
}
}, [id, nodeData.videoHistory, nodeData.selectedVideoHistoryIndex, isLoadingCarouselVideo, loadVideoById, updateNodeData]);

Loading…
Cancel
Save