Skip to content

Split Zoltar, Statoblast, and Trading into shared packages - #738

Merged
KillariDev merged 76 commits into
mainfrom
t3code/split-ui-into-zoltar-statoblast-shared
Aug 21, 2026
Merged

Split Zoltar, Statoblast, and Trading into shared packages#738
KillariDev merged 76 commits into
mainfrom
t3code/split-ui-into-zoltar-statoblast-shared

Conversation

@KillariDev

@KillariDev KillariDev commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

What changed

Completes the UI/package split and folds the standalone Trading project into the repository's shared architecture:

  • ui/coreShared owns app-neutral components, transaction presentation, simulation infrastructure, routing support, and build tooling.
  • ui/zoltar, ui/statoblast, and ui/trading are independently served and production-built applications.
  • Trading uses the shared app shell, layout and transaction primitives, outcome selectors, and the same browser-local TEVM simulator as Zoltar and Statoblast.
  • Trading contracts compile with the repository Solidity project from solidity/contracts/trading; their tests live under solidity/ts/tests/trading.
  • The Trading SDK lives under shared/ts/trading, and the former root /trading package has been removed.

Shared packages remain dependency roots: coreShared has no app imports, and the applications do not introduce reverse dependencies into it.

Shared UI and simulator adoption

  • Trading transaction flows use the shared transaction action, review, hash, and error presentation while quote and submission logic remain app-local.
  • Trading route headers, sections, forms, metrics, and fork targets use neutral coreShared primitives.
  • Scalar and categorical fork targets reuse ScalarOutcomePicker and OutcomeSelectionList; strict Trading tick validation preserves out-of-range input instead of silently clamping it.
  • Zoltar and Statoblast share neutral transaction-presentation builders from coreShared.
  • Trading's old ?demo=1 application and SIMULATED DATA / Demo mode banner are removed. ?simulate=1&simScenario=trading now boots the shared TEVM worker and shared Browser Simulation controls.
  • Scenario selection, direct reload, route navigation, and Browser Back/Forward keep the URL, banner, active TEVM backend, and seeded Trading state synchronized.
  • Browser QA now captures page and worker exceptions, console errors, failed module requests, missing mount state, and stale bootstrap fallback content.

Build, runtime, and publishing

  • Centralizes validated app IDs and paths in ui/coreShared/build/appPaths.mts.
  • Builds each app from clean output in dependency order and produces isolated ui/<app>/dist trees.
  • Validates every import map and runs Chromium smoke coverage for mount, workers, console/page/import-map errors, and failed module requests.
  • Supports validated app selection in the local Docker runtime and exports explicit /zoltar, /statoblast, and /trading IPFS entry points.
  • Uses committed frozen Bun lockfiles consistently across local, Docker, and CI-handoff installation paths.
  • Keeps .github identical to main; split-aware workflow files remain staged separately under workflow-changes/ for manual movement.

Screenshots

Zoltar desktop Zoltar mobile — Open Oracle
Zoltar simulation at 1440x900 Zoltar Open Oracle at 390x844
Statoblast desktop — Security Pools Statoblast mobile — Security Pools
Statoblast Security Pools at 1440x900 Statoblast Security Pools at 390x844
Trading shared TEVM simulator — desktop Trading shared TEVM simulator — mobile
Trading shared Browser Simulation at 1440x900 Trading shared Browser Simulation at 390x844

Trading scenario navigation after Trading to Baseline to Browser Back round-trip

The current Trading captures use the shared trading TEVM scenario. Desktop is 1440×900 and mobile is 390×844. The captured routes mount with Trading-specific title and branding, no legacy demo banner or stale loading fallback, zero runtime errors, and zero failed requests.

