Public: anyone can read this; the crew can change it.

A fork's page names how it follows upstream (automatic or propose only) in one plain line with the one action to change it #14741

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

A fork's page now shows one plain line saying how it follows upstream. The same sentence comes back in the MCP tree read. I did not add test/mcp-size.test.ts's ceiling changes or a new tool, and the size test passes with the new field.

Notes

shipped production is serving it deploy 7be111a

opened this

A fork's page now shows one plain line saying how it follows upstream. The same sentence comes back in the MCP tree read. I did not add test/mcp-size.test.ts's ceiling changes or a new tool, and the size test passes with the new field.

The follow mode already existed (take-updates, tell-me, dont-follow), so no new setting was added. bun x tsc --noEmit, scripts/gate.ts --fix and scripts/design-lint.ts are clean, and the new test plus mcp-size, follow-choice, follow-words, fork-follow-word, fork-standing-line and fork-tree-follow pass. scripts/fast.ts found the diff too broad to name tests, so I picked those by hand.

  • Wording: FOLLOW_LINE in src/actions/follow_words.ts holds the three sentences. They are "Follows upstream automatically", "Proposes upstream changes for you to take" and, for dont-follow, "Does not follow upstream". The issue named only the first two. The third is my wording, so a severed fork does not read as following.
  • Page: followLine in src/web/chrome.ts draws it under the lineage line in the repository header, for forks only. An admin of the fork sees it as a link to /<owner>/<name>/settings#follow-choice, the existing choice form. Anyone else, signed in or not, sees plain text. A repository that is not a fork shows no line.
  • MCP: explore with kind=tree gains a top-level line in forkTreeRows, which is null for a non-fork. I chose the tree read because it is the existing per-repository read and avoids a new tool.
  • Tests: test/fork-follow-line.test.ts covers both modes' wording, the owner link versus the plain text for a non-owner and a stranger, no line on an unrelated repository, and the MCP sentence matching the page.
  • Mode source: the header reads the stored mode directly because it renders synchronously. The existing follows text on tree rows still comes from followModeOf, which also considers a forge-chain link. I left that alone, so the two can differ only for a fork that has such a link.
  • Pre-push hook: it demanded a "Try:" line in a commit message, so there is an empty commit carrying one.

Try it: open /bea/lib-style fork pages as the fork's owner, as another user, and signed out. Then call explore with kind=tree and app set to the fork, and read line.

[
  {"go": "/<owner>/<fork>", "look": "line under the header, signed in as the fork's owner", "expect": "'Follows upstream automatically' or 'Proposes upstream changes for you to take' as a link to /settings#follow-choice"},
  {"go": "/<owner>/<fork>", "look": "same line, signed out or as another user", "expect": "same words, no link"},
  {"go": "/<owner>/<non-fork>", "look": "under the header", "expect": "no follow line"}
]

🤖 Generated with Claude Code

Closes #14706

Show 6 earlier items

7 earlier comments · 1 event
commented

All four requested changes are done and pushed. tsc is clean and the four affected test files pass (28 tests); the full suite was not run.

  1. How-to: docs/features/follow-choice.md now has a "Where the line is" section. It covers the three sentences, the owner's link to /settings#follow-choice, the MCP line field and the terminal. I also rewrote the "A fork's header" paragraph in docs/features/fork-tree.md, which described the old one-word form.
  2. Terminal test: test/fork-follow-line.test.ts now renders forkTreeScreen through the headless TUI. It checks the sentence for a fork in both modes and that a non-fork shows none. forkTreeScreen now loads the sentence asynchronously through load().
  3. One source: a single followLine(app, repo) in src/actions/follow.ts reads the mode through followModeOf. forkTreeRows and the terminal both call it, so the MCP read and the terminal agree with the rows' own "follows" text.
  4. Principle 1: I removed the extra header line. The sentence now replaces the one-word link inside the existing lineage line: forked from a/b · Proposes upstream changes for you to take · 2 behind. Only the fork's admin gets a link, to /settings#follow-choice; everyone else gets plain text. This changes the old one-word link, so I updated test/fork-follow-word.test.ts and test/provenance.test.ts to match.

One gap remains. The header is rendered synchronously and cannot read the forge-link document that followModeOf consults. It still reads forkFollowMode. The two can only differ for the forge's own linked code repository, and that case is not a fork, so no line is shown there.

I left the over-100-column comment in fork_tree_rows.ts alone. It is an existing line on main, and the gate says the nightly rewrap handles it.

To try it, open a fork's page (for example /bea/lib) and read the lineage line. As the owner the sentence links to settings. The terminal's fork tree opens with the same sentence.

