Repository navigation
feat(app): Omi Pro free-trial paywall right after sign-up as the trial arm of the paywall experiment - #22237
Merged
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
… the paywall experiment A native free-trial paywall (feature carousel, dated timeline, month/year, Start for $0.00) shown once after sign-up and consent for readers in the new trial arm of paywall-variant. Checkout is the shared Stripe Checkout path with trial_days: 7; the backend honors it only for a first-time subscriber. Older clients send no trial_days and behave as before. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…nes never overflow Co-Authored-By: Claude Fable 5.1 <[email protected]>
…App Store Connect accepts the build Since #21488 every TestFlight upload fails with ITMS-90057: OnDeviceParakeet.framework's generated Info.plist has no CFBundleShortVersionString because the framework target set no MARKETING_VERSION. Co-Authored-By: Claude Fable 5.1 <[email protected]> (cherry picked from commit a8426b6)
kodjima33
force-pushed
the
kodjima33/trial-paywall
branch
from
October 18, 2026 22:16
eba5565 to
78289c6
Compare
…jection for trial eligibility One user-document read per request, deduplicated with the subscription/BYOK read when request_read_dedupe is on; eligibility fails closed if the lookup errors. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…slide layout Co-Authored-By: Claude Fable 5.1 <[email protected]>
…reminder is actually delivered Nothing handles customer.subscription.trial_will_end yet, so the timeline must not promise one. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
…tions after dismissal Restore and dismissal are no-ops while a checkout (or restore) is in flight, and a checkout that settles after the page was dismissed never pops again. Navigation regression tests added. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…l pops A trial checkout now confirms the free trial started instead of "you've been charged"; a page popped from outside is marked dismissed immediately so a checkout settling during the exit animation never pops the host route. Regression test added. Co-Authored-By: Claude Fable 5.1 <[email protected]>
kodjima33
added a commit
that referenced
this pull request
Oct 21, 2026
… trial paywall sees eligibility (#22493) ## Summary Follow-up to #22237, found by exercising the real path on prod: `UsageProvider.fetchSubscription()` returned immediately when a fetch was already in flight (AppShell starts one on mount), so `OnboardingWrapper._maybeShowSignupPaywall` read a null subscription right after sign-in and the trial placement never opened. Concurrent callers now share and await the in-flight request. ## Testing (prod, api.omi.me, test account [email protected] / basic plan, no Stripe customer) - Sign in → hot restart → the trial paywall opens from the real `trial_eligible` (no injected state):  - "Start for $0.00" → live Stripe Checkout: **7 days free, then $269.91 per year starting Oct 26, 2026**; Stripe session `amount_total: 0`, `client_reference_id` = the test uid:  - Back from Checkout keeps the paywall; tapping again opens a fresh $0 session (retry works); "Continue with the free plan" lands on the Name step. - Former-subscriber state (a `stripe_customer_id` set on the test account, then removed): `/v1/users/me/subscription` returns `trial_eligible: false` and `POST /v1/payments/checkout-session` with `trial_days: 7` is refused with HTTP 400. - Widget tests: paywall router, navigation, layout, checkout hand-off, cancel-pending suites all pass (33). Failure-Class: none 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/22493?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="View guided diff" src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a> <a href="https://www.cubic.dev/action/auto-fix/pr/BasedHardware/omi/22493?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F22493&source=description" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img alt="Turn on auto-fix" src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
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.
Summary
New
trialarm of the mobile paywall experiment (paywall-variant, PostHog 957521): a native free-trial paywall shown once right after sign-up and consent, before the first onboarding step.TrialPaywallPage: feature carousel (5 cards), dated timeline (today / +7 days free / charge on day 7; no reminder row, since nothing delivers one yet), the Unlimited feature list, month/year cards, "Start for $0.00", "Continue with the free plan". Light canvas on purpose: it sits between the light onboarding steps. Prices come from the catalog.Checkout is the shared Stripe Checkout path (
PaywallCheckout.start), now withtrialDays: 7.Backend:
POST /v1/payments/checkout-sessionacceptstrial_days(1–30) and passessubscription_data.trial_period_daysto Stripe. A reader who already has a Stripe customer (a former subscriber back on the free plan) is refused with 400trial_unavailablerather than charged at once.GET /v1/users/me/subscriptionreportstrial_eligible(free plan and no Stripe customer) so the client never shows the trial copy to someone who cannot get it. Older clients send notrial_daysand behave exactly as before.Eligibility gate in the app:
PaywallRouteronly opens the trial page whensubscription.trialEligibleis true (otherwise the opener keeps the shipped sheet, exposure still recorded for the arm); the after-sign-up placement awaits the subscription first; the page refuses to start a checkout when not eligible.Placement:
OnboardingWrapper._enterStepsshows the page once for thetrialarm withonboarding_paywall: true; the end-of-onboarding placement skips that arm.Analytics:
Paywall Variant Shown.variantgainstrial(registry regenerated).PostHog: variant
trialadded at 0% with payload{"onboarding_paywall": true}; the two existing Nik-only targeting groups now resolve totrial. Everyone else stays on control.31 l10n keys (
paywallTrial*) with translations for every locale. The plan is named Omi Pro on this screen (backend tier id staysunlimited); renaming the plan everywhere else in the app is a follow-up.Slide art is designed at 280pt and scaled down to the card (
FittedBox), so 320/360pt phones and three-line captions never overflow;trial_paywall_page_test.dartpumps every slide at 320, 360 and 430pt and asserts no overflow, plus the plan cards and yearly saving.Carries the one-line OnDeviceParakeet
MARKETING_VERSIONfix from fix(ios): give the OnDeviceParakeet framework a MARKETING_VERSION so TestFlight uploads succeed again #22239 so the branch build can reach TestFlight; it merges cleanly once fix(ios): give the OnDeviceParakeet framework a MARKETING_VERSION so TestFlight uploads succeed again #22239 lands.The page runs one operation at a time (Restore/dismiss are no-ops during an in-flight checkout; completions after a dismissal or an external pop never navigate), and a trial checkout confirms "Your 7-day free trial of Omi Pro has started" instead of the paid-checkout "charged" toast. Navigation regressions in
trial_paywall_navigation_test.dart.Testing
flutter analyze,flutter test test/unit/paywall_experiment_test.dart test/widgets/paywall_router_test.dart.--dart-define=OMI_PAYWALL_VARIANT=trial --dart-define=OMI_ONBOARDING_RERUN=1, signed in as [email protected] (plan basic): the page opens right after consent, swipe through the carousel, month/year toggle, "Continue with the free plan" returns to the Name step. Screenshots (iPhone 16 Pro simulator):test_payment_checkout_trial.py: first-time subscriber getstrial_period_days: 7; former subscriber gets 400trial_unavailable; notrial_dayskeeps the old checkout.TrialPaywallPage; former subscriber keeps the sheet. Both also exercised at runtime on the simulator through the VM service (eligibility toggled on the provider,PaywallRouter.openVariant→ page / no page).Line-Count-Exception: backend/routers/payment.py | 1784 -> 1793 | optional trial_days on the checkout request plus the first-time-subscriber refusal; splitting the router is out of scope here
Line-Count-Exception: backend/database/users.py | 2494 -> 2497 | get_stripe_customer_id reads through the shared request-scoped user projection
Line-Count-Exception: backend/routers/users.py | 2670 -> 2679 | trial_eligible computed next to the other subscription-response flags, failing closed on a lookup error
Failure-Class: none
Not in this PR
metadata.uid, so a subscriber paid without the backend unlocking them. Our existing Stripe Checkout path already avoids the App Store fee.trialsplit goes above 0%, otherwise the screen promises a trial the checkout does not give.🤖 Generated with Claude Code