diff --git a/server.py b/server.py index e32d40a..866a6cf 100644 --- a/server.py +++ b/server.py @@ -1531,6 +1531,77 @@ async def run_plan_visualization(run_id: str, request: Request): {dag_html} + + +
+

Execution Steps

+
+ ''' + + # Build steps list with cache_id links + for i, step in enumerate(steps): + step_id = step.get("step_id", "") + step_name = step.get("name", step_id[:20]) + node_type = step.get("node_type", "EFFECT") + cache_id = step.get("cache_id", "") + has_cached = cache_manager.has_content(cache_id) if cache_id else False + color = NODE_COLORS.get(node_type, NODE_COLORS["default"]) + + status_badge = "" + if has_cached: + status_badge = 'cached' + elif run.status == "completed": + status_badge = 'completed' + + cache_link = "" + if cache_id: + if has_cached: + cache_link = f''' +
+ Output: + {cache_id} +
''' + else: + cache_link = f''' +
+ {cache_id[:32]}... +
''' + + content += f''' +
+
+
+ {i + 1} + {step_name} + {node_type} +
+
+ {status_badge} +
+
+ {cache_link} +
+ ''' + + content += ''' +
+
+ ''' + + # Add collapsible Plan JSON section + plan_json_str = json.dumps(plan_data, indent=2) + # Escape HTML entities in JSON + plan_json_str = plan_json_str.replace("&", "&").replace("<", "<").replace(">", ">") + content += f''' + +
+ + Show Plan JSON + +
+
{plan_json_str}
+
+
'''