Skip to content

Conversation

@huntie
Copy link
Member

@huntie huntie commented Nov 4, 2025

Summary

Adds support for disabling DevTools features that are potentially unsafe with multiple React Native hosts — this is a quality guarantee for our open source launch of the Network and Performance panels.

Changes

  1. New CDP Event: Added ReactNativeApplication.systemStateChanged event to communicate when the app has multiple React Native hosts.
    • Note: From the frontend's point of view, this is a one way change where if isSingleHost ever gets switched false, the change is sticky for the rest of the DevTools session.
  2. Feature Gating: Implemented automatic disabling of multi-host-unsafe features in FuseboxFeatureObserver
    • Resets Network panel state and sends Network.disable CDP command
    • Replaces Network and Performance panel UIs with empty state explaining the limitation

Test plan

[FB only] 🎬 https://pxl.cl/8qWzB

image

When isSingleHost: false is received:
✅ Network and Performance panels are disabled with user message
✅ Panels are non-interactible

  • This change maintains backwards compatibility with previous Local Storage data (if modifying settings, experiments, or other persisted client state).

Upstreaming plan

@huntie huntie requested review from hoxyq and motiz88 November 4, 2025 14:12
@meta-cla meta-cla bot added the cla signed label Nov 4, 2025
@huntie huntie force-pushed the feature-host-lifecycle-correctness branch from e826302 to 65bd477 Compare November 4, 2025 18:25
@huntie huntie force-pushed the feature-host-lifecycle-correctness branch from 65bd477 to 82b0310 Compare November 4, 2025 18:43
@huntie huntie changed the title Add conditional disabling of unsafe multi host features Add conditional disabling of features incompatible with multiple hosts Nov 4, 2025
@huntie huntie marked this pull request as ready for review November 4, 2025 18:45
Copy link

@hoxyq hoxyq left a comment

Choose a reason for hiding this comment

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

What about hotkeys?

I would expect Cmd + E to still work for Performance panel.

@huntie
Copy link
Member Author

huntie commented Nov 6, 2025

@hoxyq Interesting, let me check

@huntie
Copy link
Member Author

huntie commented Nov 6, 2025

@hoxyq Alright, it works — but this falls back on the domain disabling we've done 🙂. I'm just going to rebase the branch.

image

@huntie huntie merged commit 59c63cb into facebook:main Nov 6, 2025
5 checks passed
@huntie huntie deleted the feature-host-lifecycle-correctness branch November 6, 2025 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants