Skip to content

feat: Tile compression - backtracking layers level#137

Merged
abelonogov-ld merged 30 commits intomainfrom
andrey/tile-removals1
Feb 18, 2026
Merged

feat: Tile compression - backtracking layers level#137
abelonogov-ld merged 30 commits intomainfrom
andrey/tile-removals1

Conversation

@abelonogov-ld
Copy link
Copy Markdown
Contributor

@abelonogov-ld abelonogov-ld commented Feb 17, 2026

Implemented tile compression, which divides the screen into multiple tiles and changes from the previous screen being detected. If possible, only a portion of the screen is sent; otherwise, the entire screen is sent. If it’s possible to restore the previous state by removing a layer, the layer is removed.

Added an option compression: overlayTiles(layers = 10). The layers parameter specifies the number of layers that can be stacked on top of each other.

image

Note

Medium Risk
Changes the core capture/compression and RRWeb event-generation paths; bugs could lead to missing/incorrect frames or increased payloads, but the change is scoped to session replay data generation (not auth/security).

Overview
Introduces a configurable session replay compression mode (SessionReplayOptions.compression) with an overlayTiles(layers:) strategy that periodically emits keyframes and otherwise sends only the changed screen region.

Refactors capture/export to produce ExportFrame (one or more image tiles + rects, keyframe flag, and optional ImageSignature) via a new CaptureManager + TileDiffManager, and updates the RRWeb pipeline to apply incremental updates using a new .mutation IncrementalSource (MutationData add/remove nodes with backtracking) instead of always redrawing a single full-screen canvas.

Updates supporting RRWeb encodings (WindowData sizing, canvas commands to accept rects), renames SessionReplayEventGenerator to RRWebEventGenerator, and adjusts tests and the test app for the new capture API.

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

Squashed commits:
[397779f] ImageSignature
[1a92964] deduplicate images before buffer
[80ed3b3] starting tile signature

(cherry picked from commit f433e88665b3c122ed2782227a4f0ba7a3e4b315)
[44efd2e] begin compare before
Squashed commits:
[1a92964] deduplicate images before buffer
[80ed3b3] starting tile signature

(cherry picked from commit f433e88665b3c122ed2782227a4f0ba7a3e4b315)
[44efd2e] begin compare before
…ssion

* andrey/send-changed-rectangles:
  sending just rect (+3 squashed commits) Squashed commits: [1a92964] deduplicate images before buffer [80ed3b3] starting tile signature
  fix concurrency issues
  remove after buffer image comparisons (+4 squashed commits) Squashed commits: [397779f] ImageSignature [1a92964] deduplicate images before buffer [80ed3b3] starting tile signature

# Conflicts:
#	Sources/LaunchDarklySessionReplay/ScreenCapture/ScreenCaptureService.swift
#	Sources/LaunchDarklySessionReplay/ScreenCapture/TiledSignatureManager.swift
* main:
  chore(main): release 0.18.2 (#133)
  fix: additional attributes only at session level (#134)
  fix: Make canonicalkey always from fullyQualifiedKey (#109)
Copy link
Copy Markdown

@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 1 potential issue.

@abelonogov-ld abelonogov-ld merged commit 56d86da into main Feb 18, 2026
5 checks passed
@abelonogov-ld abelonogov-ld deleted the andrey/tile-removals1 branch February 18, 2026 00:11
Vadman97 pushed a commit that referenced this pull request Feb 18, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.19.0](0.18.2...0.19.0)
(2026-02-18)


### Features

* Tile compression - backtracking layers level
([#137](#137))
([56d86da](56d86da))

---
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 bookkeeping only (version/changelog updates) with no
functional code changes in this diff.
> 
> **Overview**
> Publishes **v0.19.0** by bumping the version in release metadata
(manifest, podspecs) and updating `sdkVersion`.
> 
> Updates `CHANGELOG.md` with the 0.19.0 release notes, including the
*Tile compression - backtracking layers level* feature.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
9febef4. 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