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
This commit is contained in:
parent
d3c28a6ee9
commit
9a13bc43ac
|
|
@ -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'))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user