Skip to content

PANA-9557: Expose opt-in adaptive capture scheduling for Session Replay - #1531

Open
jonathanmos wants to merge 2 commits into
developfrom
jmoskovich/pana-9557/cursor-blink
Open

jonathanmos wants to merge 2 commits into
developfrom
jmoskovich/pana-9557/cursor-blink

Conversation

@jonathanmos

@jonathanmos jonathanmos commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

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.

  • Defaults to false; enable with SessionReplay.enable({ adaptiveCaptureSchedulingEnabled: true }).
  • Android only; has no effect on iOS.
  • Updates and aligns all Android SDK dependencies at 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)

  • Feature or bugfix MUST have appropriate tests
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)
  • If this PR is auto-generated, please make sure also to manually update the code related to the change

@jonathanmos

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T12:19:59.441316Z 4bba14f New commits
🔒 Security Review ✅ Completed 2026-11-03T12:21:59.047285Z 4bba14f New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: fafb6a9862

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: fafb6a9862

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@jonathanmos
jonathanmos marked this pull request as ready for review November 3, 2026 09:11
@jonathanmos
jonathanmos requested a review from a team as a code owner November 3, 2026 09:11

@datadog-datadog-us1-prod datadog-datadog-us1-prod 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.

Bits Code Review: PASS

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.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit fafb6a9

@jonathanmos
jonathanmos changed the base branch from bplasovska/bump-native-sdk to develop November 3, 2026 12:17
@jonathanmos
jonathanmos force-pushed the jmoskovich/pana-9557/cursor-blink branch from fafb6a9 to 4bba14f Compare November 3, 2026 12:18
Copilot AI balanced review requested due to automatic review settings November 3, 2026 12:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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 to false, 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

@datadog-datadog-us1-prod datadog-datadog-us1-prod 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.

Bits Code Review: PASS

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.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit fafb6a9

@maciejburda
maciejburda requested a review from sbarrio November 4, 2026 08:07

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants