PANA-8893: Enable Composition Tree recording in Session Replay - #1393
Merged
gonzalezreal merged 3 commits intoSep 2, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new enableCompositionTreeRecording option to the React Native Session Replay configuration to allow opting into the experimental “Composition Tree” recording pipeline (iOS 13+), while forwarding the flag through the Android bridge for future support.
Changes:
- Adds
enableCompositionTreeRecordingto the public JS/TS API, internal config, and native module method signatures. - Updates iOS native implementation to set the composition-tree feature flag (iOS 13+) and to skip additional RN node recorders when enabled.
- Updates JS, iOS, and Android unit tests to account for the new argument and adds iOS-specific behavioral tests.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/react-native-session-replay/src/specs/NativeDdSessionReplay.ts | Extends the TurboModule spec enable() signature with the new flag. |
| packages/react-native-session-replay/src/SessionReplay.ts | Adds the new configuration option, defaulting/forwarding it into the native bridge call. |
| packages/react-native-session-replay/src/nativeModulesTypes.ts | Updates typed native module interface to include the new flag. |
| packages/react-native-session-replay/src/tests/SessionReplay.test.ts | Updates JS unit tests for the new native argument and adds a forwarding test. |
| packages/react-native-session-replay/ios/Sources/DdSessionReplayImplementation.swift | Implements the iOS feature-flag and conditional recorder configuration behavior. |
| packages/react-native-session-replay/ios/Sources/DdSessionReplay.mm | Updates ObjC bridge method signatures to pass the new flag into Swift. |
| packages/react-native-session-replay/ios/Tests/DdSessionReplayTests.swift | Updates existing tests and adds iOS behavior tests for composition-tree mode. |
| packages/react-native-session-replay/android/src/main/kotlin/com/datadog/reactnative/sessionreplay/DdSessionReplayImplementation.kt | Accepts the new flag (currently unused) and keeps Android behavior unchanged. |
| packages/react-native-session-replay/android/src/oldarch/kotlin/com/datadog/reactnative/sessionreplay/DdSessionReplay.kt | Updates old-arch module method signature to accept/forward the new flag. |
| packages/react-native-session-replay/android/src/newarch/kotlin/com/datadog/reactnative/sessionreplay/DdSessionReplay.kt | Updates new-arch module method signature to accept/forward the new flag. |
| packages/react-native-session-replay/android/src/test/kotlin/com/datadog/reactnative/sessionreplay/DdSessionReplayImplementationTest.kt | Updates Android unit tests to pass the new flag argument. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The cross-platform API/bridge wiring is consistent and covered by updated tests, with only a minor documentation accuracy nit remaining.
Review details
- Files reviewed: 11/11 changed files
- Comments generated: 1
- Review effort level: Lite
sbarrio
approved these changes
Sep 2, 2026
jonathanmos
approved these changes
Sep 2, 2026
gonzalezreal
deleted the
gonzalezreal/PANA-8893/enable-composition-tree-recording
branch
September 2, 2026 09:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds an
enableCompositionTreeRecordingoption to the Session Replay configuration.When enabled on iOS 13+, Session Replay uses the experimental Composition Tree recording pipeline. React Native text and SVG recorders are not configured because they do not apply to this pipeline.
The option defaults to
false. It is forwarded on Android but has no effect until Android support is implemented.Motivation
Allow React Native users to opt into the Composition Tree recording pipeline introduced in
dd-sdk-ios3.16.0Additional Notes
The public API, native bridges, and tests have been updated for both React Native architectures.
Review checklist (to be filled by reviewers)