Skip to content

fix: contracts single source of truth, route health smoke test, README setup, and price-tick motion - #996

Merged
IbrahimIjai merged 3 commits into
SO4-Markets:mainfrom
Jaydbrown:fix/issues-860-862-873-env-smoke-readme-motion
Oct 19, 2026
Merged

IbrahimIjai merged 3 commits into
SO4-Markets:mainfrom
Jaydbrown:fix/issues-860-862-873-env-smoke-readme-motion

Conversation

@Jaydbrown

Copy link
Copy Markdown
Contributor

Summary of Changes

This pull request resolves issues #860, #861, #862, and #873 across config, testing, documentation, and UX motion:

  1. Issue Contract IDs in apps/web/.env.testnet disagree with packages/contracts/contracts.json (14 of 18 differ) #860: Single source of truth for contract addresses (contracts.json)

    • Updated packages/contracts/contracts.json to include all testnet contract IDs deployed on 2026-06-05 and structured networks.testnet and networks.mainnet mapping.
    • Added contract-descriptions.json descriptions for all contract bindings.
    • Exported ContractAddresses, SupportedNetwork, CONTRACT_DEPLOYMENTS, and getContractAddresses from @workspace/contracts.
    • Updated apps/web/src/app/config/contracts.ts to source directly from @workspace/contracts (getContractAddresses(ENV.NETWORK)).
    • Removed VITE_CONTRACT_* from required env vars in apps/web/src/app/config/env.ts, apps/web/.env.testnet, apps/web/.env.example, and apps/web/.env.mainnet.
    • Updated oracle.ts to import CONTRACTS.tokens instead of ENV.CONTRACTS.TOKENS.
    • Added unit test suites apps/web/src/app/config/contracts.test.ts and packages/contracts/src/deployments.test.ts.
  2. Issue Add a browser smoke test that fails on console errors and SSR fallbacks for every route #861: Route health smoke test (e2e/route-health.spec.ts)

    • Added Playwright spec e2e/route-health.spec.ts covering all routes (/, /trade, /pools, /earn, /referrals, /faucet, /gallery, /changelog, /design-system) at desktop (1440x900) and mobile (390x844) viewports.
    • Asserts HTTP 200 on all valid routes and verifies 404 behavior for unknown routes.
    • Stubs external network endpoints (binance, stellar.org, gmxinfra.io, pyth.network).
    • Asserts zero unhandled pageerrors, zero unhandled console errors, zero SSR hydration mismatches, and zero same-origin 4xx/5xx responses.
    • Runs automated axe critical accessibility scans across every route.
  3. Issue README setup is incomplete: env step missing and bun build is the wrong command #862: README setup completion & command fixes

    • Fixed bun build to bun run build in README.md and the scripts table.
    • Added step-by-step copy-pasteable Getting Started instructions from repository clone to running localhost:3000.
    • Documented packages/contracts/contracts.json single source of truth for contract IDs and optional SubQuery indexer local setup.
    • Rewrote apps/web/.env.example with working testnet defaults and only developer-overridable settings.
    • Added a Troubleshooting entry for Missing env var: VITE_*.
  4. Issue [Motion] Price-tick flash in the order book and last price #873: Price-tick flash in the order book and last price

    • Added .so4-flash-up-overlay (green via --color-long) and .so4-flash-down-overlay (red via --color-short) to packages/ui/src/styles/globals.css using motion tokens var(--duration-slow) (300ms) and var(--ease-out).
    • Added @media (prefers-reduced-motion: reduce) and :root[data-reduced-motion="true"] rules ensuring zero animation / instant 0 opacity fallback.
    • Integrated tick flash into DepthLadder.tsx:
      • Level rows flash on size/price changes.
      • Reference price ("Last" / "Mid") in SpreadRow flashes green on tick up and red on tick down.
      • Compositor-friendly absolute overlays with zero layout shift, interruptible transition, and unaffected keyboard/screen-reader behavior.
    • Added comprehensive unit tests in apps/web/src/features/trade/components/orderbook/DepthLadder.test.tsx.

Closes #860
Closes #861
Closes #862
Closes #873

@vercel

vercel Bot commented Oct 18, 2026

Copy link
Copy Markdown

@Jaydbrown is attempting to deploy a commit to the Ijai's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Oct 18, 2026

Copy link
Copy Markdown

@Jaydbrown Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@IbrahimIjai
IbrahimIjai merged commit a40c186 into SO4-Markets:main Oct 19, 2026
2 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment