Restore menu_items fallback, fix app slug URLs in nav fragment
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m6s

Keep get_navigation_tree() as fallback when nav-tree fragment fetch
fails. Also map all app slugs (market, events, federation, account)
to their proper cross-app URLs in the nav fragment template.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-24 11:49:20 +00:00
parent 288b3caf7f
commit e5b02f1c44
3 changed files with 12 additions and 2 deletions

4
app.py
View File

@@ -27,12 +27,16 @@ async def blog_context() -> dict:
- cart_mini_html / auth_menu_html / nav_tree_html: pre-fetched fragments
"""
from shared.infrastructure.context import base_context
from shared.services.navigation import get_navigation_tree
from shared.services.registry import services
from shared.infrastructure.cart_identity import current_cart_identity
from shared.infrastructure.fragments import fetch_fragments
ctx = await base_context()
# Fallback for _nav.html when nav-tree fragment fetch fails
ctx["menu_items"] = await get_navigation_tree(g.s)
# Cart data via service (replaces cross-app HTTP API)
ident = current_cart_identity()
summary = await services.cart.cart_summary(