Skip to content

Harden front end: stale-chunk reload prompt + Sentry noise filtering - #52

Merged
amrtgaber merged 1 commit into
mainfrom
fix/launch-hardening
Jun 28, 2026
Merged

Harden front end: stale-chunk reload prompt + Sentry noise filtering#52
amrtgaber merged 1 commit into
mainfrom
fix/launch-hardening

Conversation

@amrtgaber

Copy link
Copy Markdown
Contributor

Closes #51.

Applies the front-end production-hardening lessons from the aoe2-live-standings-api launch audit (same two changes as criticalbit-web#31).

Changes

  • Stale code-split chunkssrc/main.tsx adds a vite:preloadError listener that surfaces a one-shot "new version available" toast (sonner, already used for mutation errors) with a Reload action. Prompt rather than force-reload: defaultPreload: "intent" fires the event on hover, and a forced reload would discard a half-filled login/registration form.
  • Sentry noisesrc/lib/sentry.ts adds beforeSend + ignoreErrors/denyUrls to drop never-actionable noise (intentional AbortError, browser extensions, translating proxies, sandboxed-storage errors).

Test plan

  • pnpm lint — pass (pre-existing react-refresh warnings only)
  • pnpm tsc --noEmit — pass
  • pnpm test:run — 53 passed
  • pnpm build — succeeds
  • (format:check is clean in CI; locally it only flags the gitignored .netlify/state.json artifact)

- main.tsx: add a `vite:preloadError` listener that prompts a one-shot "new
  version available" toast (sonner) when a deploy replaces a chunk an open tab is
  importing — prompt rather than force-reload (the router's `defaultPreload:
  "intent"` fires on hover, and a forced reload would discard a half-filled
  login/registration form).
- lib/sentry.ts: add `beforeSend` + `ignoreErrors`/`denyUrls` to drop
  never-actionable noise (intentional AbortError cancellation, browser
  extensions, translating proxies, sandboxed storage).
@netlify

netlify Bot commented Jun 28, 2026

Copy link
Copy Markdown

Deploy Preview for criticalbit-auth-web ready!

Name Link
🔨 Latest commit 4655656
🔍 Latest deploy log https://app.netlify.com/projects/criticalbit-auth-web/deploys/6a41b3172088c50008e79439
😎 Deploy Preview https://deploy-preview-52--criticalbit-auth-web.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@amrtgaber
amrtgaber merged commit 2c3cbf6 into main Jun 28, 2026
6 checks passed
@amrtgaber
amrtgaber deleted the fix/launch-hardening branch June 28, 2026 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Production hardening: apply live-event launch lessons

1 participant