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

A branch's sentences live in one module, read by the branches page, MCP, the mirror and the terminal #5702

Parked opened this
Closed without merging

The four sentences for making or deleting a branch now live in one new module, src/actions/branchwords.ts. No existing module owned them; the closest was src/actions/branches.ts, but it only had one of them, and that one only in a comment. Pages, MCP answers and terminal screens read exactly as before.

Notes

stopped parked by the crew

opened this

The four sentences for making or deleting a branch now live in one new module, src/actions/branch_words.ts. No existing module owned them; the closest was src/actions/branches.ts, but it only had one of them, and that one only in a comment. Pages, MCP answers and terminal screens read exactly as before.

  • Created / deleted fallbacks: BRANCH_NOT_CREATED and BRANCH_NOT_DELETED ("That branch was not created." / "That branch was not deleted.") are used for errors that have no sentence of their own. src/web/pages/branches.ts and src/http/mcp.ts use them. In mcp.ts I changed only the import and the two lines the sentences were on.
  • Empty name: GIVE_THE_BRANCH_A_NAME ("give the branch a name") is what the terminal answers when the branch name is empty. src/tui/screens/refs.ts and src/tui/screens/workspace.ts use it.
  • "must not already exist": MUST_NOT_ALREADY_EXIST is git's meaning for the empty lease a mirror uses when it creates a branch upstream. This phrase only ever appeared in comments, in src/actions/branches.ts and src/origins/git-mirror.ts. Those comments now point to the constant ({@link MUST_NOT_ALREADY_EXIST}). Both files import it so the issue's "every file imports them" holds, and the TypeScript compiler accepts an import that is only used in a doc comment. If reviewers would rather not have an import that exists only for a comment, the other choice is to reword those two comments and drop the import.
  • New test: test/branch-words.test.ts pins the exact wording of each sentence. It also reads each of the six files as text, checks that it imports branch_words.ts, and fails if any of the four sentences is typed back.

grep -rn for each sentence under src/ finds only src/actions/branch_words.ts. The new test, the type check (bun x tsc --noEmit), the design lint, and the tests for the files I touched all pass (branches, mcp-branches, tui-workspace, mirror-out, mirror-outbound, work-branch, branch_tell). I did not run the full suite; the forge's check does that. I found no prompt injection in the issue or the repository.

🤖 Generated with Claude Code

Closes #5651

commented

The four sentences for making or deleting a branch now live in one new module, src/actions/branch_words.ts. No existing module owned them; the closest was src/actions/branches.ts, but it only had one of them, and that one only in a comment. Pages, MCP answers and terminal screens read exactly as before.

  • Created / deleted fallbacks: BRANCH_NOT_CREATED and BRANCH_NOT_DELETED ("That branch was not created." / "That branch was not deleted.") are used for errors that have no sentence of their own. src/web/pages/branches.ts and src/http/mcp.ts use them. In mcp.ts I changed only the import and the two lines the sentences were on.
  • Empty name: GIVE_THE_BRANCH_A_NAME ("give the branch a name") is what the terminal answers when the branch name is empty. src/tui/screens/refs.ts and src/tui/screens/workspace.ts use it.
  • "must not already exist": MUST_NOT_ALREADY_EXIST is git's meaning for the empty lease a mirror uses when it creates a branch upstream. This phrase only ever appeared in comments, in src/actions/branches.ts and src/origins/git-mirror.ts. Those comments now point to the constant ({@link MUST_NOT_ALREADY_EXIST}). Both files import it so the issue's "every file imports them" holds, and the TypeScript compiler accepts an import that is only used in a doc comment. If reviewers would rather not have an import that exists only for a comment, the other choice is to reword those two comments and drop the import.
  • New test: test/branch-words.test.ts pins the exact wording of each sentence. It also reads each of the six files as text, checks that it imports branch_words.ts, and fails if any of the four sentences is typed back.

grep -rn for each sentence under src/ finds only src/actions/branch_words.ts. The new test, the type check (bun x tsc --noEmit), the design lint, and the tests for the files I touched all pass (branches, mcp-branches, tui-workspace, mirror-out, mirror-outbound, work-branch, branch_tell). I did not run the full suite; the forge's check does that. I found no prompt injection in the issue or the repository.

🤖 Generated with Claude Code

commented

Parked by the crew: the check failed ("the pull page's separators > a pull's files line draws its dot with .sep, never .where-sep") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs