From 9a13bc43ac6bfb017d2eebb7bf0e65a43be6de33 Mon Sep 17 00:00:00 2001 From: Lars Date: Mon, 13 Apr 2026 13:06:53 +0200 Subject: [PATCH] fix: Include node_states from SSE events in frontend result - Add node_states field to finalResult from execution_complete event - Add node_states to execution_failed for partial progress visibility - Remove TODO comment and empty array placeholder - Enables WorkflowDebugPanel to receive actual node data Fixes: Debug panel not appearing due to empty node_states array --- frontend/src/utils/api.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/frontend/src/utils/api.js b/frontend/src/utils/api.js index 205acc2..b944648 100644 --- a/frontend/src/utils/api.js +++ b/frontend/src/utils/api.js @@ -445,13 +445,25 @@ export const api = { execution_id: data.execution_id, status: data.status, aggregated_result: data.aggregated_result, + node_states: data.node_states || [], // Include node_states from SSE debug: { - node_states: [] // TODO: collect from progress events if needed + node_states: data.node_states || [] } } eventSource.close() resolve(finalResult) } else if (data.type === 'execution_failed') { + // Include partial node_states if available + finalResult = { + type: 'workflow', + execution_id: data.execution_id, + status: 'failed', + error: data.error, + node_states: data.node_states || [], + debug: { + node_states: data.node_states || [] + } + } eventSource.close() reject(new Error(data.error || 'Workflow execution failed')) }