Make filenames agree with their area, and flatten platform/wallet - #247
Closed
droplister wants to merge 1 commit into
Closed
Make filenames agree with their area, and flatten platform/wallet#247droplister wants to merge 1 commit into
droplister wants to merge 1 commit into
Conversation
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
Member
Author
|
Squashed into #249. |
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.
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:
core/bitcoin/fee-estimationfeeEstimationblockHeight,feeRate,feeVerificationcore/counterparty/utxo-selectionutxoSelectioninputAssets,outputPolicy,inscriptionEnvelopecore/price-formatpriceFormatreplayPrevention,rpcErrorscore/trading-pairtradingPaircomponents/domain/tx/txActionInfotx-action-infoverification-status,money-movementcore 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, whenwalletManagerturned out to be the one module reaching for session storage — the folder was left behind. Nowplatform/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:
components/iconscore/counterparty/unpackcore/bitcoin/messageVerifiercore/counterwalletcore/qr-codeNone are the unused kind that
utils/hardware/index.tswas.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 outsidesrc/so no alias can reach it. The other 320 are tests importing their own subject as../thing, which is conventional there.Verification
tsc --noEmitclean;biome check srcclean (672 files)vitest run src— 3963 passed, 49 skippedwxt buildsucceeds, bundle unchanged at 2.46 MBplaywright test e2e/pages/compose/send/index.spec.ts— 20 passedRenames and import specifiers only.