Public: anyone can read this; the crew can change it.
A repository name's rules and its disk-init failure live in one module, read by migrate, apps and new repository #5600
Check · Review · Land · Live done — Landed and live in production.
The two sentences a person sees when a new repository is refused now live in one new module, `src/actions/repo_words.ts`. No existing module owned words like these: `src/actions/repos.ts` holds logic and limit messages, but not the refusal sentences. The module exports: - `REPO_NAME_RULES` — "Names start with a letter or digit; no spaces, no .git." - `REPO_INIT_FAILED` — "The repository could not…
shipped production is serving it deploy fc82d1a
The two sentences a person sees when a new repository is refused now live in one new module, src/actions/repo_words.ts. No existing module owned words like these: src/actions/repos.ts holds logic and limit messages, but not the refusal sentences. The module exports:
REPO_NAME_RULES— "Names start with a letter or digit; no spaces, no .git."REPO_INIT_FAILED— "The repository could not be initialised on disk."
src/actions/migrate.ts, src/web/pages/apps.ts and src/web/pages/site.ts each import the two constants. Only the import line and the lines the sentences were on changed. The wording is the same, so answers and pages are byte-for-byte unchanged. grep -rn for either sentence under src/ now finds only the new module.
The new test/repo-words.test.ts checks that each sentence is non-empty. It also reads the three files as text and fails if any of them stops importing repo_words.ts or has a sentence typed back in.
Checked before pushing:
bun x tsc --noEmitis clean.bun scripts/design-lint.tsis clean.- The new test,
test/apps-new.test.tsand every test that mentionsinvalid_name,git_init_failed, the sentences or migration pass: 432 pass, 1 skip, 0 fail across 32 files. No tests were changed.
🤖 Generated with Claude Code
Pure refactor: the two refusal sentences now live in src/actions/repo_words.ts and migrate, apps and site import them. Wording is unchanged, so no page or answer changes and the design system is untouched. The preview answers 200 on /. No other copy of either sentence exists in src (tty.ts has none). Nothing here touches input handling, auth or headers.
Two things I would do next:
- Replace the source-text test (it reads three files and asserts no copy) with a behavioural one that drives migrateMessage and the new-app and new-repo error maps and compares their output to the constants. It would survive a refactor that moves the imports.
- This is outside the owner's current priorities (arm stability: #4496, #4486, #3319, #4482). Keep the next review slots on those before more wording cleanups.
The two sentences a person sees when a new repository is refused now live in one new module,
src/actions/repo_words.ts. No existing module owned words like these:src/actions/repos.tsholds logic and limit messages, but not the refusal sentences. The module exports:REPO_NAME_RULES— "Names start with a letter or digit; no spaces, no .git."REPO_INIT_FAILED— "The repository could not be initialised on disk."src/actions/migrate.ts,src/web/pages/apps.tsandsrc/web/pages/site.tseach import the two constants. Only the import line and the lines the sentences were on changed. The wording is the same, so answers and pages are byte-for-byte unchanged.grep -rnfor either sentence undersrc/now finds only the new module.The new
test/repo-words.test.tschecks that each sentence is non-empty. It also reads the three files as text and fails if any of them stops importingrepo_words.tsor has a sentence typed back in.Checked before pushing:
bun x tsc --noEmitis clean.bun scripts/design-lint.tsis clean.test/apps-new.test.tsand every test that mentionsinvalid_name,git_init_failed, the sentences or migration pass: 432 pass, 1 skip, 0 fail across 32 files. No tests were changed.🤖 Generated with Claude Code
Closes #5584