Skip to content

Conversation

@abelonogov-ld
Copy link
Contributor

@abelonogov-ld abelonogov-ld commented Dec 15, 2025

RRWeb Canvas is being updated by draw commands and they all kept in the browser memory. Pr makes SR to reset this Canvas cache by pushing FullSnapshot after 10mb of canvas payloads


Note

Tracks canvas payload size (~10MB limit) to decide between incremental draws and full snapshots, refactors event data types, and adds SessionReplay tests.

  • Session Replay:
    • Enforce RRWeb canvas buffer cap (~10MB) via generatingCanvasSize/pushedCanvasSize; trigger FullSnapshot when exceeded; otherwise issue incremental drawImage.
    • Add RRWebPlayerConstants, track per-event canvasSize, and update size after payload push (updatePushedCanvasSize).
    • Optimize image handling (reuse base64 string, pass rr_dataURL into ExportImage.eventNode).
  • RRWeb event model refactor:
    • Replace generic EventData with specific WindowData, MouseInteractionData, MouseMoveEventData, and DomData (with transitional canvasSize).
    • Extend CanvasDrawData/AnyCommand to carry canvasSize; adjust decoding in AnyEventData.
  • Exporter:
    • After pushPayload, flush accumulated canvas size in SessionReplayEventGenerator.
  • GraphQL:
    • Make GraphQLClient.endpoint private.
  • Build & Tests:
    • Add SessionReplayTests target and scheme entry.
    • New tests validate draw vs full snapshot behavior based on canvas buffer limit.

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

@abelonogov-ld abelonogov-ld merged commit 0a531f5 into main Dec 16, 2025
6 checks passed
@abelonogov-ld abelonogov-ld deleted the andrey/limit-acc-canvas-buffer3 branch December 16, 2025 16:12
abelonogov-ld added a commit that referenced this pull request Dec 16, 2025
* main:
  fix: UIDevice.current.orientation.isLandscape not main thread access (#102)
  feat: Limit accumulating canvas buffer (#101)
abelonogov-ld pushed a commit that referenced this pull request Dec 16, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.14.0](0.13.1...0.14.0)
(2025-12-16)


### Features

* Flush buffers on going to app switcher
([#104](#104))
([1cd74be](1cd74be))
* Limit accumulating canvas buffer
([#101](#101))
([0a531f5](0a531f5))


### Bug Fixes

* UIDevice.current.orientation.isLandscape not main thread access
([#102](#102))
([d8ffa0a](d8ffa0a))

---
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]
> Prepare 0.14.0 release with changelog updates and version bumps across
manifest, podspecs, and `sdkVersion`.
> 
> - **Release 0.14.0**
> - Update versions in `.release-please-manifest.json`,
`LaunchDarklyObservability.podspec`,
`LaunchDarklySessionReplay.podspec`, and
`Sources/LaunchDarklyObservability/Version.swift`.
> - Update `CHANGELOG.md` with features (flush buffers on app switcher,
limit accumulating canvas buffer) and a bug fix (avoid non-main-thread
access for device orientation).
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
07363d2. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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