Harden front end: stale-chunk reload prompt + Sentry noise filtering - #52
Merged
Conversation
- 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).
✅ Deploy Preview for criticalbit-auth-web ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
src/main.tsxadds avite:preloadErrorlistener 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.src/lib/sentry.tsaddsbeforeSend+ignoreErrors/denyUrlsto drop never-actionable noise (intentionalAbortError, browser extensions, translating proxies, sandboxed-storage errors).Test plan
pnpm lint— pass (pre-existing react-refresh warnings only)pnpm tsc --noEmit— passpnpm test:run— 53 passedpnpm build— succeedsformat:checkis clean in CI; locally it only flags the gitignored.netlify/state.jsonartifact)