Skip to content

feat: add session replay support for react native#357

Merged
Vadman97 merged 60 commits intomainfrom
feature/react-native-swift-session-replay
Feb 23, 2026
Merged

feat: add session replay support for react native#357
Vadman97 merged 60 commits intomainfrom
feature/react-native-swift-session-replay

Conversation

@mario-launchdarkly
Copy link
Contributor

@mario-launchdarkly mario-launchdarkly commented Jan 27, 2026

Summary

Implement support for session replay into react native through swift-observability-sdk

How did you test this change?

e2e testing, example app is provided

Are there any deployment considerations?

it is a front-end package for building mobile apps


Note

Medium Risk
Introduces new native mobile build artifacts and a new iOS session-replay startup path (including offline SDK initialization), which may affect app build/config and runtime behavior; Android support is explicitly non-functional but present.

Overview
Adds a new @launchdarkly/session-replay-react-native workspace package that exposes configureSessionReplay/startSessionReplay/stopSessionReplay and an LDPlugin adapter (createSessionReplayPlugin) to initialize session replay from LaunchDarkly React Native client metadata.

Implements the native bridge: iOS uses a Swift SessionReplayClientAdapter + TurboModule ObjC++ wrapper to start an offline Swift LDClient with Observability + SessionReplay plugins and toggle LDReplay enablement; Android is stubbed to reject calls as not supported.

Includes a full React Native example app (iOS/Android projects, env setup) and adds repo/tooling tweaks: pin turbo to 2.8.7 via resolutions, change observability-shared tests to vitest run, and add Lefthook configuration (root example + package-specific hooks).

Written by Cursor Bugbot for commit de1939b. This will update automatically on new commits. Configure here.

@mario-launchdarkly mario-launchdarkly requested a review from a team as a code owner January 27, 2026 20:27
@mario-launchdarkly mario-launchdarkly force-pushed the feature/react-native-swift-session-replay branch from 3e1346c to 8b1fb92 Compare January 27, 2026 20:38
@Vadman97 Vadman97 force-pushed the feature/react-native-swift-session-replay branch from 73e0355 to cbb094f Compare February 9, 2026 18:44
mario-launchdarkly and others added 12 commits February 13, 2026 16:58
…apter

- Refactored state handling in start and stop methods to ensure proper synchronization and prevent race conditions.
- Enhanced logic to manage ldReplayState transitions more clearly, ensuring that stopping and starting behaviors are correctly handled in a thread-safe manner.
- Updated the state handling to set ldReplayState to .starting before invoking LDClient.start(), ensuring accurate detection of in-flight start and stop processes.
- Removed redundant state assignment within the completion handler to streamline the logic and enhance clarity.
@Vadman97 Vadman97 force-pushed the feature/react-native-swift-session-replay branch from a54e553 to c0cf2e0 Compare February 13, 2026 22:59
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 3 potential issues.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 3 potential issues.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 3 potential issues.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 3 potential issues.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

@Vadman97 Vadman97 merged commit 7f6ed30 into main Feb 23, 2026
22 checks passed
@Vadman97 Vadman97 deleted the feature/react-native-swift-session-replay branch February 23, 2026 18:54
Vadman97 pushed a commit that referenced this pull request Feb 23, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>observability: 1.0.2</summary>

##
[1.0.2](observability-1.0.1...observability-1.0.2)
(2026-02-23)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * highlight.run bumped to 9.27.0
</details>

<details><summary>session-replay: 1.0.2</summary>

##
[1.0.2](session-replay-1.0.1...session-replay-1.0.2)
(2026-02-23)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * highlight.run bumped to 9.27.0
</details>

<details><summary>highlight.run: 9.27.0</summary>

##
[9.27.0](highlight.run-9.26.1...highlight.run-9.27.0)
(2026-02-23)


### Features

* add session replay support for react native
([#357](#357))
([7f6ed30](7f6ed30))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Version/changelog/manifest updates only; no source logic changes in
this diff beyond consuming the new `highlight.run` release.
> 
> **Overview**
> **Release bump PR** updating published versions across the workspace.
> 
> Bumps `highlight.run` from `9.26.1` to `9.27.0` (changelog notes React
Native session replay support), and bumps `@launchdarkly/observability`
and `@launchdarkly/session-replay` from `1.0.1` to `1.0.2` to pick up
the updated `highlight.run` dependency; manifests and changelogs are
updated accordingly.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
27f0e71. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Vadman97 pushed a commit that referenced this pull request Feb 23, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>session-replay-react-native: 0.2.0</summary>

##
[0.2.0](session-replay-react-native-0.1.0...session-replay-react-native-0.2.0)
(2026-02-23)


### Features

* add session replay support for react native
([#357](#357))
([7f6ed30](7f6ed30))


### Bug Fixes

* **session-replay-react-native:** session replay start with options
enabled/disabled
([#386](#386))
([d012adc](d012adc))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Release metadata-only changes (version bump + changelog) with no
runtime code modifications, so behavioral risk is low.
> 
> **Overview**
> Updates the Release Please manifest and
`@launchdarkly/session-replay-react-native` package version from `0.1.0`
to `0.2.0`.
> 
> Adds a new `CHANGELOG.md` entry for `0.2.0`, documenting React Native
session replay support and a fix for starting session replay when
options enable/disable it.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
ab97259. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
abelonogov-ld added a commit that referenced this pull request Feb 24, 2026
* main:
  chore: release main (#388)
  fix: add @launchdarkly/session-replay-react-native to release-please (#387)
  chore: release main (#385)
  fix(session-replay-react-native): session replay start with options enabled/disabled (#386)
  feat: add session replay support for react native (#357)
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.

3 participants