Repository navigation
fix(billing): hide monthly credit bar on Local - #15752
Conversation
Amp-Thread-ID: https://ampcode.com/threads/T-01a0298b-4578-722e-9b96-cc20526b5dcb Co-authored-by: Amp <amp@ampcode.com>
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 1975 passed, 0 failed · 5 flaky📊 Browser Reports
📦 Bundle: 9.11 MB gzip 🟢 -110 BDetailsSummary
Category Glance App Entry Points — 3.71 kB (baseline 3.71 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.38 MB (baseline 1.38 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 2 added / 2 removed / 1 unchanged Views & Navigation — 124 kB (baseline 124 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 13 added / 13 removed / 4 unchanged Panels & Settings — 591 kB (baseline 591 kB) • 🟢 -91 BConfiguration panels, inspectors, and settings screens
Status: 11 added / 11 removed / 16 unchanged User & Accounts — 27.5 kB (baseline 27.5 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 6 added / 6 removed / 5 unchanged Editors & Dialogs — 125 kB (baseline 125 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 7 added / 7 removed / 1 unchanged UI Components — 67.1 kB (baseline 67.1 kB) • ⚪ 0 BReusable component library chunks
Status: 6 added / 6 removed / 8 unchanged Data & Services — 3.53 MB (baseline 3.53 MB) • ⚪ 0 BStores, services, APIs, and repositories
Status: 14 added / 14 removed / 3 unchanged Utilities & Hooks — 549 kB (baseline 549 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 18 added / 18 removed / 19 unchanged Vendor & Third-Party — 18.1 MB (baseline 18.1 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 18 unchanged Other — 14.1 MB (baseline 14.1 MB) • ⚪ 0 BBundles that do not match a named category
Status: 66 added / 66 removed / 219 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe credits tile now shows the monthly usage bar only for cloud distributions. A test verifies that Local distributions hide the bar and monthly label while retaining additional-credit information. ChangesCredits display
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized billing presentation change hides the monthly usage bar on Local while preserving existing balances, with focused regression coverage; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 inconclusive)
✅ Passed checks (6 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #15752 +/- ##
==========================================
+ Coverage 79.39% 81.87% +2.48%
==========================================
Files 2217 1888 -329
Lines 112188 107288 -4900
Branches 35091 33929 -1162
==========================================
- Hits 89069 87846 -1223
+ Misses 22640 19107 -3533
+ Partials 479 335 -144
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 364 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
@dante01yoon Successfully backported to #15768 |
|
@dante01yoon Successfully backported to #15769 |
…5770) ## Summary Add Local E2E coverage that prevents the Cloud-only monthly credit progress bar from returning after Comfy-Org#15752. ## Changes - **What**: Mock an active Pro subscription with non-zero monthly and additional balances, refresh the Local credits tile, and verify Total credits, Additional credits, and Add credits remain visible while Monthly and the progress bar are absent. ## Review Focus The fixture intentionally satisfies every pre-fix `showBar` condition. The test fails against the previous implementation (`Monthly` count is 1) and passes with Comfy-Org#15752. ## Screenshots (if applicable) Not applicable; test-only change with no UI change. --------- Co-authored-by: Amp <amp@ampcode.com>
Summary
Restores the production Local credits presentation by keeping the monthly usage bar Cloud-only. This fixes QA finding #9 from the Local/Desktop billing workspace switcher review.
Root cause
#15164 moved Local from legacy billing state to workspace billing after workspace initialization.
CreditsTilederived the monthly bar only from subscription access and credit-pool data, so the richer workspace response exposed a Cloud subscription breakdown that production Local did not show.Changes
Review Focus
Confirm the display boundary only: Local keeps workspace-scoped balances from FE-1584 without adopting Cloud's monthly subscription progress UI.
Validation
pnpm test:unit src/platform/cloud/subscription/components/CreditsTile.test.ts(29/29)pnpm typecheckpnpm knipScreenshots
AS US
TO BE
QA finding #9