fix: Add human-readable labels to workflow nodes in debug output
All checks were successful
Deploy Development / deploy (push) Successful in 53s
Build Test / pytest-backend (push) Successful in 4s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 17s

- 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
This commit is contained in:
Lars 2026-04-13 12:52:29 +02:00
parent a515a5d563
commit 7388776b29

View File

@ -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,