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:
gilesb
2026-01-11 23:21:33 +00:00
parent cdd29e07f5
commit d73592fbe2

View File

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