commented

<!-- look-pages cf4a03090be2 --> Look pages for cf4a030, from the gate:

  • look pages (inferred): this pull changes src/web/chrome.ts; the forge pictures / (src/web/chrome.ts), /docs (src/web/chrome.ts), /explore (src/web/chrome.ts) and 25 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

The three tests that failed because of this pull now pass, and the fix is pushed as 92c63de94. I haven't seen the forge's full check re-run on the push.

What went wrong. The fork header's new settings link called canAdmin on every repository page. That added one SQL statement per page and broke three tests that pin statement counts: wallet.test.ts (41 against a limit of 40), did-you-mean.test.ts (42 against a pinned 41) and tui-workflows.test.ts.

The fix. In src/web/chrome.ts, canAdmin now runs only when the repository has a parent. A repository that isn't a fork pays no extra query, and a fork's header is unchanged.

What I ran. I re-ran wallet, did-you-mean and tui-workflows (21 pass, 0 fail), plus bun x tsc --noEmit and bun scripts/gate.ts --fix. The gate rewrapped nothing. It noted one comment line over 100 columns in src/actions/fork_tree_rows.ts, which I left for the nightly rewrap on main.

Not run. scripts/fast.ts named 2631 test files, about 222 minutes, so I didn't run that set here. The forge's check does.

Failures I didn't touch. The check log says these are red on main at 593fb67 as well, so they aren't this pull's:

  • the docs index test
  • the fetch-timeout sweep
  • the /llms.txt byte budget
  • the outbound sweep
  • the two page-budget suites
  • llms-budget
commented

Nothing in this feedback asks for a code change, so I pushed nothing. The look-pages comment is the gate's inferred list of pages to picture, because src/web/chrome.ts changed. The hold ("production is rolling, hold changes to it until it settles") is about production. This pull only gets a preview, and I merge nothing, so the hold doesn't touch it.

Pull description

A fork's header now says in one plain line how it follows upstream:

  • "Follows upstream automatically"
  • "Proposes upstream changes for you to take"
  • "Does not follow upstream"

The wording lives in one place, FOLLOW_LINE in src/actions/follow_words.ts. The header, the MCP fork-tree read (rows.line) and the terminal fork tree all use it. The terminal tree opens with it above the rows.

When the viewer may administer the fork, the line links to /settings#follow-choice. Everyone else sees the same line as plain text. A repository that is no fork shows no line.

The last push fixed a statement-count regression. The settings-link check (canAdmin) now runs only beside a parent. Pages of non-forks therefore cost the same number of SQL statements as before. wallet, did-you-mean and tui-workflows pass again, and the type check is clean.

I did not touch the failures the check showed are red on main too: the docs index, the fetch-timeout sweep, the /llms.txt byte budget, the outbound sweep and the two page-budget suites. I didn't run scripts/fast.ts's 2631-file set locally. The forge's check runs it.

To try it: open a fork's page, for example /bea/lib, and read the line under the header. As the fork's owner, the line links to /settings#follow-choice.

[
  {"go": "/bea/lib", "look": "the line under the header, beside 'forked from'", "expect": "one plain sentence on how the fork follows upstream; for the owner it is a link to /settings#follow-choice, for anyone else plain text", "ask": "does the sentence read clearly without knowing the setting's names?"},
  {"go": "/bea", "look": "a repository that is not a fork", "expect": "no follow line"}
]

🤖 Generated with Claude Code

commented

<!-- look-pages 92c63de94401 --> Look pages for 92c63de, from the gate:

  • look pages (inferred): this pull changes src/web/chrome.ts; the forge pictures / (src/web/chrome.ts), /docs (src/web/chrome.ts), /explore (src/web/chrome.ts) and 25 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
Approved — before the latest push

Earlier asks, all met: (1) the how-to is in docs/features/follow-choice.md and fork-tree.md, with nothing added to README; (2) the terminal screen has a headless test; (3) followLine in follow.ts is one source for the MCP read and the terminal; (4) the sentence now sits inside the existing lineage line, with no second line. The canAdmin call now runs only beside a parent, so non-fork pages pay no extra SQL statement. The link goes only to the fork admin, and others get a span, so it works with JavaScript off. It is one accent link, no new component class, no new dependency.

Two next steps, both non-blocking:

  • Non-blocking: the header reads forkFollowMode, while followLine reads followModeOf, which also consults the forge-chain link. They can differ only for a fork with such a link. Make the header use the same source when it next goes async.
  • Non-blocking: the long paragraph added to docs/features/fork-tree.md should be rewrapped to 120 columns.
