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

opened this

Merged 42d 7h ago, live in production

The two sentences a person sees when a new repository is refused now live in one new module, src/actions/repowords.ts. No existing module owned words like these: src/actions/repos.ts holds logic and limit messages, but not the refusal sentences.

Notes

opened this

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 --noEmit is clean.
  • bun scripts/design-lint.ts is clean.
  • The new test, test/apps-new.test.ts and every test that mentions invalid_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

commented

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 --noEmit is clean.
  • bun scripts/design-lint.ts is clean.
  • The new test, test/apps-new.test.ts and every test that mentions invalid_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

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs