Skip to content

chore!: remove SessionRecordingConfig.screenshot - #109

Open
turnipdabeets wants to merge 1 commit into
chore/adopt-native-4.0from
chore/drop-replay-screenshot-option
Open

turnipdabeets wants to merge 1 commit into
chore/adopt-native-4.0from
chore/drop-replay-screenshot-option

Conversation

@turnipdabeets

Copy link
Copy Markdown
Collaborator

Important

Stacked on #108 and depends on PostHog/posthog-android#908. posthog-android 4.0 removes wireframe replay and PostHogSessionReplayConfig.screenshot, so #108 no longer compiles for Android without this. If PostHog/posthog-android#908 is dropped from 4.0, close this PR.

💡 Motivation and Context

posthog-ios 4.0 (PostHog/posthog-ios#907, PostHog/posthog-ios#973) and posthog-android 4.0 (PostHog/posthog-android#908) both drop wireframe session replay. Replay always records masked screenshots. #108 already stopped forwarding screenshot to iOS. Android's flag is now gone as well, so SessionRecordingConfig.screenshot doesn't do anything on any platform.

Changes:

  • Remove SessionRecordingConfig.screenshot and stop passing it to PostHogSessionReplayConfig on Android.
  • Remove the JVM constructor and copy overloads kept for the pre-verifyScreenshotMaskAlignment signature, along with their Java test (SessionRecordingConfigJavaTest). That signature included screenshot, so it can't be kept. Leaving a 7-argument overload next to the primary constructor would also make SessionRecordingConfig() ambiguous.
  • Drop "Only applies when [screenshot] is enabled" from the verifyScreenshotMaskAlignment KDoc.
  • Changeset: minor with a Breaking: entry, the same as chore!: adopt posthog-android 4.0, core 7.0 and posthog-ios 4.0 #108.

This removes the option rather than deprecating it, matching the native SDKs. An app that set screenshot = false to keep pixels out of recordings gets a compile error instead of silently uploading masked screenshots.

💚 How did you test it?

Built against posthog-android 4.0.0 / core 7.0.0 published from PostHog/posthog-android#908 to a local Maven repo, using an init script so the build files stay unchanged:

📝 Checklist

  • 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. (Breaking; changeset added.)

If releasing new changes

  • Ran pnpm changeset to generate a changeset file

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

  • Written with Claude Code (Opus 5.5) at the maintainer's request, as a follow-up to the Android wireframe removal.
  • Chose removal over a deprecated no-op to match posthog-ios/posthog-android 4.0. If we'd rather keep KMP source-compatible, a @Deprecated no-op is a small change.

🤖 Generated with Claude Code

posthog-android 4.0 and posthog-ios 4.0 always record masked screenshots,
so the flag no longer selects anything.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@turnipdabeets turnipdabeets self-assigned this Oct 29, 2026
@sampo-s-bot

sampo-s-bot Bot commented Oct 29, 2026

Copy link
Copy Markdown

⚠️ No changeset detected

No new .sampo/changesets/*.md files were detected in this PR. To add one:

  • run sampo add
  • follow the prompts to pick the affected packages and describe the change
  • commit the generated file to this pull request, and it will be detected automatically

If this PR isn't supposed to introduce any changes (e.g., documentation updates), you can ignore this message.

This branch has not been deployed

No deployments
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