commented

I rewrapped the paragraph in docs/features/fork-tree.md to 120 columns and pushed it as 191c37806. I didn't act on the other non-blocking note.

Why I left the header's source alone. The header reads forkFollowMode while followLine reads followModeOf, which also consults the forge-chain link. The two can differ only for a fork with such a link. The header's lineageLine is synchronous, and making it use followModeOf means making the header async. That touches every page that draws a header, so I'm leaving it for the change that makes the header async anyway, as you suggested.

Tests. The change is documentation only. test/docs-link.test.ts still has 1 failing test of 13. It is the docs index test the earlier check showed red on main too, and it isn't caused by this edit. I didn't run scripts/fast.ts's 2631-file set locally; the forge's check does.

The look-pages comment is the gate's inferred list of pages to picture, as before, and asks for no change.

Pull description

A fork's header says in one plain line how it follows upstream ("Follows upstream automatically", "Proposes upstream changes for you to take" or "Does not follow upstream"). The wording is FOLLOW_LINE in src/actions/follow_words.ts, shared by the header, the MCP fork-tree read and the terminal fork tree through followLine. The sentence sits inside the existing lineage line. For the fork's admin it links to /settings#follow-choice; everyone else sees plain text, so it works with JavaScript off. canAdmin runs only beside a parent, so pages of non-forks cost no extra SQL statement. There is no new dependency and no new component class.

I did not make the header read followModeOf; see above.

To try it: open a fork's page, for example /bea/lib, and read the line under the header. The how-to is in docs/features/follow-choice.md and docs/features/fork-tree.md.

[
  {"go": "/bea/lib", "look": "the line under the header, beside 'forked from'", "expect": "one plain sentence on how the fork follows upstream; for the owner it links to /settings#follow-choice, for anyone else plain text"},
  {"go": "/bea", "look": "a repository that is not a fork", "expect": "no follow line"}
]

🤖 Generated with Claude Code

commented

<!-- look-pages 191c3780698f --> Look pages for 191c378, from the gate:

  • look pages (inferred): this pull changes src/web/chrome.ts; the forge pictures / (src/web/chrome.ts), /docs (src/web/chrome.ts), /explore (src/web/chrome.ts) and 25 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

This feedback is the gate's automatic look-pages note for 191c378. It asks for no change, so I pushed nothing. The pages it lists are the ones whose routes import src/web/chrome.ts, and 191c378 itself only rewrapped a docs paragraph.

Pull description

A fork's header says in one plain line how it follows upstream: "Follows upstream automatically", "Proposes upstream changes for you to take" or "Does not follow upstream". FOLLOW_LINE in src/actions/follow_words.ts holds the wording, and the header, the MCP fork-tree read and the terminal fork tree share it through followLine.

The sentence sits inside the existing lineage line. The fork's admin gets a link to /settings#follow-choice. Everyone else sees plain text, so it works with JavaScript off. canAdmin runs only beside a parent, so pages of non-forks cost no extra SQL statement. There is no new dependency and no new component class. The how-to is in docs/features/follow-choice.md and docs/features/fork-tree.md.

Not done:

  • The header still reads forkFollowMode while followLine reads followModeOf. They differ only for a fork with a forge-chain link. Switching the header means making it async. That change touches every header, so I left it for when the header goes async anyway.
  • I didn't run scripts/fast.ts's 2631-file set locally; the forge's check does.
  • Several tests were red on main too, including the docs index test, so they aren't counted against this pull.

To try it: open a fork's page, for example /bea/lib, and read the line under the header.

[
  {"go": "/bea/lib", "look": "the line under the header, beside 'forked from'", "expect": "one plain sentence on how the fork follows upstream; for the owner it links to /settings#follow-choice, for anyone else plain text"},
  {"go": "/bea", "look": "a repository that is not a fork", "expect": "no follow line"}
]

🤖 Generated with Claude Code

Approved

Earlier asks are met: the how-to is in docs/features/follow-choice.md and fork-tree.md (not README); the terminal fork tree is tested; the MCP, terminal and header share FOLLOW_LINE through followLine; the sentence now sits inside the lineage line instead of a second line (principle 1). Only a docs rewrap changed since my last read. The owner gets a link, everyone else gets plain text, and it works with JavaScript off. Next two things I would do: (1) Non-blocking: make the header read followModeOf when the header goes async, so it cannot differ from the MCP and terminal for a forge-chain link. (2) Non-blocking: add a test that the 360px lineage line wraps cleanly now that it is a full sentence.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs