Public: anyone can read this; the crew can change it.
A fork's repository page shows its ancestors as a breadcrumb, each a link #16649
Check · Review · Land · Live done — Landed and live in production.
A fork's repository page now shows its ancestors above the title as a → b → c, root first, with the fork itself last. #14661 had already built the chain reading and the terminal's forks screen, but the web page never drew it. I ran the new test file and five related fork and header suites: all pass.
shipped production is serving it deploy 1919ee3
2 earlier comments · 1 event
A fork's repository page now shows its ancestors above the title as a → b → c, root first, with the fork itself last. #14661 had already built the chain reading and the terminal's forks screen, but the web page never drew it.
I ran the new test file and five related fork and header suites: all pass. tsc, the gate and design-lint are clean. I didn't run the whole suite: scripts/fast.ts named 2,736 files, so the forge's check will do that.
- Chain: the new
ancestryCrumbinsrc/web/chrome.tsdraws it. It reusesancestry()andPRIVATE_FORGEfromsrc/core/fork_ancestry.tsand adds no new query logic. - Links and private ancestors: each ancestor the viewer can read is a link. One they can't read shows as "a private forge".
- Escaping: names are escaped by
html. - When nothing shows: a repository with no upstream, or a fork only one level deep, draws nothing and does no chain read. A one-level fork already has the "forked from" line.
- Severed forks: a severed fork stops at the cut.
- Long chains: a long chain keeps its root and the nearest three ancestors, then "… N more", as
ancestry()already did. - Test:
test/fork-breadcrumb.test.tshas a new page-level test. It covers three levels with links, a root with no breadcrumb, a name containing markup, and a private middle fork.
Markup test caveat: repository names with markup can't be created through the app. The test writes one straight into the database on the root repository, whose name only appears in the breadcrumb. A hostile name on the repository being viewed would error in the git path guard before the page rendered.
Not done: no breadcrumb on tabs other than the one this header renders, and no change to the terminal screen.
To try it: fork a repository, fork that fork, and open the second fork's page.
[
{"go": "/<owner>/<name> of a fork of a fork", "look": "the muted line above the 'forked from' line", "expect": "root → middle → this fork, ancestors linked"},
{"go": "same page, signed out, with the middle fork private", "look": "the breadcrumb", "expect": "'a private forge' in place of the middle name, not linked"},
{"go": "/<owner>/<name> of a repository with no upstream", "look": "the header", "expect": "no breadcrumb"}
]
🤖 Generated with Claude Code
<!-- look-pages 8a585e7e54bc --> Look pages for 8a585e7, from the gate:
look pages (inferred): this pull changes src/web/chrome.ts; the forge pictures / (src/web/chrome.ts), /docs (src/web/chrome.ts), /explore (src/web/chrome.ts) and 28 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
The breadcrumb works in the code I read, and the page test covers links, a markup name, a private middle fork and a root. One fix is needed, and I suggest two small ones.
Fix first: docs/features/fork-breadcrumb.md still says the chain is shown only in the terminal. Its row: line is "...in the terminal", and it says the page's breadcrumb "will read too". This pull makes that true, so update the how-to: add an "On the repository page" paragraph and change the row: line to cover both doors. Do not put this in README.
Also suggested:
- Screen readers hear the ancestors run together, because the arrows are
aria-hidden. Make the chain an ordered list (olinside thenav) so each ancestor is its own item, or droparia-hiddenand give the arrow atitle. - The test never draws the
... N moregap on the page. Add a 5-deep chain assertion.
Box 1 is met. Box 2 is met.
I've made the changes @juniper asked for and pushed them. bun x tsc --noEmit, design-lint and test/fork-breadcrumb.test.ts (8 tests) pass, and the gate shows no failure. I didn't re-run the other suites I ran on the first push, since this round only touches the breadcrumb markup, the how-to and that test file.
- How-to:
docs/features/fork-breadcrumb.mdnow has an "On the repository page" paragraph. Therow:line covers the page and the terminal, and the closing note namesancestryCrumb. I left README alone. - Screen readers: I kept the visual arrow and its
aria-hidden, and addedsr-only"then" text after each one, so a screen reader hears the ancestors one by one. That reuses the existing.sr-onlyclass and keeps the same muted look. I did not use anol: a list inside thenavwould need a new inline-list class. - Gap test: the page test now builds a chain several levels deep and asserts the
… N moregap on the page. - Readability: the crumb and the lineage line in
src/web/chrome.tsare now on separate lines. I kept bothrepo === undefinedchecks, matching the lines around them. - Look pages: the commit says "No look". The breadcrumb only draws on a fork two or more levels deep, and the page test renders that page and asserts its markup.
All four earlier asks are met. The how-to now covers the page and the row line names both doors. Screen readers hear 'then' between ancestors, and the arrow stays aria-hidden. The page test draws the '… N more' gap. The crumb and the lineage line are on separate lines. The chain reuses ancestry() and PRIVATE_FORGE, so the gate and the wording are the same as the terminal's. Names are escaped, and the test proves it with a markup name. The change adds no README text, no dependency and no new class.
Two things I would do next:
- Non-blocking: a real thumb check. On a 360px phone a long owner/name chain wraps because of the
breakclass; look at it once on the preview with a five-deep fork. - Non-blocking: make the crumb an
olinside the nav when a inline-list class exists, so a screen reader announces the count of ancestors.
A fork's repository page now shows its ancestors above the title as
a → b → c, root first, with the fork itself last. #14661 had already built the chain reading and the terminal's forks screen, but the web page never drew it.I ran the new test file and five related fork and header suites: all pass.
tsc, the gate anddesign-lintare clean. I didn't run the whole suite:scripts/fast.tsnamed 2,736 files, so the forge's check will do that.ancestryCrumbinsrc/web/chrome.tsdraws it. It reusesancestry()andPRIVATE_FORGEfromsrc/core/fork_ancestry.tsand adds no new query logic.html.ancestry()already did.test/fork-breadcrumb.test.tshas a new page-level test. It covers three levels with links, a root with no breadcrumb, a name containing markup, and a private middle fork.Markup test caveat: repository names with markup can't be created through the app. The test writes one straight into the database on the root repository, whose name only appears in the breadcrumb. A hostile name on the repository being viewed would error in the git path guard before the page rendered.
Not done: no breadcrumb on tabs other than the one this header renders, and no change to the terminal screen.
To try it: fork a repository, fork that fork, and open the second fork's page.
🤖 Generated with Claude Code
Closes #16167