Fix undefined completed_count variable in plan visualization
Added completed_count stat for steps executed during run (vs cached_count for steps already in cache). Also fixed pending_count calculation to account for completed steps. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1474,8 +1474,12 @@ async def run_plan_visualization(run_id: str, request: Request):
|
|||||||
# Stats summary - count from built nodes to reflect actual execution status
|
# Stats summary - count from built nodes to reflect actual execution status
|
||||||
total = len(nodes)
|
total = len(nodes)
|
||||||
cached_count = sum(1 for n in nodes if n["data"]["status"] == "cached")
|
cached_count = sum(1 for n in nodes if n["data"]["status"] == "cached")
|
||||||
|
completed_count = sum(1 for n in nodes if n["data"]["status"] == "completed")
|
||||||
running_count = sum(1 for n in nodes if n["data"]["status"] == "running")
|
running_count = sum(1 for n in nodes if n["data"]["status"] == "running")
|
||||||
pending_count = total - cached_count - running_count
|
pending_count = total - cached_count - completed_count - running_count
|
||||||
|
|
||||||
|
# Plan name for display
|
||||||
|
plan_name = plan_data.get("recipe", run.recipe.replace("recipe:", ""))
|
||||||
|
|
||||||
content = f'''
|
content = f'''
|
||||||
<a href="/runs" class="inline-flex items-center text-blue-400 hover:text-blue-300 mb-6">
|
<a href="/runs" class="inline-flex items-center text-blue-400 hover:text-blue-300 mb-6">
|
||||||
|
|||||||
Reference in New Issue
Block a user