Repository navigation
FRONT-3796 fix(billing): read the auto top-up card from one pending server fact - #22885
dante01yoon wants to merge 1 commit into
Conversation
The Billing SDK combined can_manage_auto_top_up && can_top_up to decide
the owner auto top-up card, which ADR-0042 forbids. The provider now holds
that combination as pendingServerFact('BE-25243', ...) and core reads the
single canViewAutoTopUpCard fact. Behaviour is unchanged.
🎭 Playwright: ✅ 3247 passed, 0 failed · 1 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measure
Findings and check detailsExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight 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. Full docs: scripts/registry-census/README.md 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
🌾 Fallow: ✅ PassedFindings and check detailsFallow 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. No new findings in the changed files. Full docs: ADR-DEVEX-LINT-0015 Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since d44ee4b17e6546bdcdad1c1560dee0123105291f
🏛️ Architecture: ✅ PassedFindings and check detailsWarnings (357)
Full docs: Frontend domain catalog Reproduce locallypnpm architecture:check |
|
Superseded by #22887 (branch renamed to the 1.61-billing-sdk/ prefix). |
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #22885 +/- ##
==========================================
- Coverage 87.55% 87.55% -0.01%
==========================================
Files 3038 3038
Lines 162587 162590 +3
Branches 43391 41372 -2019
==========================================
- Hits 142358 142351 -7
- Misses 19341 19351 +10
Partials 888 888
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 8 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Why
Before 1.61, the Billing tab rules move into the shared Billing SDK (FRONT-3795). The SDK must not combine billing facts itself (ADR-0042,
docs/adr/API-SERVER-FACTS-0042-server-facts-are-rendered-not-derived.md). This is Billing SDK integration work (item A2 of PR A), not a new feature, and owners and members see no change.Root cause
deriveAutoTopUpSectionin@comfyorg/account-coreshowed the owner auto top-up card whencan_manage_auto_top_up && can_top_up. That is two server facts joined on the client, and the API has no single field that answers "show the card".How
useBillingCapabilities(the provider) holds the interim combination aspendingServerFact('BE-25243', canManageAutoTopUp && canTopUp), exposed ascanViewAutoTopUpCard.AutoTopUpSectionFactstakescanViewAutoTopUpCardinstead of the two capabilities, so core no longer combines facts.The member block reading (
not_workspace_ownerinsideauto_top_up_enabled) is unchanged, and Wei is confirming it in the thread.AS IS / TO BE
No visual change is expected. Screenshots of the Billing tab for an owner and a member, before and after, follow.