fix: Include node_states from SSE events in frontend result
All checks were successful
Deploy Development / deploy (push) Successful in 56s
Build Test / pytest-backend (push) Successful in 4s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 14s

- 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
This commit is contained in:
Lars 2026-04-13 13:06:53 +02:00
parent d3c28a6ee9
commit 9a13bc43ac

View File

@ -445,13 +445,25 @@ export const api = {
execution_id: data.execution_id, execution_id: data.execution_id,
status: data.status, status: data.status,
aggregated_result: data.aggregated_result, aggregated_result: data.aggregated_result,
node_states: data.node_states || [], // Include node_states from SSE
debug: { debug: {
node_states: [] // TODO: collect from progress events if needed node_states: data.node_states || []
} }
} }
eventSource.close() eventSource.close()
resolve(finalResult) resolve(finalResult)
} else if (data.type === 'execution_failed') { } 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() eventSource.close()
reject(new Error(data.error || 'Workflow execution failed')) reject(new Error(data.error || 'Workflow execution failed'))
} }