Skip to content

fix(session-replay-react-native): pass null deviceId through to native SDKs - #1962

Draft
aliaksandr-kazarez wants to merge 1 commit into
mainfrom
fix/sdkrn-68-nullable-device-id
Draft

fix(session-replay-react-native): pass null deviceId through to native SDKs#1962
aliaksandr-kazarez wants to merge 1 commit into
mainfrom
fix/sdkrn-68-nullable-device-id

Conversation

@aliaksandr-kazarez

Copy link
Copy Markdown
Contributor

Summary

  • Preserve the nullable React Native public API (string | null) and keep null meaning clear/unset.
  • Stop coercing null to an empty string in Android setup and setDeviceId; pass it directly to session-replay-android.
  • Declare the iOS Objective-C and Swift setDeviceId bridge parameter nullable end to end.
  • Add JS forwarding and native bridge contract tests to prevent null-to-empty-string regressions.

Blocks on

Test plan

  • TDD red run: new Android and iOS bridge contract tests failed before implementation.
  • pnpm exec jest --runInBand --testPathPattern='\\.test\\.(ts|tsx)$' (62 tests passed)
  • pnpm typecheck
  • pnpm build in packages/session-replay-react-native
  • ESLint and Prettier checks for test/session-replay.test.ts
  • Android :app:compileDebugKotlin currently stops at dependency resolution because Maven Central has no com.amplitude:session-replay-android version in [0.29.0,0.30.0) yet. Re-run after fix(plugins): update timing of sending batches of session replay events #471 is published.

Posted automatically with Cursor. LLMs make mistakes — please verify before acting.

@linear-code

linear-code Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

SDKRN-68

@github-actions

Copy link
Copy Markdown

size-limit report 📦

Path Size
packages/analytics-browser/lib/scripts/amplitude-min.js.gz 64.33 KB (0%)
packages/session-replay-browser/lib/scripts/session-replay-browser-min.js.gz 135.3 KB (0%)
packages/unified/lib/scripts/amplitude-min.umd.js.gz 218.72 KB (0%)
@amplitude/element-selector (gzipped esm) 3.4 KB (0%)

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.

1 participant