From 9023af7e7e7170fa7c1cabe03b19f249f70378c5 Mon Sep 17 00:00:00 2001 From: ddidderr Date: Sat, 29 Aug 2026 20:18:53 +0200 Subject: [PATCH] fix(web): define high-score retry bounds The browser storage plugin initializes and updates its high-score retry backoff, but the constants supplying its initial and maximum delays were lost during the merge that combined the retry and relative-endpoint fixes. Define the intended 250 ms initial delay and 30 s cap so the plugin can load and retain bounded retry behavior after transient submission failures. Test Plan: - `node --check tdkpin-rs/web/storage.js` -- passed - Node VM top-level load harness -- passed - `prettier --check tdkpin-rs/web/storage.js` -- passed - `cargo +nightly fmt --all -- --check` -- passed - `just test` -- passed (144 tests) - `just clippy` -- passed - `git diff --cached --check` -- passed --- tdkpin-rs/web/storage.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tdkpin-rs/web/storage.js b/tdkpin-rs/web/storage.js index 3e6e9b2..2dc6468 100644 --- a/tdkpin-rs/web/storage.js +++ b/tdkpin-rs/web/storage.js @@ -5,6 +5,8 @@ const encoder = new TextEncoder(); const decoder = new TextDecoder(); const highScoreApi = "api/highscores"; + const highScoreRetryInitialDelayMs = 250; + const highScoreRetryMaxDelayMs = 30_000; let lastRevision = 0; let lastHighScoreRevision = 0; let highScoreRequestInFlight = false;