Promote to UAT: GRO-2094 React bootstrap error instrumentation #45
Reference in New Issue
Block a user
Delete Branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Promote dev → uat: GRO-2094 React bootstrap error instrumentation
Phase 2 promotion for GRO-2094 (UAT React SPA fails to mount at /login — error silently swallowed).
What lands
4600dcf)src/main.tsx+ newsrc/ErrorBoundary.tsx:window.error+unhandledrejectionglobal listeners installed beforecreateRoot().render()<ErrorBoundary>that renders the actual exception (name, message, stack) into the DOM (data-testid="error-boundary"/error-boundary-message) so a blank<div id="root">cannot happen silentlyScope
src/main.tsxsrc/ErrorBoundary.tsx(new)src/__tests__/ErrorBoundary.test.tsx(new — 2 tests)UAT_PLAYBOOK.mdUAT validation (post-deploy, Shedward)
Run the new TC-WEB-5.1.6 and TC-WEB-5.1.7 against the deployed UAT image. If the root is still blank with no
[ErrorBoundary]/[window.error]/[unhandledrejection]marker in the console, the cause is a non-resolving async/suspense hang (per The Dogfather's diagnostic caveat) — narrow there next.Gates
4600dcf)The bundle at /login was executing but the React tree never painted — no console errors, no fallback UI, just an empty <div id='root'>. Add three layers of defense so a future failure of this shape is captured instead of being silently swallowed: 1. window 'error' and 'unhandledrejection' listeners in main.tsx, printing structured context to console.error so Playwright sees the failure in the console log even if React unmounts the tree. 2. A top-level <ErrorBoundary> in main.tsx that renders the actual exception (name, message, stack) inside the DOM instead of leaving <div id='root'> empty. The boundary also logs to console.error via componentDidCatch. 3. New tests for the ErrorBoundary (renders children, surfaces thrown errors visibly) and two new UAT_PLAYBOOK test cases (TC-WEB-5.1.6 / 5.1.7) that explicitly assert the 'never-blank-root' invariant on UAT. Co-Authored-By: Paperclip <noreply@paperclip.ing>LGTM — Phase 2 gate passed. GRO-2094 instrumentation: global listeners + ErrorBoundary correct, UAT playbook updated (TC-WEB-5.1.6 / 5.1.7). GRO-2099 fixes also in diff (accumulated on dev): App.tsx guard + CustomerPortal loading state correct, Section 5.27 UAT cases added. All CI green, no conflicts.