Repository navigation
Conversation
There was a problem hiding this comment.
PR Review — Quality: 5.0 / 5 · Review load: Focused (~30–45min)
This restores automatic RUM taps for the runtime onPress interceptor on React Native 0.89, and it is ready to merge as-is. resolveTargetNode still prefers _targetInst, then the fiber on currentTarget.__internalInstanceHandle, then target.__internalInstanceHandle. That matches 0.89 EventTarget dispatch (enableNativeEventTargetEventDispatching defaults on in 0.89.0-rc.2): those press events do not carry _targetInst, currentTarget is the pressed host while onPress runs, and nativeEvent is unchanged, so touch coordinates still go through touchDataFromEvent. Events that still have _targetInst, including older runtimes, keep the previous fiber.
Customer impact: Medium — React Native 0.89 apps that set trackInteractions and do not use the Babel plugin record tap actions again. Babel interaction tracking names actions from compile-time props and does not use this resolver. trackInteractions stays off by default.
| Concern | |
|---|---|
Tap qualification and fiber selection in DdEventsInterceptor |
Risky |
Assessment: The helper is private, the new reads use optional chaining, and nothing is exported from the public entry point. Tests cover a fiber on target or currentTarget with no _targetInst, _targetInst winning when both shapes are present, a wrapped { event } press, a frozen event that must not gain _targetInst, and the pressed host’s accessibility label winning over a nested text target. When both fibers exist, the name comes from the pressed host; that is the order the description and the nested-text test lock in.
Review load — Focused (~30–45min): One cross-runtime choice: which object counts as a press, and which fiber names it. iOS and Android share this JS path.
Sent by Cursor Automation: dd-sdk-react-native reviews
886230c to
866e2a8
Compare
- Update DdEventsInterceptor to handle the new event shape while preserving legacy support - Include the interceptor tests
866e2a8 to
bbdefb3
Compare
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🔵 Needs a closer look
The fix relies on private React Native 0.89 EventTarget/Fiber fields, but tests use hand-built RN 0.76.9 objects, leaving real iOS and Android presses, action labels, and native touch data unverified.
No open issues 🎉
What changed in this PR
This PR updates automatic tap tracking for React Native 0.89 events that lack _targetInst, while preserving support for older event formats.
Changes:
- Resolves the React instance from
_targetInst, thencurrentTarget, thentarget. - Supports direct and wrapped events without modifying the original event.
- Adds regression tests for immutable events, target precedence, and action-label resolution.
| File | Description |
|---|---|
packages/core/src/rum/instrumentation/interactionTracking/DdEventsInterceptor.tsx |
Adds shared target resolution for legacy and EventTarget-based events. |
packages/core/src/__tests__/rum/instrumentation/DdEventsInterceptor.test.tsx |
Tests new event formats, event preservation, target precedence, and naming. |
Review effort: Balanced
There was a problem hiding this comment.
More details
Legacy target precedence is preserved, and the fallback handles immutable and wrapped events. React Native 0.89 device behavior remains unverified.
🤖 Bits Code Review · Commit bbdefb3


What does this PR do?
Restores automatic tap tracking on React Native 0.89 for iOS and Android. When _targetInst is unavailable, the interceptor resolves the React instance from currentTarget, then target, while preserving support for older event formats.
Includes regression tests for direct and wrapped events, immutable events, and action label resolution.
Motivation
React Native 0.89 touch events no longer expose _targetInst. The interceptor consequently discards these events, leaving automatic RUM tap actions unrecorded.
Review checklist (to be filled by reviewers)