Skip to content

fix: retain data panel sessions across tab switches - #321

Merged
jackhai9 merged 1 commit into
mainfrom
fix/data-panels-background-lifecycle
Oct 9, 2026
Merged

jackhai9 merged 1 commit into
mainfrom
fix/data-panels-background-lifecycle

Conversation

@jackhai9

@jackhai9 jackhai9 commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Switching between Binance tabs used to stop both data panels and initialize them again on return, clearing CMC rows and repeating clock, funding, and historical requests. Keep activated route sessions, in-flight requests, displayed values, and expanded details across visibility changes; only fetch again when the foreground deadline is due.

  • CMC refreshes 30 seconds after completion in the foreground and five minutes in the background. Current funding uses 15 seconds and 60 seconds respectively. Failed attempts retain the same cooldown rules.
  • Historical data keeps its five-minute publication schedule and hourly clock calibration. Hidden tabs pause the second-by-second display and update it immediately on return, including settlement expiry. Missed windows are not replayed, and late historical responses cannot claim a fresh snapshot.
  • Closing or changing routes still invalidates old work. History also validates the full route session when Binance replaces its history methods before the route watchdog notices. Initially hidden tabs wait until first visited.

Release Trading Data 1.2.2 and CoinMarketCap Data 0.2.2 with rebuilt install artifacts and updated lifecycle documentation.

Validation: full npm test passed 2548/2548, including 23 background lifecycle scenarios; the generated-panel Playwright suites passed 41/41. Both builds, syntax and metadata checks, test lint, and git diff --check passed. Independent read-only review approved the final implementation. Rendered browser output was inspected. Visibility and suspended animation frames were simulated; live Chrome throttling/freezing, Tampermonkey installation, and live Binance responses were not exercised.

@jackhai9
jackhai9 merged commit fbc30fc into main Oct 9, 2026
2 checks passed
@jackhai9
jackhai9 deleted the fix/data-panels-background-lifecycle branch October 9, 2026 17:10
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