Public: anyone can read this; the crew can change it.
Fork offers, following upstream and detaching can be done from the terminal, with the same words as the pages #15357
Check · Review · Land · Live done — Landed and live in production.
The terminal already had all four actions. What was missing was the how-to that records them, so I added that, took the four pages off the doorless list and added a test. No terminal code changed.
shipped production is serving it deploy 0adf720
The terminal already had all four actions. What was missing was the how-to that records them, so I added that, took the four pages off the doorless list and added a test. No terminal code changed.
What the terminal already does, with the same src/actions functions as the pages:
- Offers: the Forks screen lists the offers forks sent (
forkOffers), and a fork's own screen lists what it sent (sentOffers). - Offering upstream:
offerCommiton a commit,offerPullon a merged pull, anduon the Forks screen to propose. - Follow mode:
mon the Forks screen callssetFollowMode, andzundoes the last change. - Detach:
xon a fork's About card. It dry-runsdetachFromParent, showsdetachPlanWordsin a confirm dialog, and only starts the real detach on "Detach".
What changed:
- New how-to:
docs/features/fork-tree-terminal.mdnames both doors for each of the four actions, with the page file and the terminal file.scripts/doorless.tscounts a page as having a terminal door when a how-to names both. - Allow list:
scripts/doorless-allow.jsonlostdetach.ts,fork-offers.ts,offer-upstream.tsandupstream-follow.ts(bun scripts/doorless.ts --write). - Tests: the new
test/tui-fork-offers.test.tshas three cases.- The upstream's Forks screen lists a fork's offer from a fixture.
- Detach shows its plan first, and when dismissed no job starts and
forkParentIdis unchanged. - Someone with no standing on the fork is not offered the
xkey.
bun scripts/gate.ts --fix, tsc --noEmit and test/tui-fork-offers.test.ts, test/doorless.test.ts and test/feature-orphans.test.ts pass. I did not run the whole suite; the forge's check does that.
What I left out:
- I did not touch the terminal code, since it already did the job.
- I did not test the confirmed path, where "Detach" is chosen and the repack runs.
test/fork-detach.test.tscovers that, and I chose not to run a repack in a screen test.
To try it: open a fork over ssh and press I for the About card, then x. Press esc at the confirm and nothing changes. On the fork's Forks screen, m changes how it follows.
The failed check on #15357 is fixed and pushed. The gate flagged the two as never casts on the key presses in test/tui-fork-offers.test.ts. I replaced them with a press(key) helper that builds a full KeyEvent.
Run locally after the change, bun scripts/gate.ts now prints nothing, tsc --noEmit is clean, and the three tests in that file pass.
The pull is otherwise as described before: the terminal already had all four actions, and the pull adds the how-to, takes the four pages off the doorless list and adds the test.
Approved. The terminal already carried all four actions (forks.ts offers/follow mode, commits.ts and pull.ts offers, about.ts detach with a dry-run plan and confirm), each through the same src/actions function as its page; this pull records that in docs/features/fork-tree-terminal.md (not README), drops the four pages from the doorless list, and tests the offer listing and the unconfirmed detach. No new code, dependency or TODO. The preview answers 200; this change touches no page. Next two things: (1) add a test of the confirmed Detach path at the screen level with a stubbed job, so the wiring of onChoose is covered beside the esc case; (2) add a test that the Forks screen m key cycles the follow mode, since the how-to promises it and only offers are tested.
The terminal already had all four actions. What was missing was the how-to that records them, so I added that, took the four pages off the doorless list and added a test. No terminal code changed.
What the terminal already does, with the same
src/actionsfunctions as the pages:forkOffers), and a fork's own screen lists what it sent (sentOffers).offerCommiton a commit,offerPullon a merged pull, anduon the Forks screen to propose.mon the Forks screen callssetFollowMode, andzundoes the last change.xon a fork's About card. It dry-runsdetachFromParent, showsdetachPlanWordsin a confirm dialog, and only starts the real detach on "Detach".What changed:
docs/features/fork-tree-terminal.mdnames both doors for each of the four actions, with the page file and the terminal file.scripts/doorless.tscounts a page as having a terminal door when a how-to names both.scripts/doorless-allow.jsonlostdetach.ts,fork-offers.ts,offer-upstream.tsandupstream-follow.ts(bun scripts/doorless.ts --write).test/tui-fork-offers.test.tshas three cases.forkParentIdis unchanged.xkey.bun scripts/gate.ts --fix,tsc --noEmitandtest/tui-fork-offers.test.ts,test/doorless.test.tsandtest/feature-orphans.test.tspass. I did not run the whole suite; the forge's check does that.What I left out:
test/fork-detach.test.tscovers that, and I chose not to run a repack in a screen test.To try it: open a fork over
sshand pressIfor the About card, thenx. Pressescat the confirm and nothing changes. On the fork's Forks screen,mchanges how it follows.Closes #15354