Fix analysis display for recipe-based runs

Add get_run_analysis() to RunService to load per-input analysis from
CACHE_DIR/analysis/{hash}.json files. Update runs router and template
to display tempo, beats, energy, and beat timeline visualization.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
giles
2026-01-11 08:05:40 +00:00
parent 29d8d06d76
commit 945fb3b413
3 changed files with 126 additions and 7 deletions

View File

@@ -172,9 +172,10 @@ async def run_detail(
if not run:
raise HTTPException(404, f"Run {run_id} not found")
# Get plan and artifacts
# Get plan, artifacts, and analysis
plan = await run_service.get_run_plan(run_id)
artifacts = await run_service.get_run_artifacts(run_id)
analysis = await run_service.get_run_analysis(run_id)
# Build DAG elements for visualization
dag_elements = []
@@ -208,6 +209,7 @@ async def run_detail(
"run": run,
"plan": plan,
"artifacts": artifacts,
"analysis": analysis,
}
templates = get_templates(request)
@@ -215,6 +217,7 @@ async def run_detail(
run=run,
plan=plan,
artifacts=artifacts,
analysis=analysis,
dag_elements=dag_elements,
user=ctx,
active_tab="runs",