Skip to content

Conversation

@motiz88
Copy link

@motiz88 motiz88 commented Mar 19, 2024

Summary

Registers a trivial FuseboxClientMetadataModel as part of the rn_inspector entry point, which sends a custom CDP message (FuseboxClient.setClientMetadata) when connected.

This is intended to allow the modern React Native CDP backend to positively identify this frontend. We do this for display purposes only, as React Native aims to keep overall compatibility with CDP. We forgo setting up a proper CDP domain and agent, with codegen and types, because we don't anticipate extending this solution much further.

Test plan

Manually confirmed that the message reaches the backend on first connection and on reload/reconnection.

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.

@motiz88 motiz88 requested a review from huntie March 19, 2024 18:14
motiz88 added a commit to motiz88/react-native that referenced this pull request Mar 20, 2024
Summary:
Changelog: [Internal]

Uses facebook/react-native-devtools-frontend#24 to identify the Fusebox frontend and show a corresponding message in the logs.

Also tweaks the wording and formatting of other messages logged by the Fusebox backend - including removing the "you are using the modern CDP backend" one.

Reviewed By: huntie

Differential Revision: D55075645
motiz88 added a commit to motiz88/react-native that referenced this pull request Mar 20, 2024
…end (facebook#43565)

Summary:

Changelog: [Internal]

Uses facebook/react-native-devtools-frontend#24 to identify the Fusebox frontend and show a corresponding message in the logs.

Also tweaks the wording and formatting of other messages logged by the Fusebox backend - including removing the "you are using the modern CDP backend" one.

Reviewed By: huntie

Differential Revision: D55075645
@motiz88 motiz88 merged commit 622246a into facebook:main Mar 20, 2024
@motiz88 motiz88 deleted the fusebox-client-handshake branch March 20, 2024 11:51
facebook-github-bot pushed a commit to facebook/react-native that referenced this pull request Mar 20, 2024
…end (#43565)

Summary:
Pull Request resolved: #43565

Changelog: [Internal]

Uses facebook/react-native-devtools-frontend#24 to identify the Fusebox frontend and show a corresponding message in the logs.

Also tweaks the wording and formatting of other messages logged by the Fusebox backend - including removing the "you are using the modern CDP backend" one.

Reviewed By: huntie

Differential Revision: D55075645

fbshipit-source-id: c82670570c79b61efd399f26684139ce97f017ef
@motiz88 motiz88 mentioned this pull request Mar 20, 2024
2 tasks
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