Browse Source

fix: hydrate audioInput/videoInput from upstream in executeSelectedNodes

The selected-node runner was treating audioInput and videoInput as no-ops,
so select-executing these nodes with upstream connections wouldn't pull
connected data. Now matches executeWorkflow's hydration logic.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
handoff-20260429-1057
shrimbly 4 months ago
parent
commit
564a255af8
  1. 20
      src/store/workflowStore.ts

20
src/store/workflowStore.ts

@ -1663,10 +1663,24 @@ const workflowStoreImpl: StateCreator<WorkflowStore> = (set, get) => ({
switch (node.type) {
case "imageInput":
case "audioInput":
case "videoInput":
// Data source nodes - no execution needed
// Data source node - no execution needed
break;
case "audioInput": {
// If audio is connected from upstream, use it (connection wins over upload)
const audioInputs = get().getConnectedInputs(node.id);
if (audioInputs.audio.length > 0 && audioInputs.audio[0]) {
get().updateNodeData(node.id, { audioFile: audioInputs.audio[0] });
}
break;
}
case "videoInput": {
// If video is connected from upstream, use it (connection wins over upload)
const videoInputs = get().getConnectedInputs(node.id);
if (videoInputs.videos.length > 0 && videoInputs.videos[0]) {
get().updateNodeData(node.id, { video: videoInputs.videos[0] });
}
break;
}
case "glbViewer":
await executeGlbViewer(executionCtx);
break;

Loading…
Cancel
Save