From 7f5df86be10e786e647629b6b05045c6cc091e07 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 29 Oct 2026 19:19:14 +0100 Subject: [PATCH] fix(core): wrap the app in a root Suspense boundary (AI-assisted) Prototype: React keeps unhydrated server nodes at the root container, but client-renders a Suspense boundary that has leftover nodes. Co-Authored-By: Claude Opus 5.5 --- packages/docusaurus/src/client/App.tsx | 32 +++++++++++++++----------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/packages/docusaurus/src/client/App.tsx b/packages/docusaurus/src/client/App.tsx index f9748a86f9cd..b82815e5f497 100644 --- a/packages/docusaurus/src/client/App.tsx +++ b/packages/docusaurus/src/client/App.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import type {ReactNode} from 'react'; +import {Suspense, type ReactNode} from 'react'; import '@generated/client-modules'; import routes from '@generated/routes'; @@ -38,19 +38,23 @@ function AppNavigation() { } export default function App(): ReactNode { + // React keeps leftover server nodes at the root, but not inside a Suspense + // boundary: https://github.com/facebook/docusaurus/pull/10059 return ( - - - - - - - - - - - - - + + + + + + + + + + + + + + + ); }