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

On a fork, the terminal's forks screen takes the parent's updates with `t` after a confirm: fast-forward, clean merge, or the converge issue on a conflict, as MCP `take_updates` does #7495

Merged opened this

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

Merged

On a fork that is behind its parent, the terminal's forks screen (`src/tui/screens/forks.ts`) now offers `t` to take the parent's updates. The page, the API and MCP `take_updates` already do this through `takeOrTell`.

shipped production is serving it deploy 119f4d2

opened this

On a fork that is behind its parent, the terminal's forks screen (src/tui/screens/forks.ts) now offers t to take the parent's updates. The page, the API and MCP take_updates already do this through takeOrTell.

Who is offered t: a person who can write the fork, when the parent is not frozen. A reader, an agent, a fork in step and a repository that follows nothing don't get the key, and its hint only appears when it is offered.

The confirm: it says what will happen before anything moves:

  • Fast-forward to alice/app: N commits.
  • Merge N commits from alice/app; your M commits stay.
  • Both sides changed <files>: the crew is told on a converge issue.

y or Enter on the button calls takeOrTell; n or Esc moves nothing. The screen then re-reads the fork and shows the result as a toast.

On a conflict: the crew's line carries the converge issue that was opened or found, and the cursor sits on it, so Enter opens that issue. This also changes what Enter does on that line in general: it used to open the parent repository, and now it opens the converge issue whenever there is one.

What to look at:

  • Shared wording (first commit, no behaviour change): the result sentences the following page built inline are now takeWords in src/actions/follow.ts. nothingNew moved there too. The following page and the terminal call the same function, and src/web/pages/repo.ts imports nothingNew from its new home.
  • takeOffer (second commit): a pure function decides whether t is offered and what the confirm says. docs/FOLLOWING.md describes the new key.
  • Test: test/tui-forks-take.test.ts covers takeOffer, then runs the screen headless:

- a reader's t does nothing; - a repository that follows nothing has no t; - t then n leaves the fork 1 behind; - t then y brings it level and shows Took alice/app's updates: main is at …; - on a conflict, t then y names the converge issue and Enter opens it.

Forks that have no commits of their own follow their parent automatically, so to get a fork that is only behind, the test sets the fork's branch back one commit with git update-ref.

Checks: tsc is clean, design-lint passes, and test/mcp-size.test.ts passes. The MCP is unchanged; no new tool. scripts/fast.ts said the diff was too broad to name tests, so I picked the 26 test files that cover following, forks and the moved wording; all 194 tests pass.

Not done: u (propose upstream, #7449) is left to its own issue. Both changes only add a key to this screen.

To try it: open a fork that is behind its parent in the terminal, press f for its forks screen, then t, then y.

🤖 Generated with Claude Code

Closes #7487

commented

On a fork that is behind its parent, the terminal's forks screen (src/tui/screens/forks.ts) now offers t to take the parent's updates. The page, the API and MCP take_updates already do this through takeOrTell.

Who is offered t: a person who can write the fork, when the parent is not frozen. A reader, an agent, a fork in step and a repository that follows nothing don't get the key, and its hint only appears when it is offered.

The confirm: it says what will happen before anything moves:

  • Fast-forward to alice/app: N commits.
  • Merge N commits from alice/app; your M commits stay.
  • Both sides changed <files>: the crew is told on a converge issue.

y or Enter on the button calls takeOrTell; n or Esc moves nothing. The screen then re-reads the fork and shows the result as a toast.

On a conflict: the crew's line carries the converge issue that was opened or found, and the cursor sits on it, so Enter opens that issue. This also changes what Enter does on that line in general: it used to open the parent repository, and now it opens the converge issue whenever there is one.

What to look at:

  • Shared wording (first commit, no behaviour change): the result sentences the following page built inline are now takeWords in src/actions/follow.ts. nothingNew moved there too. The following page and the terminal call the same function, and src/web/pages/repo.ts imports nothingNew from its new home.
  • takeOffer (second commit): a pure function decides whether t is offered and what the confirm says. docs/FOLLOWING.md describes the new key.
  • Test: test/tui-forks-take.test.ts covers takeOffer, then runs the screen headless:

- a reader's t does nothing; - a repository that follows nothing has no t; - t then n leaves the fork 1 behind; - t then y brings it level and shows Took alice/app's updates: main is at …; - on a conflict, t then y names the converge issue and Enter opens it.

Forks that have no commits of their own follow their parent automatically, so to get a fork that is only behind, the test sets the fork's branch back one commit with git update-ref.

Checks: tsc is clean, design-lint passes, and test/mcp-size.test.ts passes. The MCP is unchanged; no new tool. scripts/fast.ts said the diff was too broad to name tests, so I picked the 26 test files that cover following, forks and the moved wording; all 194 tests pass.

Not done: u (propose upstream, #7449) is left to its own issue. Both changes only add a key to this screen.

To try it: open a fork that is behind its parent in the terminal, press f for its forks screen, then t, then y.

🤖 Generated with Claude Code

Approved

Approved. The terminal door now matches the page: t is offered only to a person who writes a fork that is behind a live parent. The confirm names the outcome before anything moves, and y calls takeOrTell, the same call the page and MCP take_updates use. The result wording is shared through takeWords, so the doors cannot drift. The tests cover offer, reader, no-parent, cancel, fast-forward and conflict-then-Enter. Web files only had wording moved, so DESIGN.md is untouched.

Two things I would do next:

  1. Add a blank line between convergeWords and the nothingNew doc comment in src/actions/follow.ts, and order the nothingNew import in src/web/pages/repo.ts with the other imports.
  2. Add one screen-level test for an agent session. Today the agent case is only checked on the pure takeOffer.

I did not run the preview or the tests. The clone I was given still has the base code, so this review is from the diff alone.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs