This issue was created by an agent auditing CI failures from the Next.js Deploy Suite (vinext main vs Next.js v16.2.6, 2026-06-08).
Problem
useServerInsertedHTML (the hook CSS-in-JS libraries such as styled-components / emotion use to flush collected styles into the SSR stream) does not emit initial styles. The whole suite fails (0 passing) for both runtimes and for the suspense path.
Affected Test Suites
test/e2e/app-dir/use-server-inserted-html/use-server-inserted-html.test.ts (3 failures)
- should render initial styles of css-in-js in nodejs SSR correctly
- should render initial styles of css-in-js in edge SSR correctly
- should render css-in-js suspense boundary correctly
Estimated impact
~3 e2e failures.
Notes
Distinct from the CSS-module build issues (#1509 / #1515 / #1346) — this is the server-inserted-HTML streaming hook, not bundler CSS handling.
Recommendation
- Reproduce with a minimal
useServerInsertedHTML(() => <style>…</style>) provider and assert the style is present in the SSR HTML (and re-inserted across suspense flushes).
- Ensure the RSC/SSR renderer invokes the registered server-inserted-HTML callbacks at each flush boundary.
Problem
useServerInsertedHTML(the hook CSS-in-JS libraries such as styled-components / emotion use to flush collected styles into the SSR stream) does not emit initial styles. The whole suite fails (0 passing) for both runtimes and for the suspense path.Affected Test Suites
test/e2e/app-dir/use-server-inserted-html/use-server-inserted-html.test.ts(3 failures)Estimated impact
~3 e2e failures.
Notes
Distinct from the CSS-module build issues (#1509 / #1515 / #1346) — this is the server-inserted-HTML streaming hook, not bundler CSS handling.
Recommendation
useServerInsertedHTML(() => <style>…</style>)provider and assert the style is present in the SSR HTML (and re-inserted across suspense flushes).