Fix recipe listing, effects count, and add nav counts to all pages
- Fix list_by_type to return node_id (IPFS CID) instead of local hash - Fix effects count on home page (count from _effects/ directory) - Add nav_counts to all page templates (recipes, effects, runs, media, storage) - Add editable metadata section to cache/media detail page - Show more metadata on recipe detail page (ID, IPFS CID, step count) - Update tests for new list_by_type behavior Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -323,6 +323,10 @@ async def get_run(
|
||||
if not plan_sexp and plan:
|
||||
plan_sexp = plan_to_sexp(plan, run.get("recipe_name"))
|
||||
|
||||
from ..dependencies import get_nav_counts
|
||||
user = await get_current_user(request)
|
||||
nav_counts = await get_nav_counts(user.actor_id if user else None)
|
||||
|
||||
templates = get_templates(request)
|
||||
return render(templates, "runs/detail.html", request,
|
||||
run=run,
|
||||
@@ -333,6 +337,7 @@ async def get_run(
|
||||
output_media_type=output_media_type,
|
||||
plan_sexp=plan_sexp,
|
||||
recipe_ipfs_cid=recipe_ipfs_cid,
|
||||
nav_counts=nav_counts,
|
||||
active_tab="runs",
|
||||
)
|
||||
|
||||
@@ -418,10 +423,14 @@ async def list_runs(
|
||||
input_previews.append(preview)
|
||||
run["input_previews"] = input_previews
|
||||
|
||||
from ..dependencies import get_nav_counts
|
||||
nav_counts = await get_nav_counts(ctx.actor_id)
|
||||
|
||||
templates = get_templates(request)
|
||||
return render(templates, "runs/list.html", request,
|
||||
runs=runs,
|
||||
user=ctx,
|
||||
nav_counts=nav_counts,
|
||||
offset=offset,
|
||||
limit=limit,
|
||||
has_more=has_more,
|
||||
|
||||
Reference in New Issue
Block a user