Repository navigation
perf(trading-data): stop non-converging history retries and idle rebuilds - #333
Merged
Merged
Conversation
…ilds The history loop expected every five-minute series to publish a row stamped with the boundary B. Live responses on 2026-10-29 show open interest and the three ratio series do, but taker volume and basis stamp the start of the period they cover, so their newest row is B - 5m and never B. Both stayed pending, so every period retried to its end (about 12 attempts) and each attempt rebuilt the whole panel, closing an open detail view. Opening a symbol mid-period also repeated the complete batch immediately after the initial one. - Each series is complete at its own newest row: B, or B - 5m for taker volume and basis. Truly delayed rows still retry on the same schedule. - A complete batch requested after the five-second grace is not repeated within its period; only missing series retry. Activation before the grace keeps the regular full attempt at the grace. - A retry with unchanged rows and provenance updates the footer time but does not rebuild the panel. - The footer clock and funding note format only when their time changes, number formats are reused per precision, and funding status properties are written only when they change. Existing retry tests modelled taker and basis rows at B - 5m as delayed; they now use rows two periods back, and the expired-period scenario no longer expects the duplicate batch after installation. Trading data 1.2.7. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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
The trading-data panel's five-minute history loop never converged. It expected every series to publish a row stamped with the boundary
B, but live responses show two kinds of timestamps:BBB - 5m(labelled by the start of the period it covers)B - 5mThese were checked with public BTCUSDT GETs on 2026-10-29 at +64, +203 and +293 s, and match the earlier review sample.
Because taker volume and basis never reached
B, every period retried until it ended: about 12 attempts per period, in hidden tabs too. Each attempt rebuilt the whole panel, which also closed any open detail view. Opening a symbol mid-period additionally repeated the complete batch right after the initial one.Changes (trading data 1.2.7; install URLs unchanged):
B, orB - 5mfor taker volume and basis). Genuinely delayed rows still retry on the existing 10/15/20/30 s schedule within the period.hidden/titleare written only when they change.Evidence
test/unit/binance-trading-data-history-refresh.test.js, using the live publication model, fails on the previous artifact:B - 5mas "delayed". They now use rows two periods back, so they still exercise real delays. The expired-period scenario no longer expects the duplicate batch after installation (funding history requests 3 → 2).Testing
npm run lint:tests: passnpm test: 2696/2696, 0 cancellednpm run test:ui: 628/628; the two data-panel specs: 43/43npm run check:binance-userscripts: passgit diff --checkpassesNot verified
🤖 Generated with Claude Code