/random rolls one to five games from the catalogue (five to start with):
any type, online or offline, dead games only when asked, never one marked
unsafe. Roll again avoids the games on screen while enough others remain;
a smaller count keeps the first picks, a larger one adds to them.
- lib/random-pick.ts: crypto.getRandomValues with rejection sampling and a
sparse Fisher-Yates, never Math.random (SonarCloud S2245), plus the pool
rules, read off appidIndex so each game appears once.
- lib/random.svelte.ts: the picks as appids, module-level and memory only,
so Back from a game keeps them and no f2p:* key is needed (a new key
means a privacy-policy edit, which reopens the consent gate). Only the
reader rolls; a revalidation only drops a pick that left the catalogue
or stopped qualifying.
- The page, an entry in the sidebar, drawer and palette (nav.ts) and a
dashboard button. Top-level on purpose: the header search, isActive and
the PWA's globIgnores all treat /games/* specially. The empty state joins
verify-dist's BAKED_EMPTY_STATES; the sitemap ranks the page low.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>