Skip to content

FE-3523 feat(billing): show credit banners on the local Billing tab - #21513

Closed
dante01yoon wants to merge 1 commit into
dante/m4-copy-confirmationsfrom
dante/fe-3523-local-credit-banners
Closed

dante01yoon wants to merge 1 commit into
dante/m4-copy-confirmationsfrom
dante/fe-3523-local-credit-banners

Conversation

@dante01yoon

Copy link
Copy Markdown
Collaborator

Summary

Why. Local ComfyUI never mounted the Billing tab, because unifiedBillingSettingsEnabled returned false whenever the build was not Cloud, even when /api/features said unified_billing_settings: true. With the tab missing, the credit banners had nowhere to go.

Root cause. The getter short-circuited on !isCloud before reading the server flag. useBillingBanner also 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.

  • unifiedBillingSettingsEnabled now uses resolveStrictBooleanFlag on every build. Missing, false, or malformed stays false. autoTopUpEnabled is unchanged and stays false off Cloud, so the auto top-up card does not appear on local.
  • Flag off: local keeps the Plan & credits panel. Flag on: local mounts the Billing tab. Members and partner-models stay Cloud-only.
  • Local credit banners live on 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.
  • Out of credits reuses the existing team, personal, member, and past-due strings (payment_past_due on can_top_up).
  • Low credits renders only when the balance response's low_balance is true. The field is passed through; no client threshold.
  • Verify your payment is not in this PR. No single served field means it. authentication_state, phase, and action_url would have to be combined. That is FE-3527 / BE-21811.
  • Paused stays Cloud-only through the existing isCloud gate in useBillingBanner. 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 run on useFeatureFlags, useSettingUI, deriveLocalCreditBanner, useBillingBanner, usePausedBanner, useWorkspaceBilling, BillingLocalCreditBanner, BillingTab, and BillingStatusBanner.
  • Flag off: Plan & credits panel, and useBillingBanner stays null off Cloud, so the old panel shows no credit banner.
  • Flag on, local: out of credits (personal, team, member, and the three past-due lines) and low credits when low_balance is true. Out of credits ranks above low credits. Absent or false low_balance shows nothing. A paused or ending plan with credits left shows nothing.
  • Flag on, Cloud: the local banner renders nothing. Paused is still Cloud-only.
  • oxfmt, oxlint --type-aware, eslint, server-facts, and typecheck:app passed 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: true needs a server that serves that flag, and these states were not captured against one.

Plan position

Item Ticket PR Status
M4 copy, Cloud paused banner, past-due copy FE-3449 PR 21467 Merged
Local credit banners on the Billing tab FE-3523 this PR In review
Verify your payment FE-3527 — Blocked on BE-21811
Payment needs a fix FE-3522 — Out of this PR
Top-up checkout banners FE-3467 PR 21468 Separate PR
graph LR
  A["PR 21467 M4 copy and Cloud paused banner"] --> B["FE-3523 local credit banners (this PR)"]
  C["BE-21811 checkout state"] --> D["FE-3527 verify your payment"]
  style B fill:#f9d71c,stroke:#333
Loading

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.
@dante01yoon dante01yoon added needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch core/1.58 Backport PRs for core 1.58 cloud/1.58 Backport PRs for cloud 1.58 labels Oct 21, 2026
@dante01yoon
dante01yoon requested a review from a team as a code owner October 21, 2026 01:55
@dante01yoon dante01yoon added needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch core/1.58 Backport PRs for core 1.58 cloud/1.58 Backport PRs for cloud 1.58 labels Oct 21, 2026
@coderabbitai

coderabbitai Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: a013a9b1-45c0-4e57-b573-c7f419bceb12

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright: ✅ 2964 passed, 0 failed · 6 flaky

