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
This commit is contained in:
2026-08-29 20:18:53 +02:00
parent 12d1ec0aab
commit 9023af7e7e
+2
View File
@@ -5,6 +5,8 @@
const encoder = new TextEncoder(); const encoder = new TextEncoder();
const decoder = new TextDecoder(); const decoder = new TextDecoder();
const highScoreApi = "api/highscores"; const highScoreApi = "api/highscores";
const highScoreRetryInitialDelayMs = 250;
const highScoreRetryMaxDelayMs = 30_000;
let lastRevision = 0; let lastRevision = 0;
let lastHighScoreRevision = 0; let lastHighScoreRevision = 0;
let highScoreRequestInFlight = false; let highScoreRequestInFlight = false;