mirror of
https://github.com/tiennm99/vngeoguessr.git
synced 2026-10-13 16:15:32 +00:00
There was no app-wide not-found route, so any unmatched path got Next's stock page: unstyled text over the full-bleed background, no footer, and no link back -- its own full-height wrapper pushes the footer off screen. Both 404s now share NotFoundPanel, since they say the same three things and only the wording differs: what is missing, why it probably happened, and the one way out. One action each, deliberately -- a "try again" on a deterministically invalid URL is a button guaranteed to reproduce the same page. The region 404 is a client component for one reason: a thrown notFound() is served from Next's error shell, which carries none of the root layout's pre-paint theme script, so a dark-theme visitor got a white page permanently. Re-applying on mount costs a brief light flash on a rare page and fixes the palette. The app-wide route needs none of this -- an unmatched path prerenders inside the root layout, where the script runs. Both are covered by e2e now, including the theme, since neither failure mode is visible from a status code. Also records the Windows ISR case-collision finding in the debugger's agent memory: a local next start case-folds cache keys on NTFS, so redirect and dynamicParams behaviour cannot be verified from a local production build. The region route no longer redirects, so nothing trips it today, but the verification guidance outlives this change.