Skip to content

Conversation

@huntie
Copy link
Member

@huntie huntie commented Mar 28, 2024

Summary

Adds a new rn_fusebox DevTools entry point, forked from rn_inspector . This entry point is designed to work with all features of the next-gen debugging stack (codename: React Fusebox ⚡).

Differences between entry points:

  • rn_inspector.html — The current Experimental Debugger experience used in open source (RN + Expo), compatible with Hermes CDPHandler.
    • Changed in this PR — recent feature additions are removed, and are present in rn_fusebox.ts instead:
      • Host.RNPerfMetrics
      • ENABLE_REACT_DEVTOOLS_PANEL experiment
      • FuseboxClientMetadataModel
  • rn_fusebox.html
    • Exact copy of rn_inspector prior to this PR.
    • We intend to more rapidly/aggressively tweak frontend features (without necessarily creating granular flags) using this new entry point.

Ideally, we will de-fork at some point in future and return to one rn_inspector.html entry point.

Note

This change should not be synced to React Native until we've configured the launch flow to conditionally select rn_fusebox.html.

Test plan

yarn build

New rn_fusebox.html entry point

image

✅ Renders, no unexpected console errors

rn_inspector.html entry point unchanged

image

✅ Renders, no unexpected console errors

Upstreaming plan

  • This commit should be sent as a patch to the upstream devtools-frontend repo. I've reviewed the contribution guide.
  • This commit is React Native-specific and cannot be upstreamed.

@huntie huntie requested a review from motiz88 March 28, 2024 12:12
huntie added a commit to huntie/react-native that referenced this pull request Mar 28, 2024
Summary:
Context: facebook/react-native-devtools-frontend#34.

Changelog: [Internal]

Differential Revision: D55474522
huntie added a commit to huntie/react-native that referenced this pull request Mar 28, 2024
huntie added a commit to huntie/react-native that referenced this pull request Mar 28, 2024
huntie added a commit to huntie/react-native that referenced this pull request Mar 28, 2024
huntie added a commit to huntie/react-native that referenced this pull request Mar 28, 2024
huntie added a commit to huntie/react-native that referenced this pull request Mar 28, 2024
Copy link

@EdmondChuiHW EdmondChuiHW left a comment

Choose a reason for hiding this comment

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

LGTM.

Small merge conflict with #33 but should be trivial.

Non-blocking: One thing it could be useful for us is *-meta.ts file/:meta build pattern. CDT convention seems to do setups there and code sharing. That way we can have the common code, e.g. experiment setup code, in the *-meta.ts file. Then the fusebox and rn_insepector entry points will be strictly distinct.

Note for the future: we can also add a response from FuseboxClient.setClientMetadata, so we can redirect/warn people in the UI if they somehow ended up in the Fusebox entrypoint without a supported target

@huntie
Copy link
Member Author

huntie commented Apr 2, 2024

@EdmondChuiHW

One thing it could be useful for us is *-meta.ts file/:meta build pattern. CDT convention seems to do setups there and code sharing.

Makes sense if we needed to maintain both entry points for the long term. In this case, the plan is to effectively freeze development on the old entry point and only touch rn_fusebox, until we delete the other one. Should only last one more major release cycle 🤞🏻. With this in mind, copying seemed pragmatic, especially given the less obvious forking of experiment defaults in the stacked changes.

@huntie huntie merged commit 8919933 into facebook:main Apr 2, 2024
@huntie huntie deleted the fusebox-entry-point branch April 2, 2024 13:24
facebook-github-bot pushed a commit to facebook/react-native that referenced this pull request Apr 2, 2024
Summary:
Pull Request resolved: #43688

Context: facebook/react-native-devtools-frontend#34.

Changelog: [Internal]

Reviewed By: EdmondChuiHW

Differential Revision: D55474522

fbshipit-source-id: 4f514dba228bfa4df41a0eb9687f2525cc32b2d7
facebook-github-bot pushed a commit to facebook/react-native that referenced this pull request Apr 3, 2024
…ets (#43689)

Summary:
Pull Request resolved: #43689

Context: facebook/react-native-devtools-frontend#34.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D55474521

fbshipit-source-id: 9756fe29adcbdda686af24c1a65073720cba4b53
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.

3 participants