The fork tree
Every repository sits in a tree of forks. The fork tree reader (forkTree in src/actions/fork_tree.ts) returns
the part of it you may read: the highest ancestor you can see, then every fork below it, so siblings and cousins
come with it. A fork you cannot read is left out before anything is counted, and everything under it goes too.
No git is read.
Terminal
Open the palette and choose Fork tree of a repository, then type owner/name. The repository you asked
about is marked *, each generation is indented, and each fork says in one word how it follows its parent: follows, proposes or severed (FOLLOW_WORD in
src/actions/follow_words.ts, the same word the fork's family tree on the web says).
A repository you may not read answers "not found", as everywhere else.
A fork's header
Under the title of a fork the line "forked from alice/lib" ends in the same one word, follows, proposes or
severed, linked to the setting that changes it (/owner/name/forks#following), then how far behind it is:
"forked from alice/lib · proposes · 2 behind". It is on every tab of the repository, not only the code tab, and a
repository with no parent (or one whose parent you may not read) has no word. The count is the one the fork's
relation last read at these two tips (the code page, the Following card, the terminal and the MCP all read it);
when either branch has moved since, the header says no number rather than an old one, and never runs git to
find out. The code page still says the plain standing ("Sends offers to alice/lib · last took 2 hours ago")
where no behind line speaks. In the terminal the Forks screen's first line reads
proposes · Sends offers to alice/lib · 1 behind.
MCP
{ "name": "fork_tree", "arguments": { "repo": "alice/app", "depth": 4, "limit": 200 } }
Returns { root, nodes: [{ repo, parent, depth, follow, word, hiddenParent? }], truncated }; word is the one word above (empty for the root). hiddenParent: true marks a root that is a fork of a repo you cannot read: it is said as "a hidden fork" (terminal, web family tree, forks card), never named. depth is 1-8 (default 4) generations
below the root; limit is 1-200 nodes (default 200). truncated is true when more exists than is shown.
- The repository asked about is always in
nodes, with its ancestors, even when it lies deeper thandepthor
limit would reach.
- The root's
followisautonomous; any other fork istake-updatesoroffers. - A repo you cannot read gives
{ root: null, nodes: [], truncated: false }.
Cost
One query per generation plus one for the follow modes, not one per fork; the test counts statements
(test/fork-tree-reader.test.ts), not a clock.
On the web: /family
The forge family is a role="tree" of treeitems, each with aria-level and, for a branch, aria-expanded.
Without script every branch is open and the page is plain nested lists. With script, Up/Down walk the visible rows,
Right opens a branch (or steps in), Left closes it (or steps out), Home/End jump. Each node says its depth as text
("level 2") and how it follows as a word (follows, proposes: FOLLOW_WORD), never colour alone;
the tree is at most four levels deep, so indentation is at most three steps. The row itself is the treeitem
(it takes focus, so it says its level and state); the "level N" text is hidden from screen readers, which hear aria-level.
A repository whose owner severed it from its upstream reads severed on its own row (the ledger holds a repo.detached event); a plain root that never was a fork reads as before. A child cannot report a severed mode, so that word is not drawn. Test: test/family-a11y.test.ts.
Each fork in the forks page's tree and in the terminal's tree and forks screens also says its mode in words (FOLLOW_PHRASE in src/actions/follow_words.ts): follows automatically, proposes only, or severed · no longer follows, the last drawn dimmed. Test: test/fork-tree-mode.test.ts.
Offers from forks
A repository's home lists the open pulls its forks have offered into it: title, fork, age, each linking to the pull. A fork the viewer cannot read offers nothing in the list. The forks terminal screen shows the same rows (forkOffers, src/core/fork_offers.ts), twenty at most.
On the app page
An app's page shows a Forks (N) card in its side rail: up to ten forks, the most recently changed first, each
with its owner, its name and "changed 3d ago" (src/web/studio/forks_card.ts). Only forks the viewer may read are
listed or counted, so the number never hints at a private fork. "All" opens the forks page.