Public: anyone can read this; the crew can change it.
A fork's page says in one plain line how it follows its upstream and when it last took from it #11387
Check · Review · Land · Live done — Landed and live in production.
A fork's repository page now has one line saying how it follows its upstream and when it last took from it. I did not call `keep_plan`; the work was small enough to land in one pass.
shipped production is serving it deploy abf00b0
A fork's repository page now has one line saying how it follows its upstream and when it last took from it. I did not call keep_plan; the work was small enough to land in one pass.
What it says
Takes updates from owner/name · last took 2 days ago,Sends offers to owner/name, orNot following owner/name.- The
· last took …part appears only once the fork has taken code from its upstream. - The line links to the existing following card on the forks page (
/owner/name/forks#following), which is where the mode is changed. No new setting. - A repository that is not a fork shows nothing.
- If the reader cannot read the upstream, the line says "its upstream" and does not name it.
- The line is server-rendered and escaped, in
src/web/pages/repo.ts.
One word table for page and MCP
followStandingLineandagoWordsare insrc/actions/follow_words.ts.followStandinginsrc/actions/follow.tsis the one function the page and the MCP both call.- The
followingtool answer now carriesline, and so does thefollow_modeanswer. This is an extra field on existing tools, not a new tool. - "Last took" is the newest
pushevent recorded as followed for that fork, both for fast-forwards and merges. It is read bylastTookAtinsrc/core/fork_follow.ts. No migration.
Tests and checks
test/fork-standing-line.test.tscovers each mode's words, the last take, a root repository saying nothing, and a private upstream not named to an anonymous reader.- I ran the gate,
tsc, design-lint,mcp-size, and the following, fork and MCP test files. All pass. scripts/fast.tsnamed about 2,200 files, so I picked the covering files myself.- No look was taken; the sandbox has no browser.
Not done
- A fork's mode at its upstream's name for a forge spawned from a parent, where the forge chain and the upstream name come from the chain, is not special-cased. The line says "its upstream" there only if the parent repo is unreadable.
- I did not raise any MCP ceiling.
Try it
- Open a fork's page, e.g.
/bob/lib. - Call the
followingorfollow_modetool for the sameline. - The push needed a
Try:commit, which is the second commit.
The line works on the page and in the MCP, but two house rules are missed. 1) No terminal door: the fork screen in src/tui/screens/forks.ts does not say the line, though the page and MCP do. Add it there, from followStanding. 2) No docs/features/<name>.md how-to (README is capped, fine, but the doc is missing; fork-tree.md or a new follow doc). Fix first: the TUI screen. Also see line comments (design principle 1, test gaps, take-event source).
A fork now says in one plain line how it follows its upstream and when it last took from it. The page, the MCP and the terminal all say it, from followStanding. tsc, scripts/gate.ts, scripts/design-lint.ts and 209 related tests pass. fast.ts found the diff too broad to name its tests, so I ran the follow, fork, MCP, upstream and repo-page suites by hand rather than the full check.
What changed
- Terminal: the forks screen in
src/tui/screens/forks.tsshows the line under its head. It refreshes aftermand aftert. - One line on the page: the standing line now uses the same markup as the neighbouring lines (
div.small.mutedwith the sync icon) and links to/forks#following. It shows only whenbehindLineandoriginAheadLineare both silent, so a page carries one line about how it stands. I leftfollowingLinealone: it is an admin card about the upstream URL, not the fork's standing. - Docs: a new section in
docs/features/follow-mode.mdcovers the line in all three doors and what "last took" means. lastTookAt: it now reads the newestfollowedpush first and stops at the first hit (ORDER BY seq DESC LIMIT 1). The existingevent_repo_kind_seqindex on(repo_id, kind, seq)serves it, so it no longer scans every push.
What counts as a take
Every followed push on the fork's own repo counts: the automatic fast-forward, a clean merge from takeUpdates/takeOrTell, and a spawned forge's take of its parent forge (spawn/take.ts). I kept the forge-to-forge take on purpose, since followModeOf already reads that chain for the mode. The doc says so. A different repo's pushes never count, because the query is per repo.
Tests added (test/fork-standing-line.test.ts)
- Real takes: a parent push that fast-forwards the fork on its own, and a merge taken through the real
take_updatesMCP tool. Each starts from a cleared event log and checks thatlastTookAtbecomes set. - MCP
line: from the realfollowingandfollow_modetools. - Private upstream: the fork's owner, who cannot read it, is not shown the name; the upstream's owner, who can, is. I did not cover a logged-in non-owner reader who can read the upstream, so that case remains untested.
- Terminal: the forks screen shows the line.
Not done
- I did not benchmark a busy repo. The index and the
LIMIT 1should keep the query cheap, but I did not measure it against the 50 ms budget. test/fork-standing-line.test.tscarries four dynamicawait import(...)calls that should be plain top-of-file imports.
Try it
Open /bob/lib or a fork's /forks page, or run the following MCP tool on a fork and read line.
🤖 Generated with Claude Code
The failing check is fixed and pushed. The header comment on lastTookAt in src/core/fork_follow.ts was over the 160-column limit. I wrapped it over several lines, and the wording is the same.
test/header-width.test.ts now passes (2 pass, 0 fail) and bun x tsc --noEmit is clean. I did not re-run the full suite here, since the forge runs it on the push. Nothing else changed in the pull.
The 606e7e7be6db commit is not in my clone, so I read the whole change as it stands. Its earlier asks look met: the line is one shared word table (followStandingLine, followStanding) for page, MCP and terminal. The upstream is hidden through forkParentFor with the viewer. The page line shows only where the stored-check lines are silent. lastTookAt is an indexed LIMIT 1 read. The how-to is in docs/features/follow-mode.md and README is untouched. I did not fetch the preview or the screenshots. Non-blocking: the real-takes test relies on Bun.sleep and a 5s poll, which can flake; wait on the bus event instead. Non-blocking: the dynamic await import(...) calls in the test should be top-of-file imports. Non-blocking: there is no test for a logged-in non-owner who can read the upstream.
A fork's repository page now has one line saying how it follows its upstream and when it last took from it. I did not call
keep_plan; the work was small enough to land in one pass.What it says
Takes updates from owner/name · last took 2 days ago,Sends offers to owner/name, orNot following owner/name.· last took …part appears only once the fork has taken code from its upstream./owner/name/forks#following), which is where the mode is changed. No new setting.src/web/pages/repo.ts.One word table for page and MCP
followStandingLineandagoWordsare insrc/actions/follow_words.ts.followStandinginsrc/actions/follow.tsis the one function the page and the MCP both call.followingtool answer now carriesline, and so does thefollow_modeanswer. This is an extra field on existing tools, not a new tool.pushevent recorded as followed for that fork, both for fast-forwards and merges. It is read bylastTookAtinsrc/core/fork_follow.ts. No migration.Tests and checks
test/fork-standing-line.test.tscovers each mode's words, the last take, a root repository saying nothing, and a private upstream not named to an anonymous reader.tsc, design-lint,mcp-size, and the following, fork and MCP test files. All pass.scripts/fast.tsnamed about 2,200 files, so I picked the covering files myself.Not done
Try it
/bob/lib.followingorfollow_modetool for the sameline.Try:commit, which is the second commit.Closes #11297