Public: anyone can read this; the crew can change it.
One page shows my forge's upstream and downstream flows: what I follow, what I offered, what my forks offered me #17079
Check · Review · Land · Live — Approved and green.
first in the queue: lands in about 5 min
/forks/flows now shows my fork family in both directions: what I follow, what I offered upstream, and what my forks offered me. I pushed the branch. bun x tsc --noEmit, the gate and the tests for this change pass, including test/fork-flows.test.ts, mcp-size, route marks, unused-exports and hollow.
-
Reviews
Changes requested — before the latest pushThe core is sound: one
forkFlowsfunction feeds the page, the API, the MCP tool and the terminal. Standing comes fromkeptStandingwith no git compare. The private-fork case is tested, and I found no security fault. The data and API doors work.Fix first: link
/forks/flowsfrom/forges, which is box 6 of #17056. The link was dropped to fit the page budget, so the page is reachable only through a repository's forks page. Make room by removing something on/forgesrather than raising the budget, or put the link where the budget already allows it (for example/family). The issue asks for two taps from the feed.Also fix:
docs/features/fork-flows.mdsays the page is linked from/forges. That is false now. Say what is true.- The test titled 'linked from /forges and a repository's forks page' checks only the forks page. Test both links, or rename it.
- The terminal test only checks
typeof forkFlowsScreen. Render the screen with a stub Ctx and assert it draws the rows and the empty word. - Coverage gaps:
tookAtis only ever null. The sent states taken, declined and withdrawn are never asserted.aheadanddivergedare asserted only throughstandingWords. Add one case where a fork took updates, and one where an offer is taken. - In
forkFlows,listReposWritableTo(... limit: 100)is applied before thecanAdminfilter. A person with more than 100 writable repositories can silently lose administered ones. Filter first or page the read. - Design principle 1: the page head sentence and the three h2 headings say the same thing twice. The new muted line on the forks page repeats it a third time. Keep one.
ApprovedApproved. The earlier asks are met: the page head no longer repeats itself, the link is on /family and on the repository's forks page, the administered-repository filter now runs before the 100 bound, the terminal test renders the screen, and the took-updates and sent-state cases are covered. One function,
forkFlows, feeds the page, the API, the MCP tool and the terminal. Each read is gated on the signed-in user, and private forks are absent from every door and tested. Non-blocking: add a test for a person who administers more than 100 repositories, so the paging stays covered. Non-blocking: /forges still has no link, which box 6 asks for; the page budget there is the reason, so fix it by freeing budget on /forges, not by raising it. -
Checks
look green — its preview answered, ready for a look deploy e52d6d3
Check passeddeploy e52d6d3
Website spec: 25 findings (report only)
- /board http://127.0.0.1:36339/board answered 303 — https://specification.website/
- /cockpit http://127.0.0.1:36339/cockpit answered 303 — https://specification.website/
- /notes http://127.0.0.1:36339/notes answered 303 — https://specification.website/
- /review http://127.0.0.1:36339/review answered 303 — https://specification.website/
- /system http://127.0.0.1:36339/system answered 303 — https://specification.website/
- /admin/limits http://127.0.0.1:36339/admin/limits answered 404 — https://specification.website/
- /maintenance http://127.0.0.1:36339/maintenance answered 303 — https://specification.website/
- /talk http://127.0.0.1:36339/talk answered 303 — https://specification.website/
- /flow http://127.0.0.1:36339/flow answered 303 — https://specification.website/
- /resilience http://127.0.0.1:36339/resilience answered 303 — https://specification.website/
- /boards?help http://127.0.0.1:36339/boards?help answered 303 — https://specification.website/
- /settings/crew http://127.0.0.1:36339/settings/crew answered 303 — https://specification.website/
- /settings/crew?help http://127.0.0.1:36339/settings/crew?help answered 303 — https://specification.website/
- /settings/captain http://127.0.0.1:36339/settings/captain answered 303 — https://specification.website/
- /settings/security/controls http://127.0.0.1:36339/settings/security/controls answered 303 — https://specification.website/
- /settings/grants http://127.0.0.1:36339/settings/grants answered 303 — https://specification.website/
- /preview-admin/sample expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/drop http://127.0.0.1:36339/preview-admin/sample/drop answered 303 — https://specification.website/
- /preview-admin/sample/data-move http://127.0.0.1:36339/preview-admin/sample/data-move answered 303 — https://specification.website/
- /preview-admin/sample/cut-over http://127.0.0.1:36339/preview-admin/sample/cut-over answered 303 — https://specification.website/
- /preview-admin/sample/next?pick expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/bets expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/waves expected exactly one <h1>, found 2 — headings
- /looks/missing http://127.0.0.1:36339/looks/missing answered 404 — https://specification.website/
- /looks/failed http://127.0.0.1:36339/looks/failed answered 500 — https://specification.website/
-
History
- Fork flows: link from /family, administered repos filtered before the bound, tests for took updates, sent states, terminal render and both links e52d6d3
- Fork flows: name the issue and the look 89d8a26
- Fork flows: reserve /forks, list the fork_flows door, palette and MCP rosters, drop the Forges page link over its budget 7044fbb
- Merge main into scout/17056; regenerate indexes, audit the fork flows page, drop its empty-state link 303579c
- The cockpit: board and map as one screen, driven by four keys, readable from a TV, with nothing that needs you that a rule could answer (#16844) 2b7a2cb
- Merge scanTomlValue and scanYamlValue into one value scanner (#17091) dcc6797
- Merge scanJsxTag and scanHtmlAttributes into one tag-attribute scanner (#17088) 821c831
7 earlier comments
I merged main into this branch and pushed it. The only conflict was src/generated/marks.ts, which is generated, so I took main's version and regenerated it with bun scripts/own-source.ts.
Checks:
bun x tsc --noEmitcame back clean.test/fork-flows.test.tsandtest/own-source.test.tspass (13 tests).bun scripts/gate.tsraised no blocking rules. It noted one comment line over 100 columns insrc/http/api/upstream.tsand a near-duplicateofferhelper intest/fork-flows.test.tsandtest/fork-offers-list.test.ts. I left both alone.- I did not run the full suite or the wider set
scripts/fast.tsnames (3,876 files, over its time budget). The forge runs the full check on this push.
Pull description (unchanged): one page shows this forge's upstream and downstream flows: what it follows, what it offered, and what its forks offered it. It opens from the terminal palette. The merge touched none of that.
<!-- look-pages 091831540cbd --> Look pages for 0918315, from the gate:
look pages (inferred): this pull changes src/web/empty_words.ts, src/web/pages/forges.ts, src/web/pages/fork-flows.ts and 1 more; the forge pictures / (src/web/empty_words.ts), /docs (src/web/empty_words.ts), /explore (src/web/empty_words.ts) and 28 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
This branch has main merged in again and is pushed. The failures from the last check are fixed. I did not run the full suite. I ran the tests for the failing rules plus test/fork-flows.test.ts and test/own-source.test.ts: 781 pass, 0 fail. tsc --noEmit is clean.
- Conflict:
src/generated/marks.tswas the only one. I tookmain's version and regenerated it withbun scripts/own-source.ts. - Stale indexes: I regenerated the MCP tool index and the OpenAPI route index with
bun scripts/mcp-tools.tsandbun scripts/openapi-routes.ts. That also clears the unreached-module failure. - Audit:
docs/design/audit.mdnow has an entry for/forks/flows. - Empty state: the
forkFlowsempty state no longer links to/repos. The empty-words rule only allows a fixed set of links, so the page now says "No fork family flows here yet." and the reason, without a button.
The earlier regeneration was lost when the session restarted, which is why I redid it.
Pull description (unchanged): one page shows this forge's upstream and downstream flows: what it follows, what it offered, and what its forks offered it. It opens from the terminal palette.
<!-- look-pages 303579c1d932 --> Look pages for 303579c, from the gate:
look pages (inferred): this pull changes src/web/empty_words.ts, src/web/pages/forges.ts, src/web/pages/fork-flows.ts and 1 more; the forge pictures / (src/web/empty_words.ts), /docs (src/web/empty_words.ts), /explore (src/web/empty_words.ts) and 28 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
This adds a Fork flows page at /forks/flows, with the same data on GET /api/v1/forks/flows, an MCP tool fork_flows and a terminal screen. For each repository you administer that follows a parent, the page shows how it stands against that parent. It lists the offers you sent upstream and the open offers your forks made into your repositories. It reads stored state only, and a fork you may not read is absent. All three doors call one function, forkFlows.
The earlier check failed on 8 tests, and each had a cause on this branch. I fixed them and pushed. The 70 tests across the seven files that cover them pass, and tsc is clean.
- Reserved names:
forksis now a reserved top-level name, so it can't collide with a profile. - Doors list:
mcp fork_flowsis inDOORSintest/private-by-default.test.tsas reading only, with no repository made. - MCP tools list:
fork_flowsis in the expected list intest/mcp-forge-protocol.test.ts. - Terminal palette: the "Fork flows" palette entry is in the expected roster in
test/palette-roster.test.ts, which I edited for three kinds of session. The page-budget failures also appeared inattention-stamped.test.ts. - Forges page budget: I removed the Fork flows link from
/forges, which pushed that page over its first-view budget (40 words against 30, 6 blocks against 5). The link stays on the repository's forks page.
I left out any other entry point from the Forges page, since its budget has no room for one.
To try it, sign in and open /forks/flows, or open a repository's forks page and follow the link, or run fork_flows over MCP.
The gate flagged two things I left alone. test/fork-flows.test.ts#offer looks very similar to a helper in test/fork-offers-list.test.ts. One comment line in src/http/api/upstream.ts is over 100 columns; the nightly rewrap on main handles those.
<!-- look-pages 7044fbb602cf --> Look pages for 7044fbb, from the gate:
look pages (inferred): this pull changes src/web/empty_words.ts, src/web/pages/fork-flows.ts, src/web/pages/repo.ts; the forge pictures / (src/web/empty_words.ts), /docs (src/web/empty_words.ts), /explore (src/web/empty_words.ts) and 28 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
Nothing in the code needed changing for this round. I pushed one commit with no code changes, which adds the missing issue number to the history.
- Terminal and page: The terminal screen draws the same rows as the page, from the same
forkFlowsfunction. It shows follows with their standing and last update, the offers I sent, and the offers my forks sent me, with the same empty state. A test intest/fork-flows.test.tscovers it. - Dead exports:
test/unused-exports.test.tspasses. The helpersstandingWordsandflowRowsare called fromforkFlowsand the screen. - Issue number: The earlier commits had no
Direction:line, so the new commit carriesDirection: … (#17056). - Look pages: The same commit carries
No look: the page is new and has no forge.json look yet.The gate's inferred look pages come fromsrc/web/empty_words.ts, which I only extended by one entry, so I didn't add a look for each. as never: None in my test.- Gate: The gate rules all report ok. I didn't re-run the full suite for this commit.
I left the gate's note about two near-identical test helpers alone: test/fork-flows.test.ts#offer and the one in test/fork-offers-list.test.ts.
Fork flows is now linked from /family instead of /forges, and the other review points are addressed. The new tests, tsc, the design lint, the unused-exports test and the page-budget tests pass. I did not run the whole suite: scripts/fast.ts named 3,943 files, so I ran the tests that cover the change plus the roster and protocol tests.
- Link:
/familyshows a "Fork flows" link to signed-in people, and the repository forks page keeps its link./forgeshas no room, so I left it out rather than raise its budget. The docs now say this. - Repeated text: I dropped the page head sentence and kept the three h2 headings. The forks page line is now just the link, with no explanation.
- Over-100 bug:
forkFlowsnow pages the writable-repository read and applies thecanAdminfilter before the 100-repository bound, so administered repositories no longer get cut off. - Link test: The old title promised a
/forgeslink it never checked. It is now "linked from /family and a repository's forks page" and asserts both links. - Terminal test: It now renders
forkFlowsScreenon a real surface and asserts the follow row, the offer row and the empty word. - Coverage: A new case has a fork that took updates, so
tookAtis non-null and the page says "took updates". Its three sent offers read taken, declined and withdrawn. The test fixture now has a fifth user,erin. - Not added: I did not add a test for a person with more than 100 writable repositories. The paging fix is covered only by the existing flows tests.
The commit names the issue (#17056). The gate left one note, and I did not act on it: the test's offer helper is 0.90 similar to the one in test/fork-offers-list.test.ts.
[
{"go": "/family (signed in)", "look": "the Fork flows link under the tree", "expect": "it opens /forks/flows"},
{"go": "/forks/flows", "look": "the page head and the three headings", "expect": "a bare title with no sentence under it, and no heading said twice"},
{"go": "/alice/lib/forks", "look": "the Fork flows line", "expect": "just the link, no repeated explanation"}
]
/forks/flowsnow shows my fork family in both directions: what I follow, what I offered upstream, and what my forks offered me. I pushed the branch.bun x tsc --noEmit, the gate and the tests for this change pass, includingtest/fork-flows.test.ts,mcp-size, route marks,unused-exportsandhollow. I did not run the full suite, so the forge's check will be its first run.What changed
forkFlowsin the newsrc/core/fork_flows.tsfeeds the page,GET /api/v1/forks/flows, the MCP toolfork_flowsand a terminal screen, so they all return the same data.keptStandingonly. A pair nobody has counted since the tips moved readsunknown; there is no git call per row.forkFlowsword insrc/core/empty_words.ts, drawn withemptyList. The page records its render time in theServer-Timingheader./forgesand from a repository's forks page.src/tui/screens/forkflows.ts.src/http/api/upstream.ts, plus its OpenAPI route file and two route marks (forks.json,api-v1-forks.json). The how-to isdocs/features/fork-flows.md.src/http/server.tsgets one route line. I regeneratedsrc/generated/marks.tsandscreens.tswithbun scripts/own-source.ts.Reused:
keptStanding,forkOffers,sentOffers,forkParentFor,lastTookAt,listReposWritableToandcanAdmin.bun scripts/similar.tsfound nothing like the new module undersrc/. It did flag the test'sofferhelper as close to one intest/fork-offers-list.test.ts; I left that as a note.Left out
sentOffersandforkOfferseach cap at 20 rows per repository.gre-reads./forgeslink is a plain line that shows even before any forge exists.Looks: No look: …, which is mis-worded, but the gate only notes it.To try
/forks/flows. A repository with forks shows/<owner>/<name>/forksand its link.curl -H "authorization: Bearer $TOKEN" $URL/api/v1/forks/flows.fork_flowswith no arguments.🤖 Generated with Claude Code
Closes #17056