Repository navigation
fix: Surveys 2.0 native fixes - #44
Merged
Merged
Conversation
…ion in start-survey Like the JavaScript SDK: a resume reminder continues the server's copy of the response and a Surveys 2.0 response records the outbound action that delivered it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ubmitted event The messenger saves v2 answers itself and reports completion as notify-event outbound-sent, which only flow-started was handled for. It now invokes the FeedbackSent and OutboundSent callbacks in the legacy shape (outboundId, outbound, formData, plus responseId/endingId) and tracks outbound-<id>-submitted. survey-* lifecycle, height-update and sheet-viewport are handled (content seen, full-screen layout) or accepted as no-ops. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rd dim, 30s load timeout Full screen: once a v2 survey shows, the page draws behind the status and navigation bars and gets the insets as safe-area-update (it pads its close button, question and bar); the bars no longer show the loader's header color over the pale survey page. Legacy fallback keeps the old layout. Card: the bands the container keeps clear of the system bars and the keyboard stayed at the loader dim (#66000000) while the page dim stacked on the rest (two tones). After the reveal the loader fades out and the bands get the page's own dim (rgba(0,0,0,0.25)), so the screen is dimmed evenly. Load timeout: 30s instead of 15s, and only when the page never pinged and never reported a height or a shown survey. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…esponse; announce surveyCallbacks A completed v2 survey fires FeedbackWillBeSent, FeedbackSent (the answers by key) and OutboundSent like a sent legacy survey; OutboundSent passes on everything the messenger reports (outbound, surveyId, responseId, endingId, status) next to outboundId and formData. A response is reported once per process, also when the page reports it again. config-update carries surveyCallbacks: true, so the messenger sends this SDK no legacy send-feedback after a completion (older SDKs get one, which the server acknowledges without storing anything, to fire the same callbacks). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 7, 2026
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.
Surveys 2.0: native Android fixes
Surveys 2.0 already render in released Android SDKs, because the survey UI is the Messenger-App web view. This PR fixes what only the native side can:
FeedbackWillBeSent,FeedbackSentandOutboundSentfire for 2.0 completions;No public API changes and no version bump; the synced SDK release comes later. No wrapper changes are needed, because Flutter, React Native and Capacitor keep forwarding the same callbacks.
Head at time of writing:
6d4fe2d(4 commits). Program overview, master rollout and risks: https://github.com/GleapSDK/Server/pull/2011. Pairs with https://github.com/GleapSDK/Messenger-App/pull/238 and GleapSDK/Gleap-iOS-SDK#48.Scope
OutboundSentCallback/FeedbackSentCallbackfire for v2 surveys.notify-eventoutbound-sent.GleapWidgetBridgeused to handle onlyflow-started.FeedbackWillBeSentCallback, thenFeedbackSentwith the answers, asHttpHelperdoes.OutboundSentgetsoutboundIdandformDataplus everything the messenger reports:outbound,surveyId,responseId,endingId,status: "completed".outbound-<id>-submitted, and reports a response once per process even if the page reports it again.config-updateannouncessurveyCallbacks: true.survey-shown,survey-legacyandheight-updatedrive items 3 and 6.survey-answered/-completed/-closed/-step-viewedandsheet-viewportare explicit no-ops.GleapEventServiceused to pass only flow and format.start-surveynow carriesresume,resumeData(=action.datawhen resuming) andoutboundAction(=action._id || action.id), like the JS SDK.ScreenshotTakerflags full surveys (IS_SURVEY_FULL). Onsurvey-shownwith formatfull, the window goes edge to edge: transparent bars, with icon appearance taken from the widget background's luminance.safe-area-update(CSS px; bottom 0 while the keyboard is up).survey-legacyand old messengers that never sendsurvey-shown.rgba(0,0,0,0.25), as inappnew.html).exitAfterFifteenSecondsclosed the widget after 15 s whenever the web view was still invisible. It now waits 30 s, and fires only when the page never pinged and never sentheight-updateorsurvey-shown.(Items 5 and 7 of the program are iOS-only, see Gleap-iOS-SDK#48.)
Old SDKs (7.0–19.1) without this PR: the messenger sends them one legacy
send-feedbackafter a v2 completion (Messenger-App795b738). The Server answers it with 201 and stores nothing (Servered8744886), so their FeedbackWillBeSent / FeedbackSent / OutboundSent and the submitted event fire too.Risk and safety
./gradlew build testbuilds successfully../gradlew :gleap:testDebugUnitTestruns 203 tests with 0 failures (checked again on 2026-10-07 at6d4fe2d, level withmaster, nothing to merge). No new tests (UI and callback changes, per the workspace testing rules).widgetOpened→feedbackFlowStarted→feedbackWillBeSent→feedbackSent→outboundSentonce, with no ticket created and one survey response each. Message shapes were checked against Messenger-App#238 (SurveyV2.finish,survey-showndata,CommunicationManagerstart-survey parsing,appnew.htmlforwarding, body dim andsafe-area-update).Rollout (this repo)
This PR is independent of the web rollout: released SDKs keep working through the Server ack. Release it with the next synced native SDK version (Android, iOS, then Flutter, React Native and Capacitor through the
sdk-releaseflow; the dashboard hardcodes the Android version intutorialContent.ts) after Server#2011 and Messenger-App#238 are live. Merge together with Gleap-iOS-SDK#48. Master checklist: https://github.com/GleapSDK/Server/pull/2011.Surveys 2.0 PRs
🤖 Generated with Claude Code