The global bar offered Activity (and Accounts to an instance admin) and nothing that said “the repository list”. The landing page was reachable only through the emblem, which links there without saying so — and a mark is not a label.
What
<a class="{{if eq .Section "repos"}}active{{end}}" href="/"
{{if eq .Section "repos"}}aria-current="page"{{end}}>{{icon "grid-2x2"}}Projects</a>
- Goes first in the bar, before Activity, because it is the widest destination.
- Marks itself current wherever the repository list is the context.
pageSectionalready maps/,/repos/newand/r/<name>torepos, so a repository page shows Projects as current and the repository’s own tabs carry the finer context — the same rule the existing items follow. - The glyph is Lucide
grid-2x2, added to the vendored set. The bar could have reusedlayout-dashboard, but that is already the icon for both “Overview” subnavs (the repository one and the status page one), and a global destination sharing a tab’s glyph reads as a tab. aria-current="page"is set only when the section matches, so the link says “you are here” to a screen reader rather than relying on colour.
Test
server/nav_test.go asserts the link exists, is marked current on both / and
/r/<name>, renders an icon, and stops being current on /activity — where
Activity takes over. TestTemplatesOnlyUseKnownIcons would have caught a typo in
the icon name.
gofmt, go vet ./..., go test ./... and vole workflow run verify (format,
vet, build, govulncheck, packaging, links, race) are clean.