Repository navigation
[backport core/1.51] fix(billing): let unsubscribed workspaces add credits on Local - #15830
dante01yoon wants to merge 5 commits into
Conversation
The Add credits entry points in the profile popover and the Credits settings tile were gated on canAccessSubscriptionFeatures, which is false for a workspace without an active subscription. On Local the subscribe CTA is also hidden, so such workspaces had no way to top up. Gate the buttons on the billing policy table instead: topUpAccess is 'allowed' for every Local state, and showTopUpCreditsDialog already enforces the same policy. The Cloud free-tier upsell keeps its previous behavior via showsSubscribeUpsellUI.
…upsell The Plan & Credits panel forced the never-subscribed team prompt and its zero-state tile on every distribution, so a never-subscribed team workspace on Local lost the Add credits button and gained a Cloud-only Subscribe CTA. Scope that prompt to Cloud, keeping the ended-team inactive treatment everywhere so billing, invoices, and reactivation stay reachable.
Click through to the top-up dialog instead of only asserting the button renders, so the never-subscribed local team path is covered behaviorally with the real CreditsTile.
The unsubscribed-local e2e coverage rides localAuthFixture, whose subscription fixture pins billing_rail to legacy_stripe — the rail whose Local exemption masks QA finding #11. Add a workspace-rail fixture and spec so the failing rail stays covered end to end, plus unit coverage for the unsubscribed Cloud owner and the unsubscribed local team tile.
browser_tests/README.md requires new specs to live in a folder mirroring the product surface rather than the flat tests/ root.
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 1825 passed, 0 failed · 3 flaky📊 Browser Reports
|
|
duplicated |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## core/1.51 #15830 +/- ##
==========================================
Coverage 81.67% 81.67%
==========================================
Files 1884 1884
Lines 107167 107172 +5
Branches 29329 29333 +4
==========================================
+ Hits 87525 87537 +12
+ Misses 19307 19291 -16
- Partials 335 344 +9
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 7 files with indirect coverage changes 🚀 New features to boost your workflow:
|
…15831) ## Summary Follow-up to Comfy-Org#15799 addressing huang47's review comment there: `browser_tests/README.md` requires new specs to live in a folder mirroring the product surface, so `localCreditsWorkspaceRail.spec.ts` moves from the flat `tests/` root into `tests/billing/`. ## Changes - **What**: Pure `git mv`, no content changes (imports use the `@e2e` alias). Could not land inside Comfy-Org#15799 because its branch was locked in the merge queue. The core/1.51 backport (Comfy-Org#15830) already includes this move.
## Summary Follow-up to #15799 addressing huang47's review comment there: `browser_tests/README.md` requires new specs to live in a folder mirroring the product surface, so `localCreditsWorkspaceRail.spec.ts` moves from the flat `tests/` root into `tests/billing/`. ## Changes - **What**: Pure `git mv`, no content changes (imports use the `@e2e` alias). Could not land inside #15799 because its branch was locked in the merge queue. The core/1.51 backport (#15830) already includes this move.
Summary
Backport of #15799 to
core/1.51. Resolves QA finding #11 from the 1.51 workspace-switcher test plan (sign-off blocker): a workspace without an active subscription had no way to add credits on Local.Changes
browser_tests/tests/billing/localCreditsWorkspaceRail.spec.ts, including the folder move requested in fix(billing): let unsubscribed workspaces add credits on Local #15799 review).Review Focus
CreditsTile.test.ts(adjacent test additions); all other commits applied clean on top of [backport core/1.51] fix(workspace): guard prompt billing context #15816.See #15799 for AS IS / TO BE screenshots and the full analysis.