Public: anyone can read this; the crew can change it.
A fork's page names when it last followed upstream, in one line, from the sync record #15600
Check · Review · Land · Live done — Landed and live in production.
A fork's page and its tree lists now say when it last followed upstream, in one line read from the existing follow record. I ran the gate, tsc and the follow, fork-tree and fork-standing tests, and all are clean. I did not run the full suite, and I did not boot the app to look at a fork page.
shipped production is serving it deploy b03b44b
3 earlier comments · 2 events
A fork's page and its tree lists now say when it last followed upstream, in one line read from the existing follow record. I ran the gate, tsc and the follow, fork-tree and fork-standing tests, and all are clean. I did not run the full suite, and I did not boot the app to look at a fork page.
- Phrasings: "followed upstream 3 hours ago", "never followed", and "waiting for the crew". The last shows when the newest follow hit a conflict that no later take has cleared. A check that found nothing new counts as having followed. The words come from
followedWordsinsrc/actions/follow_words.ts. - Where it shows:
- A fork's page, as its own line under the standing sentence.
- The Forks tab list, where it replaces "last took …".
- The fork tree data (a new
followedfield on each tree node), and the terminal tree, which adds the line after the existing "last took" text.
- Reads only: the line is computed from the existing
fork.followedevents and take times. There is no new table and no migration. - Tests:
test/following-followed-line.test.tscovers the three phrasings, plus the case where a take clears a conflict. I changed two assertions intest/fork-last-follow.test.tsbecause the standing line now ends with "waiting for the crew" and the web list no longer prints "last took". Docs: a section indocs/FOLLOWING.mdand a paragraph indocs/features/fork-last-follow.md.
What I left out:
- No relative-time refresh in the browser; the line updates through the page's existing live standing region.
- No look: no page in
app.looksshows a fork's page, so the commit says "No look" with that reason. - The tree adds one indexed event read per node (the 200-node cap bounds it). I did not add a batch reader, and there is no query-plan test for it.
Try it: open any fork's page, /<owner>/<fork>, and the Forks tab of its parent. A fork that has never followed says "never followed"; after a take it says "followed upstream just now".
[
{"go": "/<owner>/<fork>", "look": "the line under the standing sentence", "expect": "never followed, then followed upstream just now after a take"},
{"go": "/<owner>/<parent>/forks", "look": "each fork row's meta", "expect": "the same line in place of last took"}
]The fork tree now reads each fork's follow line in one statement per tree instead of one per fork. I fixed two of the five failing tests and could not reproduce the other three; the forge's check on this push is the real answer for them.
- Cause: my last commit added a "followed upstream …" line to every tree row, read with one query per fork. The 200-fork test counts statements and allows 25, and it saw 209. A new
lastFollows(db, ids)insrc/core/last_follow.tsreads all the rows in one query, andforkTreeuses it. - Test edits:
test/fork-tree-reader.test.tsexpected rows and a terminal line without the new text. I changed those two expectations to includefollowed: "never followed"and· never followed. The tests were stale, not the code. - Not reproduced: "the screen shows the share…" and the
?sort=cache test (test/csv-sort-page.test.ts) pass here. I found the first only by a name search and its file never ran in my full set, so I don't know why the check failed it. The?sort=test may have been a side effect of the statement count, but I haven't confirmed that. - Run before pushing:
tsc --noEmitandbun scripts/gate.ts --fixcame up clean. The gate said it rewrapped comments in one file, butgit statusshowed only my three files modified, so I couldn't tell where.- 78 tests pass across the fork-tree, follow-line, csv-sort, tui-crawlers and every test file that mentions
forkTree,lastFolloworfork_tree. scripts/fast.tsnamed 3378 files, which is too broad to run here, so I ran only the files above.
There is no page change in this commit, so it has no review block.
No security finding: the line is read-only, escaped by html``, no new input. Changes needed:
- (Principle 1) The fork page now says the same fact twice: the conflict clause ('...the crew holds as pull #N.') and then 'waiting for the crew' appended after it (your own test asserts '...#N. waiting for the crew'). Show one line: fold the follow line into the existing clause, or drop one.
- The fork page line only renders when there is no behind/ahead line, so 'never followed' appears in some states and not others; decide one place and make it consistent.
- The Forks tab still does one lastFollow query per fork although you added the batch lastFollows; use it in repo.ts (the direction wants fast pages).
- The terminal tree now prints 'last took X · followed upstream X', saying the same thing twice; replace instead of append, as the web list does.
- No test for lastFollows (batch equals lastFollow per id, absent for never-followed) nor for the terminal/web line beyond the weakened existing ones.
- Naming: the 'took' helper in forkRanking now returns the followed line; rename it. Also: the direction is pipeline first and this is a feature pull; the issue should be justified against it.
A fork's page, its Forks tab and the terminal tree now say when it last followed upstream, each in one line. tsc and the gate are clean, and test/mcp/forks.test.ts still fails locally, as it does on main, so I left it. I ran about 250 related tests. One fork-last-follow test failed in a run where that file was passed twice, and passed alone and in a rerun, so I put it down to the duplicate. I did not run the full suite; the forge's check does that.
Reviewer points, in order:
- Duplicate line on the fork page: I removed the separate line with its own icon. The standing sentence already said "Last took X." and the "Checked … / hit a conflict the crew holds as pull #N" clause. It now adds only "Never followed." when there is no record, so each fact is said once.
followedWordsno longer feeds the fork page. - Consistency on the fork page: the page has one place for the fact, the standing sentence in
followWords. That sentence appears only when no behind/ahead line shows, as it did before. I did not change that rule. If you want the follow line shown even when the behind/ahead lines show, say so. - Batched query on the Forks tab:
repo.tsnow useslastFollows. - Terminal tree: it shows only the follow line, no longer "last took X" beside it.
- Tests:
- New test that
lastFollowsequalslastFollowper id, leaves out a repository that never followed, and skips a bad payload. - The terminal tree test now asserts the line is present and "last took" is gone.
test/fork-standing-line.test.tsexpects "Never followed." on its first three line assertions, andtest/fork-last-follow.test.tsexpects it as the closing sentence.
- New test that
- Naming:
tookinforkRankingis nowfollowedLine.
I did not answer the request to justify the issue against the pipeline-first direction. That is for a person to weigh.
The page change has no new component and the design lint is clean. Review block:
[{"go":"/<owner>/<fork>","look":"the standing sentence under the title","expect":"ends once with the follow record: 'Last took …', the check or conflict clause, or 'Never followed.' for a fork with no record"},
{"go":"/<owner>/<parent>/forks","look":"each fork row","expect":"one follow line: 'followed upstream …', 'never followed' or 'waiting for the crew'"}]Changes needed, one round. First: the issue asks that a fork's page name when it last followed, in one line. On the page, the line shows only when no behind/ahead line shows, so it is missing in most states. Fix that first.
- (Principle 1, one sentence) The fork page is now tied to the standing sentence. It gets 'Never followed.' appended, but never 'waiting for the crew', and 'followedWords' no longer feeds the page. Two vocabularies result: 'Never followed.' and the conflict clause on the page, 'never followed' / 'waiting for the crew' in the lists. Pick one source. Render the page line from
followedWordsas its owndl-style row or meta line that always shows on a fork, and drop the appended sentence and the clause duplication infollowWords. - Docs are wrong. docs/FOLLOWING.md and docs/features/fork-last-follow.md say the fork page uses
followedWords(and citesrc/web/pages/fork-standing.ts, which the diff does not touch). Make them match what ships. TreeNode.tookAtis now only read by a test. Remove it and its read, or use it; do not keep a field for one assertion.- Tests: nothing asserts the web Forks tab shows 'waiting for the crew', or that the fork page line shows when behind/ahead lines also show (the case that is broken). Add both. The
lastFollowstest builds a hand-made event table; use the real schema so a column change fails it. Move the late imports in test/following-followed-line.test.ts to the top. - Direction: this is a feature pull while the owner's direction is pipeline first. Name in the pull which pipeline issue it waits behind, or that none is blocked by it.
Security and design: no findings. No new component, output escaped by html``, reads only. I did not exercise the preview beyond reading the diff.
Every fork's page now has its own line saying when the fork last followed upstream: "followed upstream 3 hours ago", "waiting for the crew" or "never followed". It shows whatever else the page says, including when the behind or ahead line is there, which is the case that was broken. The page, the Forks tab, the terminal's tree and fork_tree's followed all get these words from one function, followedWords.
- Page (
src/web/pages/fork-standing.ts): a new row,data-followed, sits in the live block under the header, so a take or check updates it without a reload. The sentence above it now says only how far the fork is from its parent and what following will do (driftSentence, split out offollowWordsinsrc/actions/follow.ts). The appended "Never followed." is gone, and so is the "Last took …" / conflict clause on the page, so the page uses one set of words. - API, MCP
wordsand terminal forks screen: unchanged. They still say the whole sentence fromfollowWords, including which pull or issue holds a conflict. The test that checks those all say the same sentence now expects the page to show that sentence minus its last-take part, plus the new row. TreeNode.tookAt: removed. MCPfork_treeand the API family tree no longer return it;followedreplaces it. No test depended on it.- Tests:
- New: the Forks tab says "waiting for the crew" after a conflict.
- New: the row shows alongside a behind line (
data-behind-upstream). - New: the row says "never followed" on a fresh fork and is absent on a repository that is not a fork.
- Changed: the
lastFollowstest now writes events through the app into the real event table, and its imports are at the top. - Changed: the page tests in
fork-standing-line,standing-liveandfork-last-followexpect the drift-only sentence and the row, because the page they described has changed.
- Docs:
docs/FOLLOWING.mdanddocs/features/fork-last-follow.mdnow describe what ships. - Direction: #15595 has no dependency edges. No pipeline issue waits on it, and it waits on none. The plan map lists it as holding up #281, which is closed.
One thing I chose not to do: the page's "waiting for the crew" doesn't name the pull or issue that holds the conflict. The behind line links to it where there is one, and the API, MCP and terminal sentence still names it.
Checks run here: scripts/gate.ts --fix, tsc --noEmit and design-lint are clean. scripts/fast.ts named 3,378 files, too many to run, so I ran the 55 test files that touch the follow words, fork trees, the standing line and the forks pages: 371 pass, 0 fail.
To try it: open a fork's page and read the row under the standing sentence. Take updates and it reads "followed upstream just now". Make a conflict and both the page and the parent's Forks tab read "waiting for the crew".
[
{"go": "/<owner>/<fork>", "look": "the rows under the header, inside #fork-standing", "expect": "a muted clock row saying 'never followed', 'followed upstream … ago' or 'waiting for the crew', present even when a behind-upstream line shows"},
{"go": "/<owner>/<fork>", "look": "the standing sentence above it", "expect": "only the drift and what following will do; no 'Never followed.', 'Last took' or conflict clause"},
{"go": "/<owner>/<parent>/forks", "look": "each fork's meta line", "expect": "the same words as the fork's own page row"}
]
🤖 Generated with Claude Code
Earlier asks are met. The fork page says the record once, on its own data-followed row, and the drift sentence no longer repeats it (principle 1). The row shows on every fork, including when the behind line shows, and a test covers that case. The Forks tab uses the batch lastFollows. The terminal tree replaces rather than appends. lastFollows has a test against the real event table. The helper in forkRanking is renamed. The row is a muted dl-style line with the existing clock icon: no new component, no accent, and it works with JavaScript off. The how-to is in docs/features, not README. I did not re-run the preview. The direction concern (a feature pull under pipeline-first) was raised before. The change is small, read-only and has no migration, so I do not block on it.
Two things I would do next:
- Non-blocking: in src/web/pages/fork-standing.ts the new followedLine docblock is inserted under the existing doc comment for lines(), leaving two stacked comments. Move followedLine above that comment so lines() keeps its own.
- Non-blocking: "waiting for the crew" on the page does not link the pull or issue that holds the conflict. Link it when the record names one.
A fork's page and its tree lists now say when it last followed upstream, in one line read from the existing follow record. I ran the gate,
tscand the follow, fork-tree and fork-standing tests, and all are clean. I did not run the full suite, and I did not boot the app to look at a fork page.followedWordsinsrc/actions/follow_words.ts.followedfield on each tree node), and the terminal tree, which adds the line after the existing "last took" text.fork.followedevents and take times. There is no new table and no migration.test/following-followed-line.test.tscovers the three phrasings, plus the case where a take clears a conflict. I changed two assertions intest/fork-last-follow.test.tsbecause the standing line now ends with "waiting for the crew" and the web list no longer prints "last took". Docs: a section indocs/FOLLOWING.mdand a paragraph indocs/features/fork-last-follow.md.What I left out:
app.looksshows a fork's page, so the commit says "No look" with that reason.Try it: open any fork's page,
/<owner>/<fork>, and the Forks tab of its parent. A fork that has never followed says "never followed"; after a take it says "followed upstream just now".Closes #15595