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:
gilesb
2026-01-12 13:30:11 +00:00
parent 9bb1c4278e
commit 98ca2a6c81
11 changed files with 172 additions and 18 deletions

View File

@@ -248,10 +248,14 @@ async def get_effect(
return meta
# HTML response
from ..dependencies import get_nav_counts
nav_counts = await get_nav_counts(ctx.actor_id)
templates = get_templates(request)
return render(templates, "effects/detail.html", request,
effect=meta,
user=ctx,
nav_counts=nav_counts,
active_tab="effects",
)
@@ -308,10 +312,14 @@ async def list_effects(
if wants_json(request):
return {"effects": effects}
from ..dependencies import get_nav_counts
nav_counts = await get_nav_counts(ctx.actor_id)
templates = get_templates(request)
return render(templates, "effects/list.html", request,
effects=effects,
user=ctx,
nav_counts=nav_counts,
active_tab="effects",
)