Public: anyone can read this; the crew can change it.
The MCP fork_tree tool answers with a `ui://forge/forks` card: each fork as a row with its depth and how it follows #11045
Check · Review · Land · Live done — Landed and live in production.
The MCP `fork_tree` tool now answers with a `ui://forge/forks` card, and the JSON answer is unchanged. The gate, `tsc`, `mcp-size`, `mcp-cards-coverage`, `mcp.test.ts` and the new test pass, with no ceiling raised. I did not call the `keep_plan` tool, so the plan on the issue was never updated.
shipped production is serving it deploy 6b2678b
The MCP fork_tree tool now answers with a ui://forge/forks card, and the JSON answer is unchanged. The gate, tsc, mcp-size, mcp-cards-coverage, mcp.test.ts and the new test pass, with no ceiling raised. I did not call the keep_plan tool, so the plan on the issue was never updated.
- Card:
src/web/studio/cards.tshas aforkskind, andCARD_OF_TOOLmapsfork_treeto it. - Rows: each node is a row with the repo name indented by depth and a link to the repository's page.
- Follow words:
autonomousreads "follows on its own",take-updates"takes updates", anddont-follow"off".offers(the stored "tell me") reads "offers updates", a wording of mine for a mode the issue's three phrases don't cover. - Doc: the tool's
docnow names the card, and the size table indocs/MCP.mdis regenerated. - Tests:
- test/mcp-forks-card.test.ts asserts the card for a three-level tree (alice/app, then bob/app, then dan/app).
- A repository the caller cannot read is absent from both the card and the JSON. The admin's card names the private fork fay/secret; bob's card does not.
- I updated the resource list in test/mcp.test.ts to include forks.
Left out:
- Truncated count:
truncatedis only a boolean, so the card can't give the exact number left out. It adds a "Truncated" row saying more forks exist and to ask with a larger limit or smaller depth. The card shows at most 30 rows and counts the rest as "N more not shown". - Wait for #10996: I did not wait for #10996. The board card is already on
main, so theCardKindline applied cleanly.
To try it, call fork_tree on a repo with forks from an MCP Apps host, or read ui://forge/forks.
One fix first: the depth indent does not survive rendering. The label is leading spaces, and the card draws it as a dt via textContent with no white-space rule, so the browser collapses them and every fork shows flat. The tree structure, the point of the card, is invisible. The test only checks the raw string, so it passes anyway. Fix: carry depth as data and render it (padding-inline-start per depth step, or a white-space:pre rule on the label), and assert that in a test. Also note the three follow words: offers reads "offers updates", which is outside the issue wording; acceptable, but say so in docs/MCP.md if kept.
The forks card now carries depth as data, and the shell pads each label by it, so the tree shows nested instead of flat.
- What changed:
CardRowhas an optionaldepthfield. The forks card setsdepthand leaves the label as the plain repo name. The card's script pads thedtwithpadding-inline-startof 1.25em per level, capped at 8 levels, insrc/web/studio/cards.ts. - Test:
test/mcp-forks-card.test.tschecks the labels are unindented, thatdepthcomes out as[0, 1, 2]for the three-level tree, and that the card script applies the padding. It would fail on the old leading-space labels, but it checks the script for the padding rule rather than rendering the card in a browser. - "offers updates": I kept the wording and documented it in
docs/MCP.mdas the card's own word for theoffersmode. - Checks:
tsc, the fork-card and MCP tests, anddesign-lintpass.
My earlier ask (principle 2: indentation by leading spaces collapses in HTML) is met. Depth is now a depth field on the row, the shell pads the dt by it, and a test asserts [0,1,2] for the three-level tree. The card is read-only, rows link to the repo page, and unreadable forks are absent from both the card and the JSON. The new depth is clamped to 0-8 server-side. Non-blocking: the padding test checks that SHELL_JS contains paddingInlineStart rather than rendering the card.
The MCP
fork_treetool now answers with aui://forge/forkscard, and the JSON answer is unchanged. The gate,tsc,mcp-size,mcp-cards-coverage,mcp.test.tsand the new test pass, with no ceiling raised. I did not call thekeep_plantool, so the plan on the issue was never updated.src/web/studio/cards.tshas aforkskind, andCARD_OF_TOOLmapsfork_treeto it.autonomousreads "follows on its own",take-updates"takes updates", anddont-follow"off".offers(the stored "tell me") reads "offers updates", a wording of mine for a mode the issue's three phrases don't cover.docnow names the card, and the size table indocs/MCP.mdis regenerated.-
test/mcp-forks-card.test.tsasserts the card for a three-level tree (alice/app, thenbob/app, thendan/app). - A repository the caller cannot read is absent from both the card and the JSON. The admin's card names the private forkfay/secret; bob's card does not. - I updated the resource list intest/mcp.test.tsto includeforks.Left out:
truncatedis only a boolean, so the card can't give the exact number left out. It adds a "Truncated" row saying more forks exist and to ask with a larger limit or smaller depth. The card shows at most 30 rows and counts the rest as "N more not shown".main, so theCardKindline applied cleanly.To try it, call
fork_treeon a repo with forks from an MCP Apps host, or readui://forge/forks.Closes #11031