fix: Use correct field 'label' instead of 'name' for node display
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 16s

- Frontend saves node name as 'label' (workflowSerializer.js:19)
- Changed WorkflowNode.name to WorkflowNode.label
- Changed node.name to node.label in workflow_executor.py
- Priority: node.label > prompt_slug > node_type-id
- Verified against frontend serialization code
This commit is contained in:
Lars 2026-04-13 18:09:12 +02:00
parent d5325acee6
commit df8e732709
2 changed files with 3 additions and 3 deletions

View File

@ -167,8 +167,8 @@ async def execute_workflow(
)
# Add human-readable label to node_state for debug UI
# Priority: node.name (user-defined) > prompt_slug > node_type-id
node_label = node.name if hasattr(node, 'name') and node.name else (
# Priority: node.label (user-defined) > prompt_slug > node_type-id
node_label = node.label if hasattr(node, 'label') and node.label else (
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:

View File

@ -196,7 +196,7 @@ class WorkflowNode(BaseModel):
"""
id: str = Field(..., description="Eindeutige Knoten-ID")
type: NodeType = Field(..., description="Knotentyp")
name: Optional[str] = Field(None, description="Node-Name (vom Editor)")
label: Optional[str] = Field(None, description="Node-Label (vom Editor, z.B. 'Qualitätseinschätzung')")
position: Optional[Position] = Field(None, description="Position im visuellen Editor")
# ANALYSIS-Knoten