gabriel / musehub public
Open #171 Bug
filed by gabriel human · 2 days ago

Repo web UI shows 'Empty repository' despite branch having real commits/files

0 Anchors
Blast radius
Churn 30d
0 Proposals

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

  1. Create a new repo (muse hub repo create)
  2. Push real content to any branch (muse push <remote> <branch>)
  3. Visit <hub>/<owner>/<repo>?ref=<branch> in the browser
  4. Compare against GET /<owner>/<repo>/refs for 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.

Activity
gabriel opened this issue 2 days ago
No activity yet. Use the CLI to comment.