Retry runs get a fresh scroller so the feed can never start blank

Retrying the missed items could leave the feed on a stale position: the
retry swaps the queue (8 slides -> 3) and resets the scroll on the OLD
element, while the browser was still finishing a smooth scroll or snap.
Depending on the engine that could strand the viewport past the new
content (blank feed with the header still showing the old counter), and
the results slide kept its inner scroll because it has no key.

- The scroller now carries key={runId}, so every run mounts a brand-new
  element: scroll position 0, fresh snap state, no inherited inner
  scrolls in any slide.
- The scroll listener re-attaches to the new element (deps [runId]).

New retry suite 12/12: plain retry (fresh element, slide 1, header
Retry 1/N, missed item answerable again), retry fired mid smooth-scroll,
double-tap retry, and retry -> answer -> results -> retry again — all
land on slide 0 with content visible. Regression 74/74, mobile 51/51,
i18n 27/27. Lint + build clean. SW freezmo-v19.
This commit is contained in:
Martin Dvořák 2026-10-09 20:22:28 +00:00
commit 0ee9e930f0
2 changed files with 9 additions and 3 deletions

View file

@ -9,7 +9,7 @@
*
* Bumping CACHE_VERSION is how a new deploy invalidates old assets.
*/
const CACHE_VERSION = "freezmo-v18";
const CACHE_VERSION = "freezmo-v19";
const SHELL_CACHE = `${CACHE_VERSION}-shell`;
const ASSET_CACHE = `${CACHE_VERSION}-assets`;