[Fizz] Include unit of threshold in rel=expect deopt error (#33476)
Sebastian "Sebbie" Silbermann committed
Jun 7, 2025 at 02:11 UTC
b3d5e9078685c000e7e9ee3668a7a4b4f3256b1f
3 files changed
+3
-3
packages/react-dom/src/__tests__/ReactDOMFizzServerEdge-test.js
+1
-1
@@ -138,7 +138,7 @@ describe('ReactDOMFizzServerEdge', () => {
138
if (gate(flags => flags.enableFizzBlockingRender)) {
139
expect(errors.length).toBe(1);
140
expect(errors[0].message).toContain(
141
- 'This rendered a large document (>512) without any Suspense boundaries around most of it.',
141
+ 'This rendered a large document (>512 kB) without any Suspense boundaries around most of it.',
142
);
143
} else {
144
expect(errors.length).toBe(0);
packages/react-server/src/ReactFizzServer.js
+1
-1
@@ -5946,7 +5946,7 @@ function flushCompletedQueues(
5946
const error = new Error(
5947
'This rendered a large document (>' +
5948
maxSizeKb +
5949
- ') without any Suspense ' +
5949
+ ' kB) without any Suspense ' +
5950
'boundaries around most of it. That can delay initial paint longer than ' +
5951
'necessary. To improve load performance, add a <Suspense> or <SuspenseList> ' +
5952
'around the content you expect to be below the header or below the fold. ' +
scripts/error-codes/codes.json
+1
-1
@@ -546,5 +546,5 @@
546
"558": "Client rendering an Activity suspended it again. This is a bug in React.",
547
"559": "Expected to find a host node. This is a bug in React.",
548
"560": "Cannot use a startGestureTransition() with a comment node root.",
549
- "561": "This rendered a large document (>%s) without any Suspense boundaries around most of it. That can delay initial paint longer than necessary. To improve load performance, add a <Suspense> or <SuspenseList> around the content you expect to be below the header or below the fold. In the meantime, the content will deopt to paint arbitrary incomplete pieces of HTML."
549
+ "561": "This rendered a large document (>%s kB) without any Suspense boundaries around most of it. That can delay initial paint longer than necessary. To improve load performance, add a <Suspense> or <SuspenseList> around the content you expect to be below the header or below the fold. In the meantime, the content will deopt to paint arbitrary incomplete pieces of HTML."
550
}