From 736dc58d8180f16a2df14a9cdbdc9e9d56f357a0 Mon Sep 17 00:00:00 2001 From: Lars Date: Mon, 13 Apr 2026 15:31:37 +0200 Subject: [PATCH] feat: Show debug info in WorkflowResultViewer Display per node: - debug_prompt (prompt sent to AI) - debug_raw_response (raw AI response) - analysis_core (parsed results) - normalized_signals (decision signals with status) - Failed nodes: red border + red background NO other changes - executeWorkflow still used --- .../workflow/panels/WorkflowResultViewer.jsx | 94 ++++++++++++------- 1 file changed, 59 insertions(+), 35 deletions(-) diff --git a/frontend/src/components/workflow/panels/WorkflowResultViewer.jsx b/frontend/src/components/workflow/panels/WorkflowResultViewer.jsx index 6a596a5..923e961 100644 --- a/frontend/src/components/workflow/panels/WorkflowResultViewer.jsx +++ b/frontend/src/components/workflow/panels/WorkflowResultViewer.jsx @@ -192,13 +192,17 @@ export function WorkflowResultViewer({ result, onClose }) { Node States (Debug)
- {nodeStates.map((node) => ( + {nodeStates.map((node) => { + const hasFailed = node.status === 'failed' + return (
{/* Node Header */} @@ -237,45 +241,65 @@ export function WorkflowResultViewer({ result, onClose }) { {/* Node Details */} {expandedNodes[node.node_id] && (
- {node.output && ( + {/* Error (show first) */} + {node.error && ( +
+
Error:
+
{node.error}
+
+ )} + + {/* Debug Prompt */} + {node.debug_prompt && ( +
+
Prompt:
+
{node.debug_prompt}
+
+ )} + + {/* Debug Raw Response */} + {node.debug_raw_response && ( +
+
Rohe Antwort:
+
{node.debug_raw_response}
+
+ )} + + {/* Analysis Core */} + {node.analysis_core && ( +
+
Ergebnis:
+
{node.analysis_core}
+
+ )} + + {/* Normalized Signals */} + {node.normalized_signals && node.normalized_signals.length > 0 && ( +
+
Signale ({node.normalized_signals.length}):
+ {node.normalized_signals.map((sig, i) => ( +
+ {sig.question_type}: "{sig.raw_value}" → "{sig.normalized_value}" {sig.status} +
+ ))} +
+ )} + + {/* Output (fallback) */} + {node.output && !node.analysis_core && (
Output: -
-                            {typeof node.output === 'string'
-                              ? node.output
-                              : JSON.stringify(node.output, null, 2)}
+                          
+                            {typeof node.output === 'string' ? node.output : JSON.stringify(node.output, null, 2)}
                           
)} - {node.error && ( -
- Error: {node.error} -
- )} + + {/* Metadata */} {node.metadata && (
Metadata: -
+                          
                             {JSON.stringify(node.metadata, null, 2)}
                           
@@ -283,7 +307,7 @@ export function WorkflowResultViewer({ result, onClose }) {
)}
- ))} + )})}
)}