Skip to content

feat(surveys): pass skipButtonText from the native SDKs - #759

Draft
gantoine wants to merge 1 commit into
posthog/survey-skip-buttonfrom
posthog/survey-skip-button-bridge
Draft

gantoine wants to merge 1 commit into
posthog/survey-skip-buttonfrom
posthog/survey-skip-button-bridge

Conversation

@gantoine

@gantoine gantoine commented Dec 2, 2026

Copy link
Copy Markdown
Member

💡 Motivation and Context

Follow-up to #758, stacked on it. Closes the remaining part of #757.

#758 added skipButtonText on the Dart side, but the native bridge doesn't send it yet, so Flutter always shows "Skip". This PR sends it:

  • PostHogDisplaySurveyExt.kt and PostHogDisplaySurvey+Dict.swift put skipButtonText from PostHogDisplaySurveyAppearance into the appearance map. Custom and translated Skip labels set in PostHog now reach Flutter.
  • The minimum native SDKs go up to the first releases that have the field: posthog-ios 4.3.0 (Package.swift) and posthog-android 4.2.4 (build.gradle, which pulls in core 7.3.0).

Blocked on the native releases. PostHog/posthog-ios#1146 and PostHog/posthog-android#1030 aren't merged or released, so the native builds in CI will fail to resolve or compile until they are. Before merging:

💚 How did you test it?

Not yet. The native SDK versions this needs don't exist, so it can't be built. CI will be red on the native builds until they're released.

📝 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

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Written with Claude Code. A four-line mapping plus version pins. The version numbers are predicted from the native PRs' changesets (iOS minor from 4.2.5, posthog-android patch from 4.2.3), not from actual releases.

🤖 Generated with Claude Code

Maps skipButtonText from PostHogDisplaySurveyAppearance on iOS and Android into the survey sent to Dart, and raises the minimum native SDKs to posthog-ios 4.3.0 and posthog-android 4.2.4, the first releases with the field.

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

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

posthog-flutter Compliance Report

Date: 2026-12-02T18:22:44.263483+00:00
Duration: 369350ms

✅ All Tests Passed!

232/232 tests passed


Capture_V1 Tests

✅ 105/105 tests passed

