Skip to content

chore: stop passing RRStyle to replay screenshot frames - #684

Merged
turnipdabeets merged 1 commit into
chore/v6-adopt-posthog-ios-4from
chore/v6-drop-rrstyle
Oct 29, 2026
Merged

turnipdabeets merged 1 commit into
chore/v6-adopt-posthog-ios-4from
chore/v6-drop-rrstyle

Conversation

@turnipdabeets

Copy link
Copy Markdown
Contributor

Important

Stacked on #663 and depends on PostHog/posthog-android#908. posthog-android 4.0 removes RRStyle, so #663 won't compile for Android without this change.

💡 Motivation and Context

posthog-android 4.0 removes wireframe session replay (PostHog/posthog-android#908). Since screenshot frames are the only kind left, the internal RRWireframe now keeps only id, x, y, width, height, type and base64, and RRStyle is deleted. SnapshotSender passed style = RRStyle(), which only serialized an empty "style": {}.

This PR stops passing it. Android screenshot frames from Flutter now have the same shape as iOS 4.0 frames, which never sent style. The player doesn't read style for screenshots.

💚 How did you test it?

📝 Checklist

  • All commits are signed (see Commit signing)
  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

If releasing new changes

  • Ran pnpm changeset to generate a changeset file (no user-visible change; covered by the existing v6-posthog-android-4 changeset)

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Written with Claude Code (Opus 5.5) at the maintainer's request, as a follow-up to trimming the core replay classes in PostHog/posthog-android#908.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

posthog-flutter Compliance Report

Date: 2026-10-29 19:17:25 UTC
Duration: 96781ms

✅ All Tests Passed!

45/45 tests passed


Capture Tests

✅ 29/29 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields ✅ 138ms
Format Validation.Event Has Uuid ✅ 122ms
Format Validation.Event Has Lib Properties ✅ 117ms
Format Validation.Distinct Id Is String ✅ 115ms
Format Validation.Token Is Present ✅ 116ms
Format Validation.Custom Properties Preserved ✅ 117ms
Format Validation.Event Has Timestamp ✅ 117ms
Retry Behavior.Retries On 503 ✅ 5331ms
Retry Behavior.Does Not Retry On 400 ✅ 2119ms
Retry Behavior.Does Not Retry On 401 ✅ 2118ms
Retry Behavior.Respects Retry After Header ✅ 8126ms
Retry Behavior.Implements Backoff ✅ 15433ms
Retry Behavior.Retries On 500 ✅ 5227ms
Retry Behavior.Retries On 502 ✅ 5225ms
Retry Behavior.Retries On 504 ✅ 5226ms
Retry Behavior.Max Retries Respected ✅ 15446ms
Deduplication.Generates Unique Uuids ✅ 124ms
Deduplication.Preserves Uuid On Retry ✅ 5224ms
Deduplication.Preserves Uuid And Timestamp On Retry ✅ 10336ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry ✅ 5239ms
Deduplication.No Duplicate Events In Batch ✅ 123ms
Deduplication.Different Events Have Different Uuids ✅ 117ms
Compression.Sends Gzip When Enabled ✅ 117ms
Batch Format.Uses Proper Batch Structure ✅ 116ms
Batch Format.Flush With No Events Sends Nothing ✅ 108ms
Batch Format.Multiple Events Batched Together ✅ 126ms
Error Handling.Does Not Retry On 403 ✅ 2116ms
Error Handling.Does Not Retry On 413 ✅ 2117ms
Error Handling.Retries On 408 ✅ 5225ms

Feature_Flags Tests

✅ 16/16 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id ✅ 14ms
Request Payload.Flags Request Uses V2 Query Param ✅ 9ms
Request Payload.Flags Request Hits Flags Path Not Decide ✅ 10ms
Request Payload.Flags Request Omits Authorization Header ✅ 9ms
Request Payload.Token In Flags Body Matches Init ✅ 9ms
Request Payload.Groups Round Trip ✅ 9ms
Request Payload.Groups Default To Empty Object ✅ 9ms
Request Payload.Person Properties Distinct Id Auto Populated When Caller Omits It ✅ 9ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False ✅ 9ms
Request Payload.Disable Geoip Omitted Defaults To False ✅ 9ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key ✅ 9ms
Request Lifecycle.No Flags Request On Init Alone ✅ 4ms
Request Lifecycle.No Flags Request On Normal Capture ✅ 111ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests ✅ 17ms
Request Lifecycle.Mock Response Value Is Returned To Caller ✅ 10ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event ✅ 115ms

@turnipdabeets
turnipdabeets marked this pull request as ready for review October 29, 2026 15:17
@turnipdabeets
turnipdabeets requested a review from a team as a code owner October 29, 2026 15:17
Base automatically changed from chore/v6-adopt-posthog-android-4 to chore/v6-adopt-posthog-ios-4 October 29, 2026 16:01
@turnipdabeets
turnipdabeets force-pushed the chore/v6-adopt-posthog-ios-4 branch from fd88c7e to 7eebbca Compare October 29, 2026 19:10
posthog-android 4.0 drops RRStyle and the wireframe tree fields from the
internal RRWireframe; screenshot frames don't need a style.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@dustinbyrne dustinbyrne 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.

The Android screenshot constructor matches the trimmed native replay model, and omitting the empty style preserves player behavior. Native 4.x dependency availability and successful native builds/tests remain prerequisites for shipping.

AI-assisted review.

@turnipdabeets
turnipdabeets merged commit 284cdec into chore/v6-adopt-posthog-ios-4 Oct 29, 2026
20 of 25 checks passed
@turnipdabeets
turnipdabeets deleted the chore/v6-drop-rrstyle branch October 29, 2026 21:03
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