📊 Browser Reports
  • chromium: View Report (✅ 2274 / ❌ 0 / ⚠️ 4 / ⏭️ 0)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • cloud: View Report (✅ 661 / ❌ 0 / ⚠️ 2 / ⏭️ 0)
  • desktop: View Report (✅ 4 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 19 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-safari: View Report (✅ 3 / ❌ 0 / ⚠️ 0 / ⏭️ 0)

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 10/21/2026, 01:57:25 AM UTC

Links

🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measure

Executes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight ecosystem-matrix shard checks are a harness self-test; the pack verdict is matrix-verdict.

No verdict is available. Open the workflow run to confirm the check was intentionally skipped, or fix the collection failure and re-run it.

Findings and check details

The 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: ✅ Passed

Fallow 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 details

No 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: ✅ Passed

Findings and check details

Warnings (127)

  • src/components/graph/selectionToolbox/LinkSelectionActions.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/searchbox/v2/filterChip.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/ui/card/Card.stories.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/ui/card/Card.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/ui/card/CardFooter.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/ui/card/CardHeader.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/ui/card/CardTitle.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/ui/card/card.variants.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/widgetHistory/WidgetHistoryButtons.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/components/widgetHistory/WidgetHistoryButtons.vue is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/billing/useSubscriptionPaywall.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/billing/useSubscriptionPaywall.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/graph/menuOption.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/useWidgetValueHistory.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/useWidgetValueHistory.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/widgetHistoryScope.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/composables/widgetHistoryScope.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/core/graph/litegraphServiceAccess.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/core/graph/nodeDef/ComfyNodeDefImpl.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/core/graph/widgets/dynamicGroupDiagnostics.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/core/graph/widgets/dynamicGroupDiagnostics.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/core/selection/selectionIntent.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/extensions/core/agentPanel.historyIdentity.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/extensions/core/cameraInfo.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/extensions/core/dynamicPrompts.serializeValue.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/extensions/core/load3d/load3dHost.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/extensions/core/load3d/load3dHost.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/extensions/core/load3d/load3dInstances.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/extensions/core/load3d/reportLoadModelOutcome.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/extensions/core/load3d/reportLoadModelOutcome.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/i18n.literalMessages.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/lib/litegraph/src/canvas/canvasClassAccess.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/lib/litegraph/src/canvas/linkHideTransition.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/lib/litegraph/src/canvas/linkHideTransition.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/lib/litegraph/src/canvas/linkSelection.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/lib/litegraph/src/canvas/linkSelection.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/lib/litegraph/src/canvas/linkSnapGeometry.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/lib/litegraph/src/canvas/linkSnapGeometry.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/platform/auth/authStoreAccess.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/platform/auth/currentUserAccess.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/platform/auth/session/sessionCookieAccess.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/platform/auth/session/sessionRevokedError.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/platform/auth/session/webSessionFetch.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/platform/auth/sso/ssoRequiredContext.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/platform/missingModel/releaseModelOptions.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/platform/missingModel/releaseModelOptions.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/platform/telemetry/billingActionNames.test.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/platform/telemetry/billingActionNames.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/platform/telemetry/extensionLoadTelemetry.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • src/platform/workspace/__fixtures__/deploymentListing.ts is not claimed by any domain. Add it to a module in docs/architecture/domains/records.
  • …and 77 more
Reproduce locally
pnpm architecture:check

Full docs: Frontend domain catalog

@dante01yoon

Copy link
Copy Markdown
Collaborator Author

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.

@github-actions github-actions Bot added the risk:xhigh PR risk grade (advisory shadow check; grader-owned) label Oct 21, 2026
@codecov

codecov Bot commented Oct 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.11650% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...logs/settings/billing/BillingLocalCreditBanner.vue 95.83% 3 Missing and 1 partial ⚠️
@@                       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     
Flag Coverage Δ
billing-web-unit ?
unit 85.71% <96.11%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/composables/useFeatureFlags.ts 98.48% <ø> (-0.02%) ⬇️
...components/dialogs/settings/billing/BillingTab.vue 95.12% <ø> (ø)
...m/workspace/composables/deriveLocalCreditBanner.ts 100.00% <100.00%> (ø)
...tform/workspace/composables/useWorkspaceBilling.ts 96.01% <ø> (ø)
...logs/settings/billing/BillingLocalCreditBanner.vue 95.83% <95.83%> (ø)

... and 109 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cloud/1.58 Backport PRs for cloud 1.58 core/1.58 Backport PRs for core 1.58 needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch risk:xhigh PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants