From 564a255af861c30ba50d853d961845a7a28eb484 Mon Sep 17 00:00:00 2001 From: shrimbly Date: Tue, 31 Mar 2026 08:03:53 +1300 Subject: [PATCH] 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 --- src/store/workflowStore.ts | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/store/workflowStore.ts b/src/store/workflowStore.ts index 0a6d9f08..da70c153 100644 --- a/src/store/workflowStore.ts +++ b/src/store/workflowStore.ts @@ -1663,10 +1663,24 @@ const workflowStoreImpl: StateCreator = (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;