refactor(naming)!: adopt kebab-case file names - #2
Merged
Conversation
Applies the house file-naming convention. Only file names change; no behaviour, no identifiers, no exports. * React component files become kebab-case, while the components themselves stay PascalCase — JSX requires the identifier form, and the convention is kebab-case files with PascalCase components: StatusBadge.tsx -> status-badge.tsx (plus .test.tsx and .stories.tsx) PayerSheet.tsx -> payer-sheet.tsx * docs/STATUS.md -> docs/status.md, with all 76 references across 34 files updated, including the hardcoded path in .xtask/src/main.rs, both GitHub workflows, the justfile, compose.e2e.yml, 8 backend .rs doc comments, and schemas/vpay.cstack. Left unrenamed as ecosystem-mandated: Cargo.toml/Cargo.lock, both Dockerfiles, every README.md (GitHub renders these by name in directory listings), LICENSE, AGENTS.md, CLAUDE.md, all dotfiles. Every .rs file keeps snake_case per rustfmt. Verified: `just ci` exits 0. Rust 64 passed / 5 ignored and web 10 assertions, both unchanged from before the rename — the renamed status-badge.test.tsx is still discovered by Vitest's glob, which is the failure mode a rename fails silently on. BREAKING CHANGE: docs/STATUS.md is now docs/status.md. External links and bookmarks to the old path will 404, and any tooling that reads the old path must be updated. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Applies the house file-naming convention: file names are kebab-case. Only file names change — no behaviour, no identifiers, no exports, no logic.
Source of truth: a direct maintainer instruction adopting kebab-case as a standing convention, consistent with the naming rules already in the repo's agent instructions (kebab-case files;
PascalCasefor type names, classes and React components;snake_casefor Rust source per rustfmt).Intent
Two categories of violation existed. The React component files were
PascalCase, anddocs/STATUS.mdwas capitalised. The second is the interesting one: it is not an ecosystem-mandated name, so by the letter of the rule it had to move — but it is referenced 76 times across 34 files, including a hardcoded path inside the repo's ownverify-statusself-check. A convention with a permanent exception for the single file everyone reads is not much of a convention, so it was renamed in full rather than exempted.Scope
Renamed (via
git mv, history preserved — all five recorded by git as true renames):frontends/packages/ui/src/components/StatusBadge.tsxstatus-badge.tsxfrontends/packages/ui/src/components/StatusBadge.test.tsxstatus-badge.test.tsxfrontends/packages/ui/src/components/StatusBadge.stories.tsxstatus-badge.stories.tsxfrontends/packages/ui/src/components/PayerSheet.tsxpayer-sheet.tsxdocs/STATUS.mddocs/status.mdComponent identifiers are unchanged.
StatusBadgeandPayerSheetremainPascalCase— JSX requires the identifier form, and the convention is kebab-case files with PascalCase components. Exported symbols, the Storybooktitle, and thedescribe()suite name are all untouched.All 76
STATUS.mdreferences updated across 34 files:.xtask/src/main.rs(the hardcodedroot.join(...)path plus doc comments and error strings), both GitHub workflows,justfile,compose.e2e.yml,README.md,AGENTS.md,CLAUDE.md, 8 backend.rsdoc comments,schemas/vpay.cstack, and thedocs/tree.Deliberately not renamed — ecosystem-mandated names where a rename breaks tooling:
Cargo.toml/Cargo.lock, bothDockerfiles, everyREADME.md(GitHub renders these by name in directory listings, which applies to the six nested ones too),LICENSE,AGENTS.md,CLAUDE.md, and all dotfiles. Every.rsfile keepssnake_caseper rustfmt — that is the convention, not a violation of it.Verification
just ciexits 0.cargo nextest run --workspacepnpm -r testcargo xtask verify-statusdocs/status.mdpnpm -r build,build-storybookThe unchanged counts are the point of this table. A renamed
*.test.tsxdropping out of Vitest's glob fails silently — by running fewer tests, not by erroring — so "10 assertions, still 3 from@vpay/ui" is the evidence that the renamed test file is still discovered. Same for the ignored count staying at 5.Also confirmed:
grep -rn "STATUS\.md"returns zero hits outside.git, andlsconfirms the on-disk names actually changed — macOS is case-insensitive-but-case-preserving, so a rename that differs only in case can silently no-op.Screenshots / Evidence
Risk Assessment
Low. No behaviour changes; the diff is renames plus path-string updates.
The one consumer-visible break is
docs/STATUS.md→docs/status.md, flagged asBREAKING CHANGEin the commit. External links and bookmarks to the old path will 404. GitHub does not redirect renamed files. If that matters more than the convention, this rename is the part to revert — the component renames stand alone.Residual risk is a stale path reference somewhere grep did not reach. The substitution was
STATUS\.md→status.md, which is safe against the unrelatedSTATUS:labels used elsewhere in the codebase (those carry no.mdsuffix). CI'sdocsworkflow runsverify-statuson any PR touchingdocs/**, so a broken path fails the build rather than rotting quietly.AI Usage Declaration
AI (Claude Opus 5 via Claude Code) performed the renames and reference updates, delegated to a Sonnet sub-agent; the orchestrating session independently re-ran the full gate and verified the git-recorded renames, on-disk casing, absence of stale references, and unchanged test counts rather than accepting the agent's report.
Reviewer Focus
docs/STATUS.mdacceptable? It is the only judgement call here and the only breaking part. Easy to drop if you would rather keep the path stable..xtask/src/main.rs— the hardcoded path was the one place a rename could break the repo's own honesty check.README.mdfiles were treated as ecosystem-mandated and left alone.