Skip to content

Make filenames agree with their area, and flatten platform/wallet - #247

Closed
droplister wants to merge 1 commit into
chore/dead-code-and-validatorsfrom
refactor/naming-consistency
Closed

Make filenames agree with their area, and flatten platform/wallet#247
droplister wants to merge 1 commit into
chore/dead-code-and-validatorsfrom
refactor/naming-consistency

Conversation

@droplister

Copy link
Copy Markdown
Member

Stacked on #246.

Naming

Four folders held both kebab-case and camelCase filenames, so the convention had to be remembered rather than seen. Each area already has a dominant style; these were the files disagreeing with it:

was now joins
core/bitcoin/fee-estimation feeEstimation blockHeight, feeRate, feeVerification
core/counterparty/utxo-selection utxoSelection inputAssets, outputPolicy, inscriptionEnvelope
core/price-format priceFormat replayPrevention, rpcErrors
core/trading-pair tradingPair
components/domain/tx/txActionInfo tx-action-info verification-status, money-movement

core is camelCase, components is kebab-case. After this, every folder is internally consistent — verified by re-running the check that produced the list.

platform/wallet

Held a single file. It was a folder only because wallet/ was split across core and platform in #244, when walletManager turned out to be the one module reaching for session storage — the folder was left behind. Now platform/walletManager.ts.

Barrels — checked, nothing to do

Of 43 index files, 38 are route or entrypoint files, not barrels. All 5 real barrels are imported:

barrel importers
components/icons 89
core/counterparty/unpack 16
core/bitcoin/messageVerifier 4
core/counterwallet 3
core/qr-code 2

None are the unused kind that utils/hardware/index.ts was.

Also checked — path aliases are done

2016 alias imports vs 321 relative (86%), and exactly one production relative import remains: pages/settings/index.tsx → ../../../package.json, which lives outside src/ so no alias can reach it. The other 320 are tests importing their own subject as ../thing, which is conventional there.

Verification

  • tsc --noEmit clean; biome check src clean (672 files)
  • vitest run src — 3963 passed, 49 skipped
  • wxt build succeeds, bundle unchanged at 2.46 MB
  • playwright test e2e/pages/compose/send/index.spec.ts — 20 passed

Renames and import specifiers only.

Four folders held both kebab-case and camelCase filenames, so the convention
had to be remembered rather than seen. Each area already has a dominant
style, and these were the files disagreeing with it:

  core is camelCase - fee-estimation, utxo-selection, price-format and
  trading-pair renamed to feeEstimation, utxoSelection, priceFormat and
  tradingPair, joining blockHeight, feeRate, inputAssets, outputPolicy and
  the rest.

  components is kebab-case - txActionInfo renamed to tx-action-info,
  matching verification-status beside it and money-movement one folder over.

platform/wallet held a single file. It was a folder only because wallet/ was
split across core and platform when walletManager turned out to be the one
module reaching for session storage; the folder was left behind. Now
platform/walletManager.ts.

Every folder is internally consistent afterwards, checked the same way the
list was built.

Also checked, and nothing to do: of 43 index files, 38 are route or
entrypoint files rather than barrels, and all five real barrels are imported
- icons (89), counterparty/unpack (16), messageVerifier (4), counterwallet
(3), qr-code (2). None are the unused kind that utils/hardware/index.ts was.

Renames and import specifiers only.

Claude-Session: https://claude.ai/code/session_01CcjnCrgosSeshymXLBxdGj
@droplister

Copy link
Copy Markdown
Member Author

Squashed into #249.

@droplister droplister closed this Aug 4, 2026
@droplister
droplister deleted the refactor/naming-consistency branch August 4, 2026 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant