Skip to content

Refactor duplicated UI infrastructure - #755

Open
KillariDev wants to merge 11 commits into
mainfrom
t3code/review-ui-shared-code
Open

Refactor duplicated UI infrastructure#755
KillariDev wants to merge 11 commits into
mainfrom
t3code/review-ui-shared-code

Conversation

@KillariDev

@KillariDev KillariDev commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • centralize repeated wallet discovery, wrong-network guards, route helpers, simulation-provider behavior, token approval logic, and SecurityPool ABI reads across Zoltar, Statoblast, and Trading
  • make simulation providers support wallet account discovery and normalize EIP-1898 calls to the browser-local latest block
  • split Trading's live market controller into dedicated liquidity, position, portfolio, settlement, transaction, and controller-helper modules
  • split Zoltar's Open Oracle workflow into report content and navigation modules
  • split Statoblast's security-pool and fork-auction workflows into dedicated oracle, staged-operation, vault, migration, action, presentation, and workflow-shell modules
  • remove compatibility-only barrels, re-exports, duplicate ABIs, and local ownership facades so production code and tests import canonical implementations directly
  • make the Chromium smoke test accept either valid target-discovery timeout phase instead of depending on timing

Why

The three UIs had accumulated parallel implementations of the same infrastructure and several very large workflow files. The duplicated ownership paths made fixes easy to apply in one app but miss in another, while the oversized components mixed domain derivation, transaction orchestration, and rendering. This refactor gives shared behavior one owner and separates app-specific workflows along cohesive boundaries without intentionally changing their appearance or behavior.

Validation

  • bun run tsc
  • bun run ensure-contract-artifacts && bun run check:shared-dependencies && bun run test:run -- --bail=1 — 3,238 passed, 16 expected remote Uniswap skips, 0 failed across 320 files
  • focused post-split Statoblast workflow suites — 61 passed, 0 failed
  • canonical token-action integration and simulation suites — 18 passed, 0 failed
  • bun run format:check
  • bun run check
  • bun run check:changed
  • bun run knip, including production Trading entrypoint analysis
  • bun run check:generated-clean
  • git diff --check and git diff origin/main...HEAD --check
  • branch-current gate: 0 commits behind origin/main
  • Chromium/CDP QA at 1440x900 and 390x844:
    • Zoltar populated Open Oracle report, disabled/loading actions, and validation-error dispute modal
    • Statoblast seeded fork-migration workflow with dense balances and stage navigation
    • Trading liquidity quote/submission/confirmation, position controls, populated portfolio, and ended-market settlement controls
    • no console or runtime errors in any current session
  • visual review: 96/100, no findings
  • final review: 98/100, no findings

Published documentation was unchanged, so the documentation reviewer was not applicable. The full repository check still validated documentation freshness and structure.

Screenshots

Zoltar — deployed universe

1440x900 390x844
Zoltar desktop Zoltar mobile

Statoblast — seeded security pool

1440x900 390x844
Statoblast desktop Statoblast mobile

Trading — populated Markets

1440x900 390x844
Trading desktop Trading mobile

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