Skip to content

[DevTools] Enable Suspense tab by default#506

Closed
everettbu wants to merge 1 commit into
mainfrom
sebbie/02-12-_devtools_enable_suspense_tab_by_default
Closed

[DevTools] Enable Suspense tab by default#506
everettbu wants to merge 1 commit into
mainfrom
sebbie/02-12-_devtools_enable_suspense_tab_by_default

Conversation

@everettbu

Copy link
Copy Markdown

Mirror of facebook/react#35768
Original author: eps1lon


Summary

We only showed it conditionally during initial testing. To help discovery on initial release, we're enabling it everywhere.

Conditionally showing was also annoying since it requires a waterfall on initial load that leads to shifting of DevTools tabs.

How did you test this change?

@everettbu everettbu added CLA Signed React Core Team Opened by a member of the React Core Team labels Feb 12, 2026
@greptile-apps

greptile-apps Bot commented Feb 12, 2026

Copy link
Copy Markdown

Greptile Overview

Greptile Summary

This PR removes the conditional display logic for the Suspense tab in React DevTools, making it enabled by default for all users. The changes eliminate the version checking and event-driven tab initialization that previously required a backend-to-frontend waterfall.

Key changes:

  • Suspense tab is now created eagerly during DevTools initialization instead of being conditionally created via an event listener
  • Removed version checking logic that previously only enabled the tab for React 19.3.0-canary and above in development builds
  • Removed the enableSuspenseTab bridge event from the backend-to-frontend communication protocol
  • Removed all conditional rendering logic in the DevTools UI - the Suspense tab is now always present in the tabs array
  • Cleaned up unused imports (gte utility) and state management code (_supportsSuspenseTab, onEnableSuspenseTab, etc.)

The implementation is clean and comprehensive - all references to the conditional logic have been properly removed across the codebase, with no orphaned code or incomplete refactoring.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The refactoring is thorough and complete - all references to the conditional Suspense tab logic have been cleanly removed across the codebase. The changes are purely additive from a feature perspective (making the tab always available), with no breaking changes to the API. The removal of the version check and event-driven initialization eliminates complexity and improves the initial load experience by avoiding waterfalls. No logic errors, syntax issues, or incomplete removals were found.
  • No files require special attention

Important Files Changed

Filename Overview
packages/react-devtools-shared/src/backend/agent.js Removed version check logic and enableSuspenseTab bridge event emission from renderer registration
packages/react-devtools-shared/src/devtools/store.js Removed _supportsSuspenseTab state, supportsSuspenseTab getter, event listener, and handler method
packages/react-devtools-shared/src/devtools/views/DevTools.js Removed conditional logic for Suspense tab - now always included in tabs array and rendered unconditionally

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@everettbu

Copy link
Copy Markdown
Author

Upstream PR was closed or merged. Code is synced via branch mirror.

@everettbu everettbu closed this Feb 12, 2026
@everettbu
everettbu deleted the sebbie/02-12-_devtools_enable_suspense_tab_by_default branch February 12, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants