Repo web UI shows 'Empty repository' despite branch having real commits/files
Summary
Found while publishing muse and musehub to production for the first time. Both repos' main
branch renders as "Empty repository" in the web UI (musehub.ai/gabriel/<repo>?ref=main), even
though the branch has real content.
Confirmed via the wire API — this is a UI bug, not data loss
curl https://musehub.ai/gabriel/muse/refs
{"repo_id": "...", "domain": "code", "default_branch": "main",
"branch_heads": {"dev": "sha256:e8214e00...", "main": "sha256:278a5271..."}}
main's branch head correctly points to a real commit with real file content (confirmed via
muse code cat/muse ls-tree against that commit locally). The web UI ignores this and shows the
empty-state placeholder ("Empty repository — Push your first commit to see files here.") regardless.
Suspected root cause
muse hub repo read --hub <url> --json returns pushed_at: "None" (the literal string "None",
not null/omitted) for both repos, even after multiple successful pushes today. This field appears
to never be updated by the push/unpack-mpack flow. If the UI's empty-state check is
if repo.pushed_at is None: show_empty_state() rather than actually checking whether the requested
ref has commits, that would explain exactly this symptom — and would affect every repo's every
branch, not just main.
Repro
- Create a new repo (
muse hub repo create) - Push real content to any branch (
muse push <remote> <branch>) - Visit
<hub>/<owner>/<repo>?ref=<branch>in the browser - Compare against
GET /<owner>/<repo>/refsfor the same branch — the API shows the correct head, the UI shows "Empty repository"
Fix
Either update pushed_at correctly on every successful push, or (more robustly) have the UI's
empty-state check actually query whether the selected ref resolves to a commit with a non-empty
tree, rather than relying on repo-level metadata that may be stale or unset.