Validation

  • Root suite after the latest origin/main merge: 3,216 passed, 16 intentionally skipped live-network tests, 0 failed across 317 files.
  • Trading package suite: 158 passed, 0 failed; focused simulator/routing integration: 8 passed, 0 failed.
  • Passed: bun run tsc, bun run format:check, bun run check, bun run check:changed, bun run knip, and bun run check:generated-clean.
  • Passed clean dependency and application builds through the root suite's production-build coverage.
  • Browser QA passed markets, market detail, and liquidity at 1440×900 and 390×844, plus scenario Back/Forward and direct-reload cases. Runtime errors: 0; failed requests: 0. Controlled page-console and worker-runtime injections make the QA script fail as intended.
  • Docker static-server, packaging, health-path, app-selection, and publisher-layout regression tests pass. A real image run is not available in the current workspace because its Docker daemon is inaccessible.
  • Latest visual review: 98/100, no findings. Latest final code/config review: 98/100, no findings.

The branch contains current origin/main and preserves the peripherals → statoblast rename through the merge history.

…abNavigation, generic AppHeaderShell/useHashRoute, shared types/app
…lation, move statoblast scenarios to statoblast, per-app index.html and worker entries
…nState deps injection; simulation scenario registry with statoblast scenario module
…quires root, simulation DI cleanups, moved component import fixes
- Point abis/contractArtifact imports at @zoltar/ui-core-shared
- Add approveErc20 protocol module and barrel export
- Fix getDeploymentSteps dep type to ReadonlyArray<DeploymentStep> in coreShared useOnchainState
- Narrow hash route to zoltar Route union via resolveEnumValue
- Remove security-pool props from MarketRouteContentProps (oracle-only app)
- Replace removed ZOLTAR_ROUTE constant with getRouteHash('zoltar')
- Allow undefined optional onRetryZoltarQuestion handler
- Fix tevmWorker self-imports to relative paths
@KillariDev KillariDev changed the title Split ui/ into ui/coreShared, ui/zoltar, and ui/statoblast packages Complete the coreShared, Zoltar, and Statoblast UI split Aug 20, 2026
- Move Trading UI sources and build tooling to ui/trading
- Extend workspace scripts, checks, tests, and simulation support for Trading
- Update repository documentation and development instructions
- Block execution until pending recovery work is resolved
- Move Statoblast contracts and update dependent paths
…oblast-shared' into t3code/split-ui-into-zoltar-statoblast-shared

# Conflicts:
#	workflow-changes/ci.yml
#	workflow-changes/deploy-testnet.yml
#	workflow-changes/ipfs-deploy.yml
#	workflow-changes/setup-ci-action.yml
@KillariDev KillariDev changed the title Complete the coreShared, Zoltar, and Statoblast UI split Complete the split UI and integrate Trading into the shared project layout Aug 20, 2026
@KillariDev KillariDev changed the title Complete the split UI and integrate Trading into the shared project layout Split Zoltar, Statoblast, and Trading into shared UI packages Aug 21, 2026
@KillariDev KillariDev changed the title Split Zoltar, Statoblast, and Trading into shared UI packages Split Zoltar, Statoblast, and Trading into shared packages Aug 21, 2026
- Cache, install, build, and upload split UI package artifacts
- Ensure deployment checks build missing UI runtime dependencies
- Add workflow coverage for split-package CI handoffs
- Align all UI workspaces on TEVM rc.151
- Link UI packages to shared Preact dependencies
- Update split-workflow coverage
- Prevent concurrent Chromium smoke runs with the shared test lock
- Safely await cleanup when Chromium has already exited
- Bound Chromium initialization and DevTools discovery
- Escalate browser termination when graceful cleanup stalls
- Install UI workspace dependencies through the frozen installer
- Handle Chromium process errors during termination escalation
- Allow DevTools and page-target polling to use initialization deadlines
- Add regression coverage for delayed discovery and cleanup failures
@KillariDev
KillariDev merged commit 93bc225 into main Aug 21, 2026
20 checks passed
@KillariDev
KillariDev deleted the t3code/split-ui-into-zoltar-statoblast-shared branch August 21, 2026 18:09
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