Repository navigation
fix(app): share the in-flight subscription fetch so the after-sign-up trial paywall sees eligibility - #22493
Merged
Conversation
… trial paywall sees eligibility fetchSubscription returned early while AppShell's own fetch was still running, so the trial placement read a null subscription right after sign-in and stayed hidden. Concurrent callers now await the request in flight. Prod evidence: placement opens from real eligibility, Stripe Checkout shows 7 days free then $269.91/year, cancel and retry work, free-plan exit continues onboarding. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…h fix Failure-Class: none
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
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), soOnboardingWrapper._maybeShowSignupPaywallread 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)
trial_eligible(no injected state):amount_total: 0,client_reference_id= the test uid:stripe_customer_idset on the test account, then removed):/v1/users/me/subscriptionreturnstrial_eligible: falseandPOST /v1/payments/checkout-sessionwithtrial_days: 7is refused with HTTP 400.Failure-Class: none
🤖 Generated with Claude Code