View Details
Test Status Duration
Endpoint And Method.Targets V1 Endpoint ✅ 192ms
Endpoint And Method.Does Not Use Legacy Endpoints ✅ 122ms
Required Headers.Has Authorization Bearer Header ✅ 116ms
Required Headers.Has Content Type Json ✅ 119ms
Required Headers.Has Posthog Sdk Info Format ✅ 115ms
Required Headers.Has Posthog Attempt Header ✅ 114ms
Required Headers.Has Posthog Request Id ✅ 114ms
Required Headers.Has Posthog Request Timestamp ✅ 115ms
Required Headers.Has User Agent ✅ 116ms
Body Format.Body Has Created At And Batch ✅ 116ms
Body Format.No Api Key In Body ✅ 115ms
Body Format.No Sent At In Body ✅ 114ms
Event Format.Event Has Required Root Fields ✅ 113ms
Event Format.Event Uuid Is Valid ✅ 114ms
Event Format.Event Timestamp Is Rfc3339 ✅ 114ms
Event Format.Non Utc Event Timestamp Is Converted To Utc ✅ 114ms
Event Format.Distinct Id Is String ✅ 115ms
Event Format.Distinct Id At Root Not Properties ✅ 113ms
Event Format.Custom Properties Preserved ✅ 114ms
Event Format.Set Properties Preserved ✅ 116ms
Event Format.Set Once Properties Preserved ✅ 113ms
Event Format.Groups Properties Preserved ✅ 113ms
Event Format.Sdk Generates Uuid If Not Provided ✅ 113ms
Event Format.Event Has Required Root Fields Batch ✅ 117ms
Event Format.Event Uuid Is Valid Batch ✅ 118ms
Event Format.Event Timestamp Is Rfc3339 Batch ✅ 118ms
Event Format.Distinct Id Is String Batch ✅ 118ms
Event Format.Distinct Id At Root Not Properties Batch ✅ 118ms
Event Format.Custom Properties Preserved Batch ✅ 118ms
Event Format.Set Properties Preserved Batch ✅ 121ms
Event Format.Set Once Properties Preserved Batch ✅ 117ms
Event Format.Groups Properties Preserved Batch ✅ 117ms
Event Format.Sdk Generates Uuid If Not Provided Batch ✅ 117ms
Batch Behavior.Multiple Events In Single Batch ✅ 122ms
Batch Behavior.Batch Envelope Smoke ✅ 120ms
Batch Behavior.Flush With No Events Sends Nothing ✅ 107ms
Batch Behavior.Flush At Triggers Batch ✅ 1012ms
Batch Behavior.Created At Reflects Batch Creation Time ✅ 118ms
Deduplication.Generates Unique Uuids ✅ 124ms
Deduplication.Different Events Same Content Different Uuids ✅ 123ms
Deduplication.Preserves Uuid On Retry ✅ 5121ms
Deduplication.Preserves Timestamp On Retry ✅ 5123ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry ✅ 5128ms
Deduplication.No Duplicate Events In Batch ✅ 128ms
Header Behavior On Retry.Attempt Header Starts At One ✅ 113ms
Header Behavior On Retry.Attempt Header Increments On Retry ✅ 10123ms
Header Behavior On Retry.Request Id Preserved On Retry ✅ 5124ms
Header Behavior On Retry.Different Requests Have Different Request Ids ✅ 2231ms
Header Behavior On Retry.Request Timestamp Changes On Retry ✅ 5124ms
Response Format Validation.Success Response Has Uuid Keyed Results ✅ 117ms
Response Format Validation.Success Response Has Ok For Each Event ✅ 122ms
Response Format Validation.Success No Retry After When All Ok ✅ 116ms
Response Format Validation.Success Retry After Present When Retry Events ✅ 116ms
Response Format Validation.Success No Retry After When Drop Only ✅ 116ms
Response Format Validation.Response Echoes Request Id ✅ 113ms
Retry Behavior.Retries On 408 ✅ 5120ms
Retry Behavior.Retries On 500 ✅ 5122ms
Retry Behavior.Retries On 503 ✅ 5123ms
Retry Behavior.Retries On 504 ✅ 5120ms
Retry Behavior.Retries On 404 ✅ 5124ms
Retry Behavior.Retries On 429 ✅ 5122ms
Retry Behavior.Retries On 502 ✅ 5123ms
Retry Behavior.Retryable Errors Have Retry After ✅ 2120ms
Retry Behavior.Respects Retry After On Retryable Error ✅ 8123ms
Retry Behavior.Does Not Retry On 400 ✅ 2121ms
Retry Behavior.Does Not Retry On 401 ✅ 2120ms
Retry Behavior.Does Not Retry On 402 ✅ 2120ms
Retry Behavior.Does Not Retry On 413 ✅ 2122ms
Retry Behavior.Does Not Retry On 415 ✅ 2121ms
Retry Behavior.Non Retryable Errors Have No Retry After ✅ 2120ms
Retry Behavior.Implements Backoff ✅ 12124ms
Partial Batch Handling.Handles 200 Full Success ✅ 2119ms
Partial Batch Handling.Handles 200 With All Ok ✅ 3124ms
Partial Batch Handling.Does Not Retry Dropped Events ✅ 3123ms
Partial Batch Handling.Does Not Retry Warning Events ✅ 3123ms
Partial Batch Handling.Prunes Ok Events On Partial Retry ✅ 5125ms
Partial Batch Handling.Prunes Dropped Events On Partial Retry ✅ 5125ms
Partial Batch Handling.Retries Only Retry Events From Partial ✅ 5127ms
Partial Batch Handling.Partial Retry Preserves Uuids ✅ 5124ms
Partial Batch Handling.Partial Retry Attempt Header Increments ✅ 5121ms
Partial Batch Handling.Partial Retry Request Id Preserved ✅ 5122ms
Partial Batch Handling.Respects Retry After On Partial ✅ 5126ms
Partial Batch Handling.Unknown Result Treated As Terminal ✅ 3120ms
Partial Batch Handling.Mixed Ok Drop Warning No Retry ✅ 3128ms
Compression.Sends Gzip Content Encoding ✅ 120ms
Compression.No Content Encoding When Disabled ✅ 116ms
Compression.Compressed Body Is Decompressible ✅ 117ms
Error Handling.Does Not Retry On Unknown 4Xx ✅ 2119ms
Event Options.Cookieless Mode Override ✅ 116ms
Event Options.Disable Skew Correction Override ✅ 114ms
Event Options.Process Person Profile Override ✅ 115ms
Event Options.Product Tour Id Override ✅ 118ms
Event Options.Unset Options Omitted ✅ 116ms
Event Options.Options Override In Batch ✅ 119ms
Event Options.Unknown Option Passes Through ✅ 116ms
Event Options.Option Value Is Not Converted ✅ 115ms
Event Options.Lenient Bool Option Values Are Not Converted ✅ 116ms
Event Options.Option Wins Over Legacy Property ✅ 114ms
Event Options.Legacy Property Fills Unset Option ✅ 115ms
Event Options.Null Option Falls Back To Legacy Property ✅ 114ms
Property Layers.Caller Property Beats Registered Property ✅ 114ms
Property Layers.Before Send Runs Last ✅ 117ms
Fail Open.Empty Api Key Sends Nothing ✅ 1112ms
Fail Open.Personal Api Key Sends Nothing ✅ 1112ms
Geoip And Historical Migration.Historical Migration Absent By Default ✅ 117ms

