@samitouri / QOS-React-1 / commits / 6066c782fe

[DevTools] Dedicated empty state for roots that aren't suspended by anything (#35769)

Sebastian "Sebbie" Silbermann committed Feb 12, 2026 at 17:48 UTC 6066c782fe06b65e98a410741d994f620321fe11
1 file changed +16 -1
packages/react-devtools-shared/src/devtools/views/Components/InspectedElementSuspendedBy.js
+16 -1
@@ -36,6 +36,7 @@ import {
36 UNKNOWN_SUSPENDERS_REASON_OLD_VERSION,
37 UNKNOWN_SUSPENDERS_REASON_THROWN_PROMISE,
38 } from '../../../constants';
39 +import {ElementTypeRoot} from 'react-devtools-shared/src/frontend/types';
40
41 type RowProps = {
42 bridge: FrontendBridge,
@@ -477,7 +478,21 @@ export default function InspectedElementSuspendedBy({
478 </div>
479 );
480 }
480 - return null;
481 + // For roots, show an empty state since there's nothing else to show for
482 + // these elements.
483 + // This can happen for older versions of React without Suspense, older versions
484 + // of React with less sources for Suspense, or simple UIs that don't have any suspenders.
485 + if (inspectedElement.type === ElementTypeRoot) {
486 + return (
487 + <div>
488 + <div className={styles.HeaderRow}>
489 + <div className={`${styles.Header} ${styles.Empty}`}>
490 + Nothing suspended the initial paint.
491 + </div>
492 + </div>
493 + </div>
494 + );
495 + }
496 }
497
498 const handleCopy = withPermissionsCheck(