Repository navigation
chore!: adopt posthog-android 4.0 - #663
Merged
turnipdabeets merged 2 commits intoOct 29, 2026
Merged
turnipdabeets merged 2 commits into
turnipdabeets merged 2 commits into
Conversation
6 tasks done
Contributor
posthog-flutter Compliance ReportDate: 2026-10-28 14:59:27 UTC ✅ All Tests Passed!45/45 tests passed Capture Tests✅ 29/29 tests passed View Details
Feature_Flags Tests✅ 16/16 tests passed View Details
|
turnipdabeets
marked this pull request as ready for review
October 23, 2026 17:05
turnipdabeets
force-pushed
the
chore/v6-adopt-posthog-ios-4
branch
from
October 26, 2026 18:36
c322313 to
852c2c9
Compare
turnipdabeets
force-pushed
the
chore/v6-adopt-posthog-android-4
branch
from
October 26, 2026 18:37
2aa9ae4 to
da3dedd
Compare
5 of 6 tasks
dustinbyrne
approved these changes
Oct 26, 2026
eli-r-ph
reviewed
Oct 26, 2026
#664) * chore!: pass the loaded flags to onFeatureFlags and reloadFeatureFlags onFeatureFlags and reloadFeatureFlags now carry a PostHogFeatureFlagsLoaded with the enabled flags, their values and whether loading failed, matching posthog-ios 4.0 and posthog-android 4.0. On web, reloadFeatureFlags completes right away with the flags loaded so far, because posthog-js doesn't report when a reload finishes. * fix: complete the web reloadFeatureFlags with the reloaded flags Wait for the next posthog-js onFeatureFlags call instead of returning the flags already loaded, so a failed reload reports errorsLoading. Complete right away when flags are disabled, and after twice the flags request timeout when posthog-js skips the request without calling back. * chore: use PostHogFeatureFlagsCallback from posthog-android 4.0 * chore: fix ktlint function-signature * fix: await posthog-js reloadFeatureFlagsAsync on web The next onFeatureFlags callback can carry a response from a request already in flight, so reloadFeatureFlags() could complete with flags from before the reload. posthog-js 1.438.2+ settles reloadFeatureFlagsAsync() after this reload's own request; use it when present and keep the callback path for older posthog-js. * docs: pass the loaded flags in the setup example * docs: drop best-effort web note from the person and group property methods * fix(web): wait for posthog-js flags retries before reporting a reload failure posthog-js retries a timed-out /flags request once by default, 500 ms later, inside the same reload. The older-JS deadline of twice the request timeout reported cached flags with errorsLoading set before a successful retry landed. * docs: note where onFeatureFlags and errorsLoading differ on Android and web * docs: describe the older posthog-js reload timeout as the full retry budget Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
turnipdabeets
merged commit Oct 29, 2026
eee027e
into
chore/v6-adopt-posthog-ios-4
20 of 25 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💡 Motivation and Context
posthog_flutter 6.0 adopts posthog-android 4.0 (PostHog/posthog-android#871), so the 6.0 Flutter callbacks can carry the same flag data on Android as on iOS (see the stacked PR that passes the loaded flags to
onFeatureFlagsandreloadFeatureFlags).The Flutter Android plugin calls none of the APIs posthog-android 4.0 removes (
apiKey,propertiesSanitizer,evaluationEnvironments,getFeatureFlagPayload,debouncerDelayMs,remoteConfig) and none of the internal classes PostHog/posthog-android#872 makes non-public, so this is only the dependency range:[3.71.0,4.0.0)→[4.0.0,5.0.0).Merge order: like #649 for posthog-ios, this can't go green until posthog-android 4.0 is published. Merge it into #649's branch after that.
💚 How did you test it?
publishToMavenLocalof the 4.0 branch before marking this ready.📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Claude Code (Claude Opus 5.5) checked the plugin's posthog-android usage against the 4.0 removals and the API narrowing in PostHog/posthog-android#872. Part of the feature flag parity work for the iOS, Android and Flutter majors.
🤖 Generated with Claude Code