Fix DAG visualization node IDs
Add "id" field to plan steps so edges connect correctly. Previously steps only had "name" but dag_elements looked for "id", causing edges to reference non-existent nodes. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -126,8 +126,10 @@ async def get_run(
|
||||
steps = []
|
||||
if isinstance(nodes, list):
|
||||
for node in nodes:
|
||||
node_id = node.get("id", "")
|
||||
steps.append({
|
||||
"name": node.get("id", ""),
|
||||
"id": node_id,
|
||||
"name": node_id,
|
||||
"type": node.get("type", "EFFECT"),
|
||||
"status": "completed", # Run completed
|
||||
"inputs": node.get("inputs", []),
|
||||
@@ -135,6 +137,7 @@ async def get_run(
|
||||
elif isinstance(nodes, dict):
|
||||
for node_id, node in nodes.items():
|
||||
steps.append({
|
||||
"id": node_id,
|
||||
"name": node_id,
|
||||
"type": node.get("type", "EFFECT"),
|
||||
"status": "completed",
|
||||
|
||||
Reference in New Issue
Block a user