From d73592fbe2b911d79f171c93232a3b2222c52107 Mon Sep 17 00:00:00 2001 From: gilesb Date: Sun, 11 Jan 2026 23:21:33 +0000 Subject: [PATCH] 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 --- app/routers/runs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/routers/runs.py b/app/routers/runs.py index 7341f70..296cec4 100644 --- a/app/routers/runs.py +++ b/app/routers/runs.py @@ -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",