Repository navigation
Fix CI, stream routing and sub-cent precision; add tick motion and tests - #4
Merged
Merged
Conversation
eslint-config-next 15 only ships eslintrc-style configs. Importing its subpaths as flat configs throws ERR_MODULE_NOT_FOUND before any file is linted, which has failed every CI run on main since the Next.js upgrade.
- Listeners were keyed by event type, so every depth frame reached every depth listener. Frames still in flight for the market just left were merged into the new market's book after a switch; SOL levels landing in the ETH book read as the best ask and uncross() wiped every ETH bid. Listeners are now keyed by stream name. - Subscriptions are reference counted, so a panel unmounting no longer sends UNSUBSCRIBE for a stream another panel still uses. - A dropped socket reconnects with capped exponential backoff and re-subscribes every live stream. It used to go silent until a reload. - The order book header shows whether data is live or reconnecting. - The ticker stream's rolling 24h open now drives the 24h change, which had stayed frozen at the page-load snapshot. - The trade tape remounts per market instead of showing the previous market's trades until the first poll landed. - Adds Vitest with coverage for stream routing, ref counting, reconnect, the order book merge and ticker mapping, and runs it in CI.
Every order book level, trade, 24h high/low, mid, spread and chart axis label was formatted to two places. On a sub-cent market such as BONK/USDC that rendered every level as "0.00", and BTC sizes under 0.005 read "0.00" too. Precision now comes from the upstream strings themselves (they are quoted to the tick and lot), clamped to 2..8. Also removes ChartManager.update(), which nothing called, and the lightweight-charts v4 fallback that the pinned v5 never takes.
Motion that reports a change in the data, never decoration: - The last price flashes green or red on every tick, with an arrow for the last move, separate from the 24h-change colour. - An order book level flashes when its resting size changes, new levels fade in, and depth bars ease to their new width instead of jumping. - Trades printed since the previous poll slide into the tape, tinted by aggressor side. The first load doesn't animate. - Terminal panels settle in with a short stagger on first paint. The first value and the first value after a market switch never flash. Everything collapses under prefers-reduced-motion via the existing base rule, and the panel animation fills backwards only, so no transform is left behind to trap the market picker dropdown.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
This branch was successfully deployed
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.
Summary
CI has been red on
mainsince the Next.js upgrade.eslint.config.mjsimportedeslint-config-next/*as flat configs. v15 only ships eslintrc configs, so ESLint threwERR_MODULE_NOT_FOUNDbefore linting a single file. The configs now load throughFlatCompat.Live data (
SignalingManager)uncross()then wiped every ETH bid. Listeners are now keyed by stream name.Precision
Every order book level, trade, 24h high/low, mid, spread and chart-axis label was hard-coded to 2 decimals. On sub-cent markets such as BONK/USDC, every level rendered as
0.00. Precision now comes from the upstream strings, which are quoted to the tick and lot. This change also removesChartManager.update(), which nothing called.Motion
Every animation reports a real change in the data, and all of it respects
prefers-reduced-motion.Tests
Adds Vitest (37 tests) covering stream routing, ref counting, reconnect and backoff, the order book merge and uncross, ticker mapping, formatting and tick direction. CI now runs
lint→typecheck→test→build.Verification
npm run lint,npm run typecheck,npm testandnpm run buildall pass locally.depth.SOL_USDCframe leaves the BONK book untouched.Generated by Claude Code