gabriel / musehub public
fix navigation main #54 / 70

fix(navigation): resolve hx-boost fragment leak and HEAD ref 404

Two navigation bugs fixed:

- htmx_helpers: hx-boost navigations (HX-Request + HX-Boosted) now always receive the full page template instead of a bare fragment, preventing commit/tree pages from rendering as a raw partial on first click.

- musehub_repository: add resolve_head_ref() that maps the symbolic "HEAD" ref to the repo's actual default branch (prefers "main").

- objects.py: tree API endpoints resolve "HEAD" before calling list_tree so /tree/HEAD and /tree/HEAD/{path} return 200 with data instead of 404.

- ui.py (repo_page): resolve "HEAD" to the real branch name before building the SSR context so file-tree directory links use a routable ref (e.g. /tree/main/tracks) rather than the literal string "HEAD".

G Gabriel Cardona <gabriel@tellurstori.com> · 6d ago Mar 17, 2026 · e0b46bc2 · parent bc49aa36
4
files changed
372
files in snapshot

0 comments

No comments yet. Be the first to start the discussion.