Repository navigation
chore(react-native-plugin): bump posthog-android to 3.74.2 - #5489
Conversation
Coherence📄 0 spec file errors · ⛔ 0 broken rules · 🚪 2 unchecked inputs · 🐛 0 bugs that came back What is Coherence?Coherence compares the code with its spec files ( This check read 44 parts of the code and 7 rules. Note These findings do not make this check fail. None of these findings are in files that this pull request changes. You do not need to fix them in this pull request. 🚪 Unchecked inputs (2)
What this means and how to fix itInput from outside this code comes in at these places. The spec does not say what checks that input. 10 more places were already like this when Coherence was added. This list does not show them. To close one of these, find the place by its name in the
To get the line to add, run |
turnipdabeets
left a comment
There was a problem hiding this comment.
[suggestion] If this carries PostHog/posthog-android#910, could we update the title and description to the new version, drop the #5483 paragraph, and rerun the plugin's Android tests against it? The 26 passes were against 3.74.0.
Carries the FLAG_SECURE and animating-view replay fixes from PostHog/posthog-android#910.
Problem
posthog-android 3.74.0 (PostHog/posthog-android#906) changes the session replay screenshot default.
sessionReplayConfig.screenshotScaleis nowFloat?,nullis the default and means one pixel per dp (about 1/9 of the pixels on a 3x screen), and an explicit value keeps its old meaning. Non-finite values reset tonull.posthog-android 3.74.2 (PostHog/posthog-android#910) also records
FLAG_SECUREwindows fully masked, drops their touches, and discards frames where an animating view would expose masked content.The plugin pins posthog-android at
3.72.9, so React Native apps get neither the smaller uploads nor the privacy fixes. Two plugin tests also assert the old1fdefault and fail against 3.74.0 and later.Changes
com.posthog:posthog-androidfrom3.72.9to3.74.2inpackages/react-native-plugin/android/build.gradle.screenshotScalewhen the JS config sets it, so RN apps that leave it unset pick up the 1x default automatically.screenshotScale: 1keeps native resolution.applyScreenshotConfiginpackages/react-native-plugin/android/src/main/java/com/posthogreactnativeplugin/PosthogReactNativePluginModule.ktused to map a non-finite scale to1f. It now skips the assignment so the native default applies, matching Android. This path isn't reachable fromposthog-react-native, which strips non-finite values before the bridge.nullas the default, and adds a1.0 to 1fcase so the documented opt-out is pinned.@defaultonscreenshotScaleinpackages/react-native/src/types.ts, which still said1.0.minorfor@posthog/react-native-plugin(the default replay resolution changes for apps that never set the option),patchforposthog-react-native(doc only).I ran the plugin's Android unit tests through
examples/example-rn-native-plugin/androidagainst the published 3.74.2 artifact (26 pass), pluspackages/react-native'ssession-replay-screenshot-config.spec.ts(19 pass).Release info Sub-libraries affected
Libraries affected
Checklist
If releasing new changes
pnpm changesetto generate a changeset file🤖 Agent context
DRI: @ioannisj
Autonomy: Human-driven (agent-assisted)