diff --git a/app/routers/runs.py b/app/routers/runs.py index e437cf1..bf59ee9 100644 --- a/app/routers/runs.py +++ b/app/routers/runs.py @@ -179,6 +179,7 @@ async def get_run( # Try to load the recipe to show the plan plan = None plan_sexp = None # Native S-expression if available + recipe_ipfs_cid = None recipe_id = run.get("recipe") if recipe_id and len(recipe_id) == 64: # Looks like a hash try: @@ -189,6 +190,8 @@ async def get_run( # Use native S-expression if available (code is data!) if recipe.get("sexp"): plan_sexp = recipe["sexp"] + # Get IPFS CID for the recipe + recipe_ipfs_cid = recipe.get("ipfs_cid") # Build steps for DAG visualization dag = recipe.get("dag", {}) @@ -329,6 +332,7 @@ async def get_run( dag_elements=dag_elements, output_media_type=output_media_type, plan_sexp=plan_sexp, + recipe_ipfs_cid=recipe_ipfs_cid, active_tab="runs", ) diff --git a/app/templates/runs/detail.html b/app/templates/runs/detail.html index f0a87ed..ff2ab96 100644 --- a/app/templates/runs/detail.html +++ b/app/templates/runs/detail.html @@ -159,8 +159,16 @@ {% if plan_sexp %}
- - Recipe (S-expression) + + Recipe (S-expression) + {% if recipe_ipfs_cid %} + + ipfs://{{ recipe_ipfs_cid[:16] }}... + + {% endif %}
{{ plan_sexp }}