Repository navigation
PANA-9557: Expose opt-in adaptive capture scheduling for Session Replay - #1531
jonathanmos wants to merge 2 commits into
Conversation
|
@codex review |
Codex Review SummaryThis 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. |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
There was a problem hiding this comment.
More details
The adaptive scheduling option defaults to false and is forwarded consistently through both Android bridge implementations; iOS accepts it without changing behavior. Runtime behavior remains unverified because project dependencies are not installed.
🤖 Bits Code Review · Commit fafb6a9
fafb6a9 to
4bba14f
Compare
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block approval of the adaptive capture scheduling change.
No open issues 🎉
What changed in this PR
Exposes Android’s adaptive Session Replay capture scheduling through the React Native API, allowing applications to opt in to reduced capture CPU usage on frequently redrawn screens.
Changes:
- Adds
adaptiveCaptureSchedulingEnabled, defaulting tofalse, and forwards it through both Android bridges; iOS accepts the option without changing behavior. - Adds JavaScript and Android tests for defaults, explicit values, and configuration forwarding.
- Aligns Datadog Android dependencies and benchmark tooling to
3.16.0.
| File | Description |
|---|---|
packages/react-native-webview/android/build.gradle |
Updates the Android WebView SDK dependency. |
packages/react-native-session-replay/src/specs/NativeDdSessionReplay.ts |
Adds the option to the TurboModule contract. |
packages/react-native-session-replay/src/SessionReplay.ts |
Defines, documents, defaults, and forwards the public option. |
packages/react-native-session-replay/src/nativeModulesTypes.ts |
Updates the native module interface. |
packages/react-native-session-replay/src/__tests__/SessionReplay.test.ts |
Tests defaults, forwarding, and option independence. |
packages/react-native-session-replay/ios/Sources/DdSessionReplay.mm |
Accepts the Android-only option without applying it. |
packages/react-native-session-replay/android/src/test/kotlin/com/datadog/reactnative/sessionreplay/DdSessionReplayTest.kt |
Adds bridge-level configuration forwarding tests. |
packages/react-native-session-replay/android/src/test/kotlin/com/datadog/reactnative/sessionreplay/DdSessionReplayImplementationTest.kt |
Tests native scheduling configuration and updates existing calls. |
packages/react-native-session-replay/android/src/oldarch/kotlin/com/datadog/reactnative/sessionreplay/DdSessionReplay.kt |
Forwards the option through the legacy bridge. |
packages/react-native-session-replay/android/src/newarch/kotlin/com/datadog/reactnative/sessionreplay/DdSessionReplay.kt |
Forwards the option through the new-architecture bridge. |
packages/react-native-session-replay/android/src/main/kotlin/com/datadog/reactnative/sessionreplay/DdSessionReplayImplementation.kt |
Applies the option through the native SDK’s internal proxy. |
packages/react-native-session-replay/android/build.gradle |
Updates Session Replay and internal SDK dependencies. |
packages/internal-testing-tools/android/build.gradle |
Aligns the testing tools’ Android core dependency. |
packages/core/android/build.gradle |
Aligns core package Android SDK dependencies. |
benchmarks/android/app/build.gradle |
Aligns benchmark tooling and Android core dependencies. |
Review effort: Balanced
There was a problem hiding this comment.
More details
Static review supports the option’s false default and consistent forwarding through both Android bridges, with iOS accepting and ignoring the shared argument. Runtime behavior remains unverified because project dependencies are absent.
🤖 Bits Code Review · Commit fafb6a9
What does this PR do?
Exposes Android’s adaptive Session Replay capture scheduling through
adaptiveCaptureSchedulingEnabled, allowing users to opt in to reduce CPU usage on screens with frequent redraws, such as a blinking text cursor.false; enable withSessionReplay.enable({ adaptiveCaptureSchedulingEnabled: true }).3.16.0, which provides the native scheduling API.Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)