Skip to content

[Devtools] add selectNodeWithViewData to agent#406

Closed
everettbu wants to merge 6 commits into
mainfrom
livemate-agent
Closed

[Devtools] add selectNodeWithViewData to agent#406
everettbu wants to merge 6 commits into
mainfrom
livemate-agent

Conversation

@everettbu

Copy link
Copy Markdown

Mirror of facebook/react#35601
Original author: sbuggay


Summary

selectNode does not send any additional view data when an element is selected in the inspector. This change adds selectNodeWithViewData which let's React Native DevTools understand more about the view and it's component hierarchy.

How did you test this change?

Tested in an E2E flow that leverages selectNodeWithViewData in order to send view data to RNDT.

@greptile-apps

greptile-apps Bot commented Jan 22, 2026

Copy link
Copy Markdown

Greptile Summary

Added selectNodeWithViewData method to agent and corresponding selectElementWithViewData bridge event to pass React Native view data when selecting elements in the inspector.

  • Added new selectNodeWithViewData method in agent.js that sends view data through the bridge
  • Added new selectElementWithViewData event type in bridge.js with TouchedViewDataAtPoint payload
  • Critical issue: Both files import from ./ReactNativeTypes which doesn't exist in the react-devtools-shared package - this will cause compilation to fail

Confidence Score: 0/5

  • This PR cannot be merged - it contains critical compilation errors
  • Both modified files import from ./ReactNativeTypes which doesn't exist in the react-devtools-shared package, causing guaranteed compilation failure. The ReactNativeTypes.js file only exists in packages/react-native-renderer/src/, not in the devtools package.
  • Both files require immediate attention - the broken imports must be fixed before this PR can be merged

Important Files Changed

Filename Overview
packages/react-devtools-shared/src/backend/agent.js Added selectNodeWithViewData method with broken import - ReactNativeTypes file doesn't exist in this package
packages/react-devtools-shared/src/bridge.js Added selectElementWithViewData event type with broken import - ReactNativeTypes file doesn't exist in this package

@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.

2 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Comment on lines +23 to +25
import type {
TouchedViewDataAtPoint,
} from './ReactNativeTypes';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

syntax: import path ./ReactNativeTypes doesn't exist in this package - this will cause compilation to fail

ReactNativeTypes.js only exists in packages/react-native-renderer/src/. Either create this file locally or update the import path.

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/react-devtools-shared/src/backend/agent.js
Line: 23:25

Comment:
**syntax:** import path `./ReactNativeTypes` doesn't exist in this package - this will cause compilation to fail

`ReactNativeTypes.js` only exists in `packages/react-native-renderer/src/`. Either create this file locally or update the import path.

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +12 to +14
import type {
TouchedViewDataAtPoint,
} from './ReactNativeTypes';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

syntax: import path ./ReactNativeTypes doesn't exist in this package - this will cause compilation to fail

ReactNativeTypes.js only exists in packages/react-native-renderer/src/. Either create this file locally or update the import path.

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/react-devtools-shared/src/bridge.js
Line: 12:14

Comment:
**syntax:** import path `./ReactNativeTypes` doesn't exist in this package - this will cause compilation to fail

`ReactNativeTypes.js` only exists in `packages/react-native-renderer/src/`. Either create this file locally or update the import path.

How can I resolve this? If you propose a fix, please make it concise.

@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated.

@github-actions github-actions Bot added the Resolution: Stale Automatically closed due to inactivity label Apr 22, 2026
@github-actions

Copy link
Copy Markdown

Closing this pull request after a prolonged period of inactivity. If this issue is still present in the latest release, please ask for this pull request to be reopened. Thank you!

@github-actions github-actions Bot closed this Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Resolution: Stale Automatically closed due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants