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

An ask that moved on and an unknown bulk operation are said from one module #5682

Merged opened this

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

Merged

Three refusal sentences now live in one module and are imported everywhere they were typed out. The page, the API, the MCP tool and the terminal still say exactly the same words.

shipped production is serving it deploy 40e21c3

opened this

Three refusal sentences now live in one module and are imported everywhere they were typed out. The page, the API, the MCP tool and the terminal still say exactly the same words.

What moved where

  • New module src/actions/asks_words.ts. No module owned these sentences before, so this one is new. It exports:

- NO_LONGER_ASKS = "it no longer asks you" - NO_SUCH_OPERATION = "no such operation here" - NO_SUCH_MILESTONE = "no such milestone here"

  • Files that import them now:

- NO_LONGER_ASKS: src/actions/asks_decide.ts, src/web/studio/asks.ts - NO_SUCH_OPERATION: src/actions/asks_bulk.ts, src/actions/fleet.ts - NO_SUCH_MILESTONE: src/actions/limbs.ts, src/actions/limb_replan.ts

  • Each file changed only on the lines the sentences were on, plus one import line. src/http/mcp.ts and src/http/api.ts are not touched. grep -rn for each sentence under src/ finds only asks_words.ts.
  • New test test/asks-op-words.test.ts. It checks that each sentence reads as before. It also reads each of the six files as text: the test fails if the literal is typed back into one, or if the file stops importing the sentence from asks_words.ts.

Not done: #5614's "sign in to act on your asks" has not landed on main, so it is not in this module. It is still typed out in asks_bulk.ts, asks_decide.ts and proposals.ts, and #5614 can add it here.

Checks: bun x tsc --noEmit and bun scripts/design-lint.ts both pass. Across the asks, fleet and limb tests, 128 pass and 8 fail. The 8 also fail on main without this change, in test/asks-mute.test.ts, test/asks.test.ts, test/asks-rank.test.ts and test/asks-expiry.test.ts (the "All fine" header, the stopped-pull card, five rows, dismiss and hold, the conflicting green pull). No test was changed.

To try it: bun test test/asks-op-words.test.ts, then put "no such operation here" back into src/actions/fleet.ts and watch it fail.

🤖 Generated with Claude Code

Closes #5654

commented

Three refusal sentences now live in one module and are imported everywhere they were typed out. The page, the API, the MCP tool and the terminal still say exactly the same words.

What moved where

  • New module src/actions/asks_words.ts. No module owned these sentences before, so this one is new. It exports:

- NO_LONGER_ASKS = "it no longer asks you" - NO_SUCH_OPERATION = "no such operation here" - NO_SUCH_MILESTONE = "no such milestone here"

  • Files that import them now:

- NO_LONGER_ASKS: src/actions/asks_decide.ts, src/web/studio/asks.ts - NO_SUCH_OPERATION: src/actions/asks_bulk.ts, src/actions/fleet.ts - NO_SUCH_MILESTONE: src/actions/limbs.ts, src/actions/limb_replan.ts

  • Each file changed only on the lines the sentences were on, plus one import line. src/http/mcp.ts and src/http/api.ts are not touched. grep -rn for each sentence under src/ finds only asks_words.ts.
  • New test test/asks-op-words.test.ts. It checks that each sentence reads as before. It also reads each of the six files as text: the test fails if the literal is typed back into one, or if the file stops importing the sentence from asks_words.ts.

Not done: #5614's "sign in to act on your asks" has not landed on main, so it is not in this module. It is still typed out in asks_bulk.ts, asks_decide.ts and proposals.ts, and #5614 can add it here.

Checks: bun x tsc --noEmit and bun scripts/design-lint.ts both pass. Across the asks, fleet and limb tests, 128 pass and 8 fail. The 8 also fail on main without this change, in test/asks-mute.test.ts, test/asks.test.ts, test/asks-rank.test.ts and test/asks-expiry.test.ts (the "All fine" header, the stopped-pull card, five rows, dismiss and hold, the conflicting green pull). No test was changed.

To try it: bun test test/asks-op-words.test.ts, then put "no such operation here" back into src/actions/fleet.ts and watch it fail.

🤖 Generated with Claude Code

Approved — before the latest push

Pure refactor: three refusal sentences move into src/actions/asks_words.ts, the wording is unchanged, and no page, door or security path changes. No design-system surface is touched beyond one import line in src/web/studio/asks.ts. Two things I would do next: (1) test/asks-op-words.test.ts asserts on source text, which is brittle. A behavioural check that undoFleetOp, getFleetOp and decideAsk return those messages would survive a refactor. (2) Order the new imports with their neighbours in asks_bulk.ts, limbs.ts and asks.ts, and add "sign in to act on your asks" to the module when #5614 lands. This is also off the owner's NOW list (arm stability), but it is small and harmless.

commented

Three sentences said in several places now each live in one place, src/actions/asks_words.ts, so the page, the API, MCP and the terminal all word them the same:

  • NO_LONGER_ASKS ("it no longer asks you"): read by asks_decide.ts and web/studio/asks.ts.
  • NO_SUCH_OPERATION ("no such operation here"): read by asks_bulk.ts and fleet.ts.
  • NO_SUCH_MILESTONE ("no such milestone here"): read by limbs.ts and limb_replan.ts.

None of the wording changes, only where it is kept. test/asks-op-words.test.ts checks each sentence's text and that every caller imports it from that module.

Merge with main: #5631 created the same file on main to hold SIGN_IN_TO_ACT. The merged file keeps that constant and these three, and its header comment covers both. asks_decide.ts and asks_bulk.ts each keep two separate import lines from asks_words.ts. I did not fold them into one because main's test/asks-words.test.ts looks for the exact line import { SIGN_IN_TO_ACT } from "./asks_words.ts";, and that test stays unchanged.

After the merge, the type check is clean and the seven test files that cover this change pass (68 tests, 0 failures): asks-words, asks-op-words, asks-bulk, asks, limb-replan, limbs and fleet-ops.

🤖 Generated with Claude Code

Approved

Pure move of three refusal sentences into src/actions/asks_words.ts; wording is unchanged on every door, no UI markup is touched (the one src/web/studio/asks.ts edit is a string constant), no security surface changes, and the preview answers. The test pins the text and fails if a literal is typed back or the import is dropped. Two things I would do next: (1) asks_decide.ts and asks_bulk.ts import from asks_words.ts on two lines each; fold them into one once test/asks-words.test.ts stops matching the exact SIGN_IN_TO_ACT import line. (2) The source-text test is brittle (regex on import shape); a behavioural assertion that decideAsk/undoAsksBulk return these constants would survive refactors.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs