fix(frontend): don't show paywall for credits-only orgs#1628
Conversation
📝 WalkthroughWalkthroughThe organization failure detection logic has been expanded to consider an additional flag ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|



Summary (AI generated)
currentOrganizationFailedcheck in the organization store to also considercan_use_moreflagsrc/stores/organization.ts— both places where the paywall state is computedMotivation (AI generated)
PR #1575 ("Allow credit usage without active plan") updated the backend so
get_orgs_v7()returnscan_use_more: truewhen an org has available credits, even without an active Stripe subscription. However, the frontend store still only checkspayingandtrial_leftto decide whether to show the "subscription required" blocking modal. This means credits-only orgs (like with 5 credits,paying: false,trial_left: 0,can_use_more: true) get blocked by the paywall despite having valid credits.Business Impact (AI generated)
Credits-only / pay-as-you-go users are completely locked out of the dashboard by the paywall modal, even though the backend correctly allows them. This blocks the new use case that #1575 was designed to enable — users who buy credits without subscribing to a plan. Fixing this unblocks revenue from credit-only customers.
Test Plan (AI generated)
2e08b725-30cf-4098-8a9e-fe48a1c07306) on localhost with production backendpaying: truestill work normally (no regression)trial_left > 0still work normally (no regression)paying: false, trial_left: 0, can_use_more: falsestill show the paywallGenerated with AI
Summary by CodeRabbit