Public: anyone can read this; the crew can change it.
The model and people screens read their sentences from the web modules that own them #5634
Check · Review · Land · Live done — Landed and live in production.
The two sentences now live in one place. "Your subscription is added, for your own repositories." and "That amount will not do." are exported as `SUBSCRIPTION_ADDED` and `AMOUNT_REFUSED` from a new module, `src/actions/model_words.ts`. I made a new module rather than adding them to `actions/model_grant.ts`, because the issue names `model_words.ts` and the amount sentence is also used by the people…
shipped production is serving it deploy 405fa2a
The two sentences now live in one place. "Your subscription is added, for your own repositories." and "That amount will not do." are exported as SUBSCRIPTION_ADDED and AMOUNT_REFUSED from a new module, src/actions/model_words.ts. I made a new module rather than adding them to actions/model_grant.ts, because the issue names model_words.ts and the amount sentence is also used by the people screen, which model_grant.ts has nothing to do with.
Each copy that was typed out is replaced by the import, and only on the lines the sentences were on:
src/web/pages/model.ts: the subscription-added message.src/tui/screens/model.ts: the subscription-added note and both amount refusals.src/tui/screens/people.ts: the amount refusal.
The wording is unchanged, so pages, screens and answers come out byte for byte the same. grep -rn for either sentence under src/ now finds only model_words.ts.
The new test/model-words.test.ts checks that the two sentences still read exactly as before. It also reads each of the three files as text and fails if it no longer imports from model_words.ts or contains either sentence typed out again.
Run before pushing, all passing: test/model-words.test.ts, model-grant, model-grant-pages, model-timing, people-timing, tui-model and roles tests, bun x tsc --noEmit, and bun scripts/design-lint.ts. No test exercises the people screen directly, so its one-line change is covered only by model-words.test.ts. No existing test was changed.
🤖 Generated with Claude Code
Approved. A pure de-duplication: wording is byte-identical, the web page, the TUI model screen and the people screen now share SUBSCRIPTION_ADDED and AMOUNT_REFUSED. No markup, token, auth, input or write path changes, so the design system, security and both-doors checks are untouched. The preview answers 200 on /. The test pins the words and fails if a copy is typed back into any of the three files. Two things I would do next: (1) add a direct people-screen test, since its change is covered only by the source-text check; (2) fix the title, which says the sentences come from web modules but they live in src/actions/model_words.ts. Also consider a behavioural test (submit a bad amount in the TUI and assert the message) in place of reading source as text.
The two sentences now live in one place. "Your subscription is added, for your own repositories." and "That amount will not do." are exported as
SUBSCRIPTION_ADDEDandAMOUNT_REFUSEDfrom a new module,src/actions/model_words.ts. I made a new module rather than adding them toactions/model_grant.ts, because the issue namesmodel_words.tsand the amount sentence is also used by the people screen, whichmodel_grant.tshas nothing to do with.Each copy that was typed out is replaced by the import, and only on the lines the sentences were on:
src/web/pages/model.ts: the subscription-added message.src/tui/screens/model.ts: the subscription-added note and both amount refusals.src/tui/screens/people.ts: the amount refusal.The wording is unchanged, so pages, screens and answers come out byte for byte the same.
grep -rnfor either sentence undersrc/now finds onlymodel_words.ts.The new
test/model-words.test.tschecks that the two sentences still read exactly as before. It also reads each of the three files as text and fails if it no longer imports frommodel_words.tsor contains either sentence typed out again.Run before pushing, all passing:
test/model-words.test.ts,model-grant,model-grant-pages,model-timing,people-timing,tui-modelandrolestests,bun x tsc --noEmit, andbun scripts/design-lint.ts. No test exercises the people screen directly, so its one-line change is covered only bymodel-words.test.ts. No existing test was changed.🤖 Generated with Claude Code
Closes #5618