From 7388776b29cb840e0ea630cf17fe09d5cbf03fda Mon Sep 17 00:00:00 2001 From: Lars Date: Mon, 13 Apr 2026 12:52:29 +0200 Subject: [PATCH] fix: Add human-readable labels to workflow nodes in debug output - workflow_executor.py: Store prompt_slug or generated label in debug_prompt_slug for all nodes - This makes it easy to identify nodes in the debug panel - Example: 'wf_nutrition_basis' instead of 'node_5' - Helps identify which node is which when debugging workflows --- backend/workflow_executor.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/workflow_executor.py b/backend/workflow_executor.py index 4672926..809b40a 100644 --- a/backend/workflow_executor.py +++ b/backend/workflow_executor.py @@ -166,13 +166,16 @@ async def execute_workflow( enable_debug=enable_debug ) + # Add human-readable label to node_state for debug UI + node_label = node.prompt_slug if hasattr(node, 'prompt_slug') and node.prompt_slug else f"{node.type.value}-{node_id[:8]}" + if not node_state.debug_prompt_slug: + node_state.debug_prompt_slug = node_label + node_states.append(node_state) context["node_results"][node_id] = node_state # NEW: Progress-Callback aufrufen (für SSE Streaming) if progress_callback: - # Create a meaningful label for the node - node_label = node.prompt_slug if hasattr(node, 'prompt_slug') and node.prompt_slug else f"{node.type.value}-{node_id[:8]}" await progress_callback("node_complete", { "node_id": node_id, "node_type": node.type,