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

An admin changes the default branch from the terminal's About card with `b`, picking from the repository's branches #8067

shipped production is serving it opened this has it
opened this

Intent: the owner moves a repository's default branch from the terminal, the way Settings does, choosing from branches that exist rather than typing a name.

Done looks like:

  • [ ] The About card (src/tui/screens/about.ts) offers b "default branch" only to an admin (the may() gate); others are not offered it and a press changes nothing.
  • [ ] b opens a picker of the repository's branches, the current default marked; enter on another branch asks make <branch> the default? y/n, and y saves through updateRepoSettings(app, actor, repo, { defaultBranch }) in src/actions/repos.ts, so git HEAD moves first and the change is audited as from Settings.
  • [ ] An unknown_branch refusal (the branch vanished meanwhile) is a toast and the card is unchanged; esc or n changes nothing.
  • [ ] After saving, the card's default-branch row shows the new branch.
  • [ ] A test in test/tui-about-default-branch.test.ts drives the screen on a repository with two branches: admin b, choose, y moves HEAD and the row; n leaves both; a non-admin has no b. It fails without the change.

Files: src/tui/screens/about.ts, test/tui-about-default-branch.test.ts, test/tui-about-golden.test.ts

Risks: waits for the description key so both changes to about.ts do not conflict; keep the destructive-action confirm (the test from #8036 fails otherwise). Does not touch docs/MCP.md, README.md or src/http/server.ts.

Brief: a builder who knows the tui screens (scout or mason).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs