Skip to content

docs(flow-outcomes): troubleshoot skipped outcome actions, Test on device runs only success outcomes - #880

Merged
eandreeva-twr merged 3 commits into
ADP-8270from
docs/flow-purchase-outcomes
Nov 20, 2026
Merged

eandreeva-twr merged 3 commits into
ADP-8270from
docs/flow-purchase-outcomes

Conversation

@acrius

@acrius acrius commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Stacked on #822: merge after #822 and after the purchase and restore outcomes release.

What

Adds the behaviour of purchase and restore outcomes that #822 doesn't cover yet. It is checked against the builder and transformer code before release. #822 owns the setup; this PR adds only diagnosis and one preview limit, so it is stacked on that branch.

  • flow-common-issues: two new entries.
    • The flow doesn't run the actions set for a purchase result. Outcome actions run only while the user stays on the screen where the purchase started. The causes, each with a fix:

      • the app closes the flow in its purchase or restoration callback;
      • a navigation or Close Flow follows Purchase in the same trigger;
      • the user leaves the screen before the result;
      • the purchase is a Web Payment purchase, which has no outcomes;
      • on Android, the app sets no AdaptyFlowEventListener for the flow, or one of its callbacks throws.

      The entry also says that the Adapty mobile app preview runs only the success outcomes.

    • A Purchase button does nothing on Android. On Android, a tap before Google Play returns the products does nothing, and the button works once the products load. On iOS, the same early tap fails the purchase, so When failed runs. Includes a fix for a product that never loads.

  • paywall-device-compatibility-preview, Preview on devices: one paragraph. In the preview, every purchase and restoration succeeds, so only When succeeded and When restore completed run.
  • respond-to-purchase-outcomes: next to "make a sandbox purchase", the same preview limit and a link to the new troubleshooting entry. This links prevention in setup with diagnosis in troubleshooting, in both directions.
  • flow-logic zone brief:
    • the outcome facts with their sources (labels, Web Payment, nesting, the warning text verbatim, screen binding, observer mode, the Android product drop with its public SDK source);
    • a ripple rule listing every article that restates outcomes;
    • two Ticket language rows;
    • an open question about the preview.

Why

Two kinds of reports come up once the feature ships:

  • "The thank-you screen never shows after a purchase", usually because the app closes the flow in its own callback, or because a navigation sits after Purchase.
  • "The fail/cancel branch does nothing in Test on device", because the preview can't reach the stores.

Without these entries the reader has no place to diagnose either.

Verification

  • Against the code: builder labels (When succeeded, When restore completed, Navigate back, Restore purchases, In-App Store, Web Payment) and the Web Payment switch are taken from the builder source; SDK behaviour from the public SDK repos, cited in the brief.
  • Editor pass: the editor skill's review pass order over the added lines; lint-prose candidates on the added lines reviewed.
  • Checks: lint-mdx, check-mdx-parse and check-links-diff pass (no broken or stale links in or to the changed files); npm test passes, including the context-mill anonymity test.

Not covered

  • Needs confirmation before merge. The preview claim ("every purchase and restoration succeeds") rests on the iOS SDK developer tools (AdaptySDK-iOS 4.2.2, Sources.DeveloperTools/AdaptyUI/Dev_AdaptyUILogic.swift: purchase, restore and web purchase all answer success after 1.5 s). It is not verified against the Adapty mobile app itself, and not checked for its Android version. If either app behaves differently, narrow the three sentences. The brief records this as an open question.

  • Left out as edge cases:

    • a second tap while a purchase with outcomes waits for its result is ignored, for a bounded time;
    • a result that arrives during a screen transition runs when the next screen appears;
    • Purchase and Restore purchases are disabled inside an outcome. The UI shows this.
    • undo after switching to Web Payment restores the outcomes. The UI shows this.

    The brief records all four.

  • No screenshots. One would help in the troubleshooting entry: the warning under the actions ("Navigation or Close Flow after a purchase or restore runs right away, before the result…").

  • Shipped skills: no ripple. Only flow-common-issues is cited by a skill, and the change adds sections without restating a fact a skill copies.

  • Notes on post-purchase branching + updated funnels #822 found while checking it against the code (not changed here):

    • onboarding-actions: two lines say In-app store (the option bullet and the follow-up sentence), but the builder label is In-App Store. respond-to-purchase-outcomes already uses In-App Store.
    • flows-with-your-own-payments: "After a purchase restoration, the flow runs the When restore completed actions, whatever happened" is not confirmed from code here. See also the review note on onFinishRestore.
    • respond-to-purchase-outcomes, Before you start: the order "your app's callbacks run before them" is not verified per platform.

🤖 Generated with Claude Code

dbastrikin and others added 2 commits November 19, 2026 14:25
…ns only success outcomes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…omes facts, ripple and open preview question

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eandreeva-twr
eandreeva-twr marked this pull request as ready for review November 20, 2026 07:14
@eandreeva-twr
eandreeva-twr merged commit 73f229f into ADP-8270 Nov 20, 2026
eandreeva-twr added a commit that referenced this pull request Nov 20, 2026
* post-purchase branching

* review

* docs(flow-outcomes): troubleshoot skipped outcome actions, Test on device runs only success outcomes (#880)

* docs(flow-outcomes): troubleshoot skipped outcome actions, preview runs only success outcomes

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

* chore(context-mill): flow-logic brief — purchase and restoration outcomes facts, ripple and open preview question

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

* review

---------

Co-authored-by: dbastrikin <dbastrikin@adapty.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Eugene Titerman <eugene@titerman.com>

---------

Co-authored-by: acrius <acrius@mail.ru>
Co-authored-by: dbastrikin <dbastrikin@adapty.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: eandreeva-twr <eandreeva@adapty.io>
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.

3 participants