fix(ui): Prevent rrweb DOM corruption by using concrete Suspense fallbacks - #4125
sentry[bot] wants to merge 1 commit into
Conversation
|
Seer wants to keep iterating on this pull request to get CI passing, but the Sentry GitHub App installation is missing permissions it needs to read the failing checks and push a fix. Review and accept the updated permissions to let Seer continue: https://github.com/organizations/codecov/settings/installations/86101127/permissions/update |
Bundle ReportChanges will increase total bundle size by 39 bytes (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: gazebo-production-systemAssets Changed:
Files in
Files in
view changes for bundle: gazebo-production-esmAssets Changed:
Files in
Files in
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4125 +/- ##
=======================================
Coverage 98.77% 98.77%
=======================================
Files 823 823
Lines 15147 15147
Branches 4387 4387
=======================================
Hits 14961 14961
Misses 179 179
Partials 7 7
Continue to review full report in Codecov by Harness.
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #4125 +/- ##
=======================================
Coverage 98.77% 98.77%
=======================================
Files 823 823
Lines 15147 15147
Branches 4387 4387
=======================================
Hits 14961 14961
Misses 179 179
Partials 7 7
Continue to review full report in Codecov by Sentry.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #4125 +/- ##
=======================================
Coverage 98.77% 98.77%
=======================================
Files 823 823
Lines 15147 15147
Branches 4379 4379
=======================================
Hits 14961 14961
Misses 179 179
Partials 7 7
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
✅ Deploy preview for gazebo ready!Previews expire after 1 month automatically.
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #4125 +/- ##
=======================================
Coverage 98.77% 98.77%
=======================================
Files 823 823
Lines 15147 15147
Branches 4387 4387
=======================================
Hits 14961 14961
Misses 179 179
Partials 7 7
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Description
This PR addresses GAZEBO-1872, an issue where users encountered
NotFoundError: Failed to execute 'removeChild' on 'Node'due to DOM corruption.Root Cause:
Sentry's rrweb session replay recorder was failing during initialization (
TypeError: Cannot redefine property: adoptedStyleSheets). This failure left rrweb's DOM patching in an inconsistent state, displacing invisible HTML comment nodes that React uses as boundary markers for<Suspense fallback={null}>.When these Suspense boundaries later resolved, React attempted to manipulate DOM nodes relative to the displaced comment markers, leading to
insertBeforeandremoveChilderrors.Solution:
Replaced all instances of
<Suspense fallback={null}>in critical UI components with<Suspense fallback={<span />}>.By providing a concrete DOM element (
<span />) as a fallback, React now has a stable, visible node to anchor its Suspense boundaries, making them resilient to external DOM mutations or patching failures from tools like rrweb.Code Example
Notable Changes
src/layouts/shared/SilentNetworkErrorWrapper/SilentNetworkErrorWrapper.tsx: Changedfallback={null}tofallback={<span />}.src/layouts/BaseLayout/BaseLayout.tsx: Changedfallback={null}tofallback={<span />}forTermsOfServicecomponent.src/layouts/Header/Header.tsx: Changedfallback={null}tofallback={<span />}forSeatDetails/AdminLinkandOwnerExternalIdcomponents.src/pages/OwnerPage/OwnerPage.jsx: Removed a redundant outer<Suspense fallback={null}>wrapper, asSilentNetworkErrorWrapperalready provides the necessary Suspense boundary.src/pages/OwnerPage/Tabs/Tabs.tsx: Changedfallback={null}tofallback={<span />}forTrialRemindercomponent.Screenshots
Link to Sample Entry
Legal Boilerplate
Look, I get it. The entity doing business as "Codecov" is owned by Harness, Inc. In 2026 Harness acquired Codecov and as a result Harness is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Harness can use, modify, copy, and redistribute my contributions, under Harness's choice of terms.
Fixes GAZEBO-1872
This PR was automatically generated by Sentry. You can adjust this setting at any time.