Skip to content

Move the wallet-aware components out of ui into domain - #245

Closed
droplister wants to merge 1 commit into
refactor/core-platform-splitfrom
refactor/domain-components
Closed

Move the wallet-aware components out of ui into domain#245
droplister wants to merge 1 commit into
refactor/core-platform-splitfrom
refactor/domain-components

Conversation

@droplister

Copy link
Copy Markdown
Member

Stacked on #244.

components/ splits ui/ — widgets that don't know what an asset is — from domain/, which is where wallet-aware ones belong. The split existed; the population had gone the other way.

domain/ held 4 files. ui/ held 27 referencing assets, dispensers, balances and wallets between 8 and 41 times each:

file domain refs
ui/inputs/asset-select-input 41
ui/cards/asset-card 39
ui/cards/dispenser-card 32
ui/inputs/dispenser-input 31
ui/menus/wallet-menu 28
…22 more 8–25

Same failure as utils/, one level down: a folder whose admission test isn't enforced drifts.

Placement

By subject, not widget kind — because that's how domain/ is already organised (approval, asset, price, tx). A dispenser card and a dispenser input belong together more than two cards do.

asset/ (9) · balance/ (5) · dispenser/ (5) · wallet/ (3) · utxo/ (3) · address/ (2)

50 files moved including tests.

Result

ui/ now has zero files with 8+ domain references, measured the same way the list was built.

Verification

  • tsc --noEmit clean; biome check src clean
  • vitest run src — 4049 passed, 49 skipped
  • wxt build succeeds, bundle unchanged at 2.46 MB
  • playwright test e2e/inputs/asset-select-input.spec.ts — 7 passed

Moves and import specifiers only.

components/ splits ui/ - widgets that do not know what an asset is - from
domain/, which is where the wallet-aware ones belong. The split existed but
the population had gone the other way: domain/ held 4 files while ui/ held
27 referencing assets, dispensers, balances and wallets between 8 and 41
times each. asset-select-input alone had 41.

Placed by subject rather than by widget kind, because that is how domain/ is
already organised (approval, asset, price, tx): asset, balance, dispenser,
wallet, utxo and address. A dispenser card and a dispenser input belong
together more than two cards do.

ui/ now has no file with eight or more domain references, measured the same
way the list was built.

Moves 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/domain-components 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