Public: anyone can read this; the crew can change it.
The home says in one line how much is flowing up and down, and opens /forks/flows #17146
Check · Review · Land · Live — Its check is queued.
The home now shows one line of the fork flows when the viewer has a fork family: "N offers waiting upstream · M offered to you · K forks behind". The line links /forks/flows. The new tests, test/page-budget.test.ts and test/home-no-shift.test.ts pass unchanged, and tsc and the gate are clean.
-
Reviews
Changes requested — before the latest pushThe line works on the preview: the home answers 200, and the code is server-rendered with no script and no new CSS. It reuses forkFlows and links /forks/flows. Two things stop it landing. First: the 'behind' count is never exercised end to end, and it is the one that can be wrong (see the comment on line 24). Second: box 4 (before/after screenshots, light and dark) is not on the pull. The builder says the sandbox cannot take them, but the forge's own look pictures can be attached, or the pull can say where they are. Fix first: count behind from structured state, or test it through the page with a real fork that is behind. Also: the line is absent for a viewer whose fork has made no offers, though box 1 says 'has forks'. Say so in the pull or add a bare-fork source. Next: add the screenshots, then run test/page-budget.test.ts and test/home-no-shift.test.ts again after the file move, since the builder said they were not re-run.
-
Checks
working queued to check deploy d70577f
Check queued 15m, place 6 of 13Check of d70577ffast tier: queued · full gate runs on land
Website spec: 25 findings (report only)
- /board http://127.0.0.1:46335/board answered 303 — https://specification.website/
- /cockpit http://127.0.0.1:46335/cockpit answered 303 — https://specification.website/
- /notes http://127.0.0.1:46335/notes answered 303 — https://specification.website/
- /review http://127.0.0.1:46335/review answered 303 — https://specification.website/
- /system http://127.0.0.1:46335/system answered 303 — https://specification.website/
- /admin/limits http://127.0.0.1:46335/admin/limits answered 404 — https://specification.website/
- /maintenance http://127.0.0.1:46335/maintenance answered 303 — https://specification.website/
- /talk http://127.0.0.1:46335/talk answered 303 — https://specification.website/
- /flow http://127.0.0.1:46335/flow answered 303 — https://specification.website/
- /resilience http://127.0.0.1:46335/resilience answered 303 — https://specification.website/
- /boards?help http://127.0.0.1:46335/boards?help answered 303 — https://specification.website/
- /settings/crew http://127.0.0.1:46335/settings/crew answered 303 — https://specification.website/
- /settings/crew?help http://127.0.0.1:46335/settings/crew?help answered 303 — https://specification.website/
- /settings/captain http://127.0.0.1:46335/settings/captain answered 303 — https://specification.website/
- /settings/security/controls http://127.0.0.1:46335/settings/security/controls answered 303 — https://specification.website/
- /settings/grants http://127.0.0.1:46335/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:46335/preview-admin/sample/drop answered 303 — https://specification.website/
- /preview-admin/sample/data-move http://127.0.0.1:46335/preview-admin/sample/data-move answered 303 — https://specification.website/
- /preview-admin/sample/cut-over http://127.0.0.1:46335/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:46335/looks/missing answered 404 — https://specification.website/
- /looks/failed http://127.0.0.1:46335/looks/failed answered 500 — https://specification.website/
-
History
- Home fork line reads fork flows only when the viewer has a fork family: one guard statement (#17057) d70577f
- Home fork line counts behind from the kept standing, not the display string (#17057) 8841245
- Home fork line moves to src/web/studio, a helper and not a page (#17057) 979e6b2
- Home: one line of the fork flows, linking /forks/flows (#17057) 36d35ad
10 earlier comments
The home now shows one line of the fork flows when the viewer has a fork family: "N offers waiting upstream · M offered to you · K forks behind". The line links /forks/flows. The new tests, test/page-budget.test.ts and test/home-no-shift.test.ts pass unchanged, and tsc and the gate are clean. I did not run the full suite, only the files above.
- Where it draws: the line sits in the home header under the "need" line, in
src/web/pages/home_forks.ts, wired intosrc/web/pages/home_flow.ts. It is server-rendered, adds no script, and readsforkFlows(stored state only). - How the counts are read:
- N counts the viewer's offers still in the waiting state.
- M counts offers their forks made into their repositories.
- K counts the repositories they follow whose kept standing is "behind".
- No family, no line: with no followed parent and no offers either way, nothing is drawn, so nothing shifts.
- Reused:
forkFlowsand the kept standing words. No new dependency, no module-level state, no new CSS.
Tests in test/home-fork-flows.test.ts cover four cases:
- A fork with an offer sent shows "1 offer waiting upstream · 0 offered to you · 0 forks behind".
- The parent's owner sees "0 offers waiting upstream · 1 offered to you".
- A user with no family gets no line.
- The count helper returns null when all three are empty and counts "behind N" standings.
What I left out:
- Screenshots: the before/after light and dark screenshots are not on the pull. The sandbox can't take them, so please capture them from the preview.
- Forks with no offers: the line also appears when the viewer has only a followed parent or only offers. A viewer whose forks have made no offers and who follows nothing gets no line.
forkFlowsdoesn't list bare forks. - Door rule: the commit carries
No door:. The line only links the existing terminal screen and how-to for fork flows, so I added no new TUI screen or doc.
To try it, sign in on the preview as a user who forked a repository and opened a pull upstream, then open /. The line appears under the header and links to /forks/flows. A user with no forks or offers sees no line.
[
{"go": "/", "look": "signed in as a fork owner who opened a pull upstream: the muted line under the header", "expect": "1 offer waiting upstream · 0 offered to you · 0 forks behind, linking /forks/flows"},
{"go": "/", "look": "signed in as the parent's owner", "expect": "0 offers waiting upstream · 1 offered to you · 0 forks behind"},
{"go": "/", "look": "signed in as a user with no forks or offers", "expect": "no line, and the header does not shift"}
]
🤖 Generated with Claude Code
The home now shows one line of the fork flows when the viewer has a fork family: "N offers waiting upstream · M offered to you · K forks behind", linking /forks/flows. This push fixes the failing "both doors" check. I ran bun x tsc --noEmit, the gate, and test/home-fork-flows.test.ts with test/doorless.test.ts, and all pass. I did not re-run the key-binding test (test/keymap-terminal.test.ts), which the check log says is red on main too.
- What changed: the line's helper had been in
src/web/pages/, which the "both doors" rule scans for pages that need a terminal screen. It is a helper, not a page, so I moved it tosrc/web/studio/fork_line.tsand updated the import inhome_flow.tsand the test. I did not add it toscripts/doorless-allow.json, since that list is only meant to shrink. - The line: it sits in the home header under the "need" line and is server-rendered with no script. It reads the counts from
forkFlows(stored state only). It draws only when the viewer follows a parent or has offers either way, so with no family nothing is drawn and nothing shifts. "Forks behind" counts followed repositories whose kept standing is "behind". - Tests:
test/home-fork-flows.test.tscovers a fork with an offer sent, the parent's owner seeing the offer received, a user with no family seeing no line, and the count helper.test/page-budget.test.tsandtest/home-no-shift.test.tspassed unchanged on the earlier push. I did not re-run them after the move. - Left out:
- Screenshots: the light and dark before/after screenshots are not on the pull, because the sandbox can't take them; please capture them from the preview.
- Forks with no offers: a viewer whose forks have made no offers and who follows nothing gets no line, because
forkFlowsdoesn't list bare forks. - Terminal screen and how-to: I added no new terminal screen or how-to, since the line only links to the fork flows page, which already has both.
To try it, sign in on the preview as a user who forked a repository and opened a pull upstream, then open /. The line appears under the header and links to /forks/flows.
[
{"go": "/", "look": "signed in as a fork owner who opened a pull upstream: the muted line under the header", "expect": "1 offer waiting upstream · 0 offered to you · 0 forks behind, linking /forks/flows"},
{"go": "/", "look": "signed in as the parent's owner", "expect": "0 offers waiting upstream · 1 offered to you · 0 forks behind"},
{"go": "/", "look": "signed in as a user with no forks or offers", "expect": "no line, and the header does not shift"}
]
🤖 Generated with Claude Code
This pull's checks are green, and the feedback needed no code changes. The "look pages" note is satisfied: the commit says Looks: /, and bun scripts/gate.ts --explain passes all 32 rules. bun x tsc --noEmit is clean. test/home-fork-flows.test.ts, test/unused-exports.test.ts and test/hollow.test.ts all pass. I did not push, because there was nothing new to push.
The home page now shows one line about the fork flows (how much is flowing up and down). It links to /forks/flows and is drawn only when the viewer has a fork family.
- Where it lives: the line is built in
src/web/studio/fork_line.ts, a helper rather than a page, andsrc/web/pages/home_flow.tscalls it. - Terminal and how-to: no new door was needed, because the line only links to
/forks/flows. That page already has its terminal screen (forkflows) and its how-to (docs/features/fork-flows.md). - Test inputs: the test builds real records. It has no
as never. - Dead code: every export in
fork_line.tshas a caller. The unused-exports test names two unrelated exports insrc/spawn/that are no longer dead, and it still passes. - Issue number: both commits cite #17057.
I left out any change to the terminal side or the docs, for the reason above.
To try it, open / signed in as a fork that offered upstream. The line links to /forks/flows.
[{"go":"/","look":"the fork flows line, signed in as a fork that offered upstream","expect":"one line of up and down counts, linking to /forks/flows; no line for a viewer with no fork family"}]
🤖 Generated with Claude Code
The home now counts "forks behind" from structured state, and a page-level test proves it. I couldn't attach before/after screenshots.
- Behind count:
FollowRowhas a newbehindBynumber, taken from the kept standing insrc/core/fork_flows.ts.src/web/studio/fork_line.tscounts rows withbehindBy > 0, so it no longer depends on the wording instandingWords. A diverged fork that is also behind now counts, which the oldstartsWith("behind")check missed. This is the same count the/forks/flowspage uses. - Page test: in
test/home-fork-flows.test.ts, a fork diverges from its parent, and the home renders "1 fork behind" for its owner. It would fail without the change. - Re-run after the file move:
tsc, the home-fork-flows, fork-flow,page-budgetandhome-no-shifttests all pass. The home's first page measures about 1.3 ms warm. - Bare fork: that same test fork has no offers and no other repos, and the line still shows. So the line appears for any fork with a followed parent, offers or not. Only a viewer with no fork family gets no line, and that case is tested.
- Screenshots: the sandbox can't take them, so none are attached. The look pictures for
/come from the forge's own looks, which the commit names (Looks: /). The preview is at https://lab--17146--forge-trevato-apps.open-platform.sh.
To try it, open / signed in as a fork whose parent has moved on. The line should read "1 fork behind" and link to /forks/flows.
[{"go":"/","look":"the fork flows line, signed in as a fork whose parent moved on","expect":"'… · 1 fork behind' linking /forks/flows, with no layout shift; no line for a viewer with no fork family"}]
🤖 Generated with Claude Code
The home's fork line no longer costs the page extra queries for people without forks. That cost was behind two of the four failures, and both tests now pass here. I couldn't reproduce the other two, so I didn't change anything for them.
- Cause: every home render called
forkFlows, which scans the viewer's repositories and does per-repo work. That pushed the home's statement count from 38 to 88 in the N+1 test, and above its limit of 70 (148) intest/home-200.test.ts. - Fix: a new
hasForkFamilyinsrc/core/repos.tsis one query: does the viewer write any repo that is a fork or has one?src/web/studio/fork_line.tsruns it first and returns no line when the answer is no. Only viewers with a fork family pay for the full read. These passed:home-200surfaces-adversarialhome-fork-flowsfork-flowstsc --noEmit
- MCP test: "the MCP tool answers the same data" passes for me, and this change doesn't touch the MCP tool. I suspect a timing race: forks are followed in the background, so a fork's standing can change between the two reads the test compares. I haven't confirmed that, and I haven't fixed it.
- Page-bytes test: "the page's own bytes are held" lives in
test/talk-page.test.ts. The check log says that file is red on main too, so I left it alone. - Gate: it flagged
hasForkFamilyas 0.66 similar toclosedByReview. I left it, because the two do different things and the gate only asked "one implementation?".
To try it, open / as someone with no forks. The line is absent and the page runs no extra statements. As a fork whose parent moved on, the line still reads "1 fork behind".
[{"go":"/","look":"signed in with no forks, then as a fork behind its parent","expect":"no fork line for the first; '1 fork behind' linking /forks/flows for the second"}]
🤖 Generated with Claude Code
Nothing changed on this round, and I pushed nothing. The look-pages note is the same gate message as before, now for the older commit 8841245. It is a note, not a failure, and the pull's later commits satisfy it with Looks: /.
The four recurring refusals are met on the current head, d70577f:
- Both doors: the line only links
/forks/flows, which already has its terminal screen (forkflows) and its how-to (docs/features/fork-flows.md). The commits sayNo door: …with that reason. The gate's both-doors rule passes. - Real test input:
test/home-fork-flows.test.tshas noas never. It builds the records with full fields, includingbehindBy, andtsc --noEmitis clean. - Dead code:
forkCounts,forkFlowsLineandhasForkFamilyeach have a caller.test/unused-exports.test.tspasses, apart from two unrelatedsrc/spawn/exports it says are no longer dead. - Issue named: every commit cites #17057.
Still open from the last check:
- MCP flake: "the MCP tool answers the same data" passed on my runs, but failed in the forge's check. I suspect a timing race with background fork-following, and I haven't fixed it.
- Talk page: the page-bytes test in
test/talk-page.test.tsis red on main too, so it isn't this pull's. - Screenshots: none are attached. The sandbox can't take them.
I changed nothing and pushed nothing. I found no failure in this pull that I can reproduce.
- Failures that are red on main too: the check log itself says these also fail on main at cec8b4d and doesn't count them against this pull. They cover talk-phone, talk-pane-bar, talk-page, phone-targets, guest-pull, mcp-flow-drift-update and runner-adopt. My four commits don't touch any of those areas. The pull only adds the home fork line,
hasForkFamilyinsrc/core/repos.ts, and abehindByfield insrc/core/fork_flows.ts, withtest/home-fork-flows.test.ts. - The one failure the check did count:
test/contribute-no-forge.test.ts, which the log says is green on main in 3 runs. It passes here in all three runs I did: 11 of 11 each time. It also passes in the same process astest/guest-pull.test.tsandtest/home-fork-flows.test.ts. The guest-pull tests fail locally in that run, as they do on main. - Likely cause: I think the contribute-no-forge failure was load flakiness on shard 43. That shard also holds the guest-pull tests, which are red on main, and the contribute-no-forge failures were all quick ones (about 35 ms). That is a guess. I couldn't see the failure message from the log.
If the check red-flags this test again, I'd need the assertion text from the log to go further.
The home now shows one line of the fork flows when the viewer has a fork family: "N offers waiting upstream · M offered to you · K forks behind". The line links
/forks/flows. The new tests,test/page-budget.test.tsandtest/home-no-shift.test.tspass unchanged, andtscand the gate are clean. I did not run the full suite, only the files above.src/web/pages/home_forks.ts, wired intosrc/web/pages/home_flow.ts. It is server-rendered, adds no script, and readsforkFlows(stored state only).forkFlowsand the kept standing words. No new dependency, no module-level state, no new CSS.Tests in
test/home-fork-flows.test.tscover four cases:What I left out:
forkFlowsdoesn't list bare forks.No door:. The line only links the existing terminal screen and how-to for fork flows, so I added no new TUI screen or doc.To try it, sign in on the preview as a user who forked a repository and opened a pull upstream, then open
/. The line appears under the header and links to/forks/flows. A user with no forks or offers sees no line.🤖 Generated with Claude Code
Closes #17057