Repository navigation
FE-3523 feat(billing): show credit banners on the local Billing tab - #21513
dante01yoon wants to merge 1 commit into
Conversation
Local builds ignored unified_billing_settings, so the Billing tab never mounted off Cloud. Honor that flag the same way Cloud does, and show out-of-credits, including past due, and low_balance on the tab. Paused and plan-lifecycle banners stay Cloud-only.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🎭 Playwright: ✅ 2964 passed, 0 failed · 6 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measureExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight
Findings and check detailsThe matrix runs on same-repository version-bump PRs with relevant changes, main-branch pushes, and manual dispatches. This candidate does not qualify, so every expensive stage was skipped. Reproduce locally# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
npx vitest run --config vitest.matrix.config.mts
Full docs: scripts/registry-census/README.md 🌾 Fallow: ✅ PassedFallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened. Findings and check detailsNo new findings in the changed files. Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since c88d6a4ea6325e8c20ef52e8fba446fd4c2ec1e1
Full docs: ADR-DEVEX-LINT-0015 🏛️ Architecture: ✅ PassedFindings and check detailsWarnings (127)
Reproduce locallypnpm architecture:checkFull docs: Frontend domain catalog |
|
Replaced by a PR based on main. This one was stacked on a recreated dante/m4-copy-confirmations after #21467 had already squash-merged, so it would not land on main. |
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## dante/m4-copy-confirmations #21513 +/- ##
===============================================================
- Coverage 87.53% 87.43% -0.11%
===============================================================
Files 2833 2728 -105
Lines 153400 150235 -3165
Branches 40655 39496 -1159
===============================================================
- Hits 134277 131356 -2921
+ Misses 18330 18243 -87
+ Partials 793 636 -157
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 109 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Summary
Why. Local ComfyUI never mounted the Billing tab, because
unifiedBillingSettingsEnabledreturned false whenever the build was not Cloud, even when/api/featuressaidunified_billing_settings: true. With the tab missing, the credit banners had nowhere to go.Root cause. The getter short-circuited on
!isCloudbefore reading the server flag.useBillingBanneralso returns nothing off Cloud, so the old Plan & credits panel cannot show these banners, and it must stay that way while the flag is off.How.
unifiedBillingSettingsEnablednow usesresolveStrictBooleanFlagon every build. Missing, false, or malformed stays false.autoTopUpEnabledis unchanged and stays false off Cloud, so the auto top-up card does not appear on local.BillingLocalCreditBanner, which the Billing tab mounts. The tab itself only mounts when the flag is on, and the banner also returns nothing when the flag is off or the build is Cloud.payment_past_dueoncan_top_up).low_balanceis true. The field is passed through; no client threshold.authentication_state,phase, andaction_urlwould have to be combined. That is FE-3527 / BE-21811.isCloudgate inuseBillingBanner. Plan ending, plan ended, scheduled change, and enterprise ending are not rendered on local. Payment needs a fix (FE-3522) and the top-up checkout banners (PR 21468) stay out.Verification
pnpm exec vitest runonuseFeatureFlags,useSettingUI,deriveLocalCreditBanner,useBillingBanner,usePausedBanner,useWorkspaceBilling,BillingLocalCreditBanner,BillingTab, andBillingStatusBanner.useBillingBannerstays null off Cloud, so the old panel shows no credit banner.low_balanceis true. Out of credits ranks above low credits. Absent or falselow_balanceshows nothing. A paused or ending plan with credits left shows nothing.--type-aware, eslint, server-facts, andtypecheck:apppassed on the commit. Pre-push depcruise, knip, and fallow passed.AS IS / TO BE
No live screenshot. The flag matrix above is covered by the tests. A local Billing tab with
unified_billing_settings: trueneeds a server that serves that flag, and these states were not captured against one.Plan position