zz_

90ae28ee ยท zzmq.dev@gmail.com/zz

Commit

90ae28ee87641714256f5d85ad57646bbae73696

Make blob/tree navigation ref-aware -- stay pinned to a commit Added directory navigation in the previous commit, but every link it and the file viewer generated pointed at HEAD unconditionally -- clicking into a directory (or a file) from a historical commit's own tree silently jumped you to HEAD's current version of that path instead of staying on the commit you were actually looking at. /tree and /blob now take a required ref segment in the URL path (/<owner>/<repo>/tree/<ref>/<path>, /blob/<ref>/<path>, same for /download) -- a branch name, tag, or commit sha, all three of which repo.log/readTree/readFile already resolve directly, so no extra lookup was needed to support it. handleCommit's own tree now passes its commit's sha as that ref (the actual fix); handleRepoPage's "Files" tab passes the default branch name for the HEAD case. A caller with no real sha to hand (the ladder-search results, which only carry one when the rung happens to have a commit source) can pass the literal "HEAD", which resolveRefName normalizes to the real default branch name server-side. Also adds a path breadcrumb to the file viewer itself -- every directory segment in the heading is now a link to that directory's own tree view (at the same ref), not plain text.

Troy Howard <thoward37@gmail.com> -- 2026-10-14T00:29:25.000Z

Tree at this commit