Capture_Ai_V1 Tests

✅ 110/110 tests passed

View Details
Test Status Duration
Endpoint And Method.Targets V1 Endpoint ✅ 120ms
Endpoint And Method.Does Not Use Legacy Endpoints ✅ 114ms
Endpoint And Method.Capture Does Not Reroute Ai Named Events ✅ 114ms
Endpoint And Method.Capture Ai Does Not Reroute Non Ai Events ✅ 115ms
Lane Isolation.Failing Ai Lane Does Not Delay Analytics ✅ 5128ms
Required Headers.Has Authorization Bearer Header ✅ 117ms
Required Headers.Has Content Type Json ✅ 117ms
Required Headers.Has Posthog Sdk Info Format ✅ 115ms
Required Headers.Has Posthog Attempt Header ✅ 114ms
Required Headers.Has Posthog Request Id ✅ 117ms
Required Headers.Has Posthog Request Timestamp ✅ 116ms
Required Headers.Has User Agent ✅ 115ms
Body Format.Body Has Created At And Batch ✅ 115ms
Body Format.No Api Key In Body ✅ 114ms
Body Format.No Sent At In Body ✅ 116ms
Event Format.Event Has Required Root Fields ✅ 115ms
Event Format.Event Uuid Is Valid ✅ 116ms
Event Format.Event Timestamp Is Rfc3339 ✅ 113ms
Event Format.Non Utc Event Timestamp Is Converted To Utc ✅ 113ms
Event Format.Distinct Id Is String ✅ 114ms
Event Format.Distinct Id At Root Not Properties ✅ 114ms
Event Format.Custom Properties Preserved ✅ 113ms
Event Format.Set Properties Preserved ✅ 113ms
Event Format.Set Once Properties Preserved ✅ 112ms
Event Format.Groups Properties Preserved ✅ 112ms
Event Format.Sdk Generates Uuid If Not Provided ✅ 112ms
Event Format.Event Has Required Root Fields Batch ✅ 115ms
Event Format.Event Uuid Is Valid Batch ✅ 115ms
Event Format.Event Timestamp Is Rfc3339 Batch ✅ 115ms
Event Format.Distinct Id Is String Batch ✅ 115ms
Event Format.Distinct Id At Root Not Properties Batch ✅ 115ms
Event Format.Custom Properties Preserved Batch ✅ 116ms
Event Format.Set Properties Preserved Batch ✅ 115ms
Event Format.Set Once Properties Preserved Batch ✅ 115ms
Event Format.Groups Properties Preserved Batch ✅ 115ms
Event Format.Sdk Generates Uuid If Not Provided Batch ✅ 116ms
Batch Behavior.Multiple Events In Single Batch ✅ 120ms
Batch Behavior.Batch Envelope Smoke ✅ 116ms
Batch Behavior.Flush At Triggers Batch ✅ 1011ms
Batch Behavior.Created At Reflects Batch Creation Time ✅ 116ms
Deduplication.Generates Unique Uuids ✅ 121ms
Deduplication.Different Events Same Content Different Uuids ✅ 114ms
Deduplication.Preserves Uuid On Retry ✅ 5117ms
Deduplication.Preserves Timestamp On Retry ✅ 5118ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry ✅ 5125ms
Deduplication.No Duplicate Events In Batch ✅ 124ms
Header Behavior On Retry.Attempt Header Starts At One ✅ 113ms
Header Behavior On Retry.Attempt Header Increments On Retry ✅ 10115ms
Header Behavior On Retry.Request Id Preserved On Retry ✅ 5119ms
Header Behavior On Retry.Different Requests Have Different Request Ids ✅ 2230ms
Header Behavior On Retry.Request Timestamp Changes On Retry ✅ 5122ms
Response Format Validation.Success Response Has Uuid Keyed Results ✅ 117ms
Response Format Validation.Success Response Has Ok For Each Event ✅ 119ms
Response Format Validation.Success No Retry After When All Ok ✅ 115ms
Response Format Validation.Success Retry After Present When Retry Events ✅ 117ms
Response Format Validation.Success No Retry After When Drop Only ✅ 116ms
Response Format Validation.Response Echoes Request Id ✅ 115ms
Retry Behavior.Retries On 408 ✅ 5118ms
Retry Behavior.Retries On 500 ✅ 5117ms
Retry Behavior.Retries On 503 ✅ 5121ms
Retry Behavior.Retries On 504 ✅ 5122ms
Retry Behavior.Retries On 404 ✅ 5122ms
Retry Behavior.Retries On 429 ✅ 5122ms
Retry Behavior.Retries On 502 ✅ 5121ms
Retry Behavior.Retryable Errors Have Retry After ✅ 2118ms
Retry Behavior.Respects Retry After On Retryable Error ✅ 8125ms
Retry Behavior.Does Not Retry On 400 ✅ 2119ms
Retry Behavior.Does Not Retry On 401 ✅ 2119ms
Retry Behavior.Does Not Retry On 402 ✅ 2119ms
Retry Behavior.Does Not Retry On 413 ✅ 2119ms
Retry Behavior.Does Not Retry On 415 ✅ 2119ms
Retry Behavior.Non Retryable Errors Have No Retry After ✅ 2118ms
Retry Behavior.Implements Backoff ✅ 12132ms
Partial Batch Handling.Handles 200 Full Success ✅ 2117ms
Partial Batch Handling.Handles 200 With All Ok ✅ 3124ms
Partial Batch Handling.Does Not Retry Dropped Events ✅ 3122ms
Partial Batch Handling.Does Not Retry Warning Events ✅ 3122ms
Partial Batch Handling.Prunes Ok Events On Partial Retry ✅ 5124ms
Partial Batch Handling.Prunes Dropped Events On Partial Retry ✅ 5124ms
Partial Batch Handling.Retries Only Retry Events From Partial ✅ 5126ms
Partial Batch Handling.Partial Retry Preserves Uuids ✅ 5119ms
Partial Batch Handling.Partial Retry Attempt Header Increments ✅ 5125ms
Partial Batch Handling.Partial Retry Request Id Preserved ✅ 5125ms
Partial Batch Handling.Respects Retry After On Partial ✅ 5126ms
Partial Batch Handling.Unknown Result Treated As Terminal ✅ 3121ms
Partial Batch Handling.Mixed Ok Drop Warning No Retry ✅ 3128ms
Compression.Sends Gzip Content Encoding ✅ 115ms
Compression.No Content Encoding When Disabled ✅ 112ms
Compression.Compressed Body Is Decompressible ✅ 112ms
Error Handling.Does Not Retry On Unknown 4Xx ✅ 2114ms
Event Options.Cookieless Mode Override ✅ 114ms
Event Options.Disable Skew Correction Override ✅ 112ms
Event Options.Process Person Profile Override ✅ 112ms
Event Options.Product Tour Id Override ✅ 111ms
Event Options.Unset Options Omitted ✅ 112ms
Event Options.Options Override In Batch ✅ 115ms
Event Options.Unknown Option Passes Through ✅ 111ms
Event Options.Option Value Is Not Converted ✅ 112ms
Event Options.Lenient Bool Option Values Are Not Converted ✅ 111ms
Event Options.Option Wins Over Legacy Property ✅ 111ms
Event Options.Legacy Property Fills Unset Option ✅ 111ms
Event Options.Null Option Falls Back To Legacy Property ✅ 111ms
Event Size.Event Over Ceiling Is Not Sent ✅ 3847ms
Event Size.Over Ceiling Drop Is Reported Or Logged Without Content ✅ 2173ms
Event Size.Batches Close Before Byte Target ✅ 5873ms
Geoip And Historical Migration.Historical Migration Absent By Default ✅ 117ms
Property Layers.Caller Property Beats Registered Property ✅ 112ms
Property Layers.Before Send Runs Last ✅ 111ms
Fail Open.Empty Api Key Sends Nothing ✅ 1109ms
Fail Open.Personal Api Key Sends Nothing ✅ 1110ms

Feature_Flags Tests

✅ 17/17 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id ✅ 20ms
Request Payload.Flags Request Uses V2 Query Param ✅ 12ms
Request Payload.Flags Request Hits Flags Path Not Decide ✅ 10ms
Request Payload.Flags Request Omits Authorization Header ✅ 10ms
Request Payload.Token In Flags Body Matches Init ✅ 9ms
Request Payload.Groups Round Trip ✅ 11ms
Request Payload.Groups Default To Empty Object ✅ 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 ✅ 6ms
Request Lifecycle.No Flags Request On Normal Capture ✅ 111ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests ✅ 14ms
Request Lifecycle.Mock Response Value Is Returned To Caller ✅ 10ms
Retry Behavior.Retries Flags On 502 ✅ 315ms
Retry Behavior.Retries Flags On 504 ✅ 315ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event ✅ 116ms

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