Commit 9c58830
refactor(billing): retire consolidated billing rollout flag (#14615)
Part 4/4 of the workspace and billing rollout retirement stack.
Predecessor:
[#14614](#14614)
Successor: none (final stack PR)
## Summary
Retires `consolidated_billing_enabled` after canonical billing discovery
and explicit rail preservation landed in
[#14614](#14614).
Loaded Cloud workspaces now use unified pricing, while personal
workspaces on `legacy_stripe` retain legacy account operations.
## Root cause
The final billing route still depended on a compatibility feature key
even after the workspace billing contract and canonical rail status were
available. Removing the backend key first would therefore change
personal-workspace routing during bootstrap or strand legacy Stripe
balance/top-up/management behavior. The frontend needs a deterministic
route based on distribution, workspace readiness/type, and the canonical
billing rail before backend compatibility keys disappear.
## Changes
- Removes the consolidated-billing key from remote-config types,
enum/getter, authenticated cache/refresh, local override path, Storybook
mocks, and browser payloads.
- Routes OSS and unloaded Cloud workspaces through legacy bootstrap.
- Routes loaded Cloud team workspaces and personal `unknown`/`stripe`
rails through workspace billing.
- Preserves legacy account operations for personal `legacy_stripe` while
keeping unified pricing for every loaded Cloud workspace.
- Keeps the legacy adapter, balance, top-up, management behavior, and
meaningful regression coverage.
- Re-runs the canonical-status rail regression with both retired feature
keys absent from `/api/features`.
## AS IS
A loaded Cloud personal workspace still consults
`consolidated_billing_enabled` to decide its billing adapter and pricing
route.
No intended visual change. This is rollout cleanup, so no screenshot is
required.
## TO BE
Loaded Cloud workspaces use unified pricing without a rollout key.
Canonical `billing_rail` determines whether personal account operations
remain on `legacy_stripe`; team and migrated/unknown personal workspaces
use workspace billing.
No intended visual change. The existing legacy rail UI remains available
where the canonical status selects it.
## Regression coverage
- OSS and unloaded-workspace legacy bootstrap.
- Cloud team workspace billing.
- Cloud personal unknown/Stripe workspace billing.
- Cloud personal `legacy_stripe` legacy account operations plus unified
pricing.
- Billing-context adapter switching and preserved legacy adapter
behavior.
- Playwright avatar-popover rail selection with `/api/features` omitting
both retired keys, canonical status discovery, legacy balance/credits,
and no stale workspace zero balance.
- Repository search confirms no consolidated-flag symbol/string remains
in `src` or `browser_tests`.
## Validation
- `pnpm test:unit src/composables/useFeatureFlags.test.ts
src/composables/billing/useBillingRouting.test.ts
src/composables/billing/useBillingContext.test.ts
src/platform/remoteConfig/refreshRemoteConfig.test.ts` — 83 passed.
- `pnpm typecheck` — passed.
- `pnpm typecheck:browser` — passed.
- Targeted oxfmt/oxlint/ESLint commit checks — passed.
- `pnpm knip --cache` pre-push check — passed.
- `PLAYWRIGHT_LOCAL=1 PLAYWRIGHT_TEST_URL=http://localhost:5174 pnpm
test:browser browser_tests/tests/billingFacadeConsumers.spec.ts -g
'avatar popover'` — 1 passed.
- `git diff --check dante/canonical-billing-status...HEAD` — passed.
## Review focus
Please review only this PR's removal of the consolidated flag and the
final routing matrix. Canonical endpoint migration and pending-checkout
stabilization belong to
[#14614](#14614);
workspace-flag retirement belongs to
[#14613](#14613).
## Stack/deployment order
1. [#14612](#14612) —
workspace initialization recovery
2. [#14613](#14613) —
retire team workspace rollout flag
3. [#14614](#14614) —
canonical billing status and legacy rail preservation
4. [#14615](#14615) —
this PR; retire consolidated billing rollout flag
Deploy the frontend stack in this order before the backend removes the
`/api/features` compatibility keys. Each branch remains independently
deployable; do not deploy a later PR without its predecessor. This is
also a drain requirement: age out deployed frontend versions and open
tabs that still read either retired key before removing backend
compatibility keys. Confirm `consolidated_billing_enabled` is at 100%
and update `Comfy-Org/cloud#6040` to depend on this selected stack
rather than competing PR #14530 before merge. After backend key removal,
reverting this PR is not a behavioral restore because a reinstated read
of the missing key resolves to the off branch.
Co-authored-by: Connor Byrne <c.byrne@comfy.org>1 parent 147988b commit 9c58830
14 files changed
Lines changed: 20 additions & 130 deletions
File tree
- browser_tests
- fixtures
- data
- utils
- tests
- dialogs
- src
- composables
- billing
- platform/remoteConfig
- storybook/mocks
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
| 14 | + | |
17 | 15 | | |
18 | 16 | | |
19 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 17 | | |
25 | 18 | | |
26 | 19 | | |
| |||
63 | 56 | | |
64 | 57 | | |
65 | 58 | | |
66 | | - | |
| 59 | + | |
67 | 60 | | |
68 | 61 | | |
69 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
226 | | - | |
| 225 | + | |
227 | 226 | | |
228 | 227 | | |
229 | 228 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | 98 | | |
100 | 99 | | |
101 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
| 45 | + | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
38 | | - | |
39 | 37 | | |
40 | 38 | | |
41 | 39 | | |
| |||
63 | 61 | | |
64 | 62 | | |
65 | 63 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | 64 | | |
77 | 65 | | |
78 | 66 | | |
| |||
187 | 175 | | |
188 | 176 | | |
189 | 177 | | |
190 | | - | |
191 | 178 | | |
192 | 179 | | |
193 | 180 | | |
| |||
211 | 198 | | |
212 | 199 | | |
213 | 200 | | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | 201 | | |
223 | 202 | | |
224 | 203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
29 | 15 | | |
30 | | - | |
31 | | - | |
| 16 | + | |
32 | 17 | | |
33 | 18 | | |
34 | 19 | | |
| |||
53 | 38 | | |
54 | 39 | | |
55 | 40 | | |
56 | | - | |
57 | 41 | | |
58 | 42 | | |
59 | 43 | | |
| |||
68 | 52 | | |
69 | 53 | | |
70 | 54 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 55 | + | |
83 | 56 | | |
84 | 57 | | |
85 | 58 | | |
86 | 59 | | |
87 | 60 | | |
88 | 61 | | |
89 | 62 | | |
90 | | - | |
91 | 63 | | |
92 | 64 | | |
93 | 65 | | |
| |||
100 | 72 | | |
101 | 73 | | |
102 | 74 | | |
103 | | - | |
104 | 75 | | |
105 | 76 | | |
106 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
12 | | - | |
13 | | - | |
14 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
15 | 14 | | |
16 | 15 | | |
17 | | - | |
18 | 16 | | |
19 | 17 | | |
20 | 18 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 19 | + | |
27 | 20 | | |
28 | 21 | | |
29 | 22 | | |
| |||
36 | 29 | | |
37 | 30 | | |
38 | 31 | | |
39 | | - | |
40 | | - | |
| 32 | + | |
41 | 33 | | |
42 | 34 | | |
43 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
286 | 285 | | |
287 | 286 | | |
288 | 287 | | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | 288 | | |
298 | 289 | | |
299 | 290 | | |
| |||
307 | 298 | | |
308 | 299 | | |
309 | 300 | | |
310 | | - | |
311 | 301 | | |
312 | 302 | | |
313 | 303 | | |
| |||
317 | 307 | | |
318 | 308 | | |
319 | 309 | | |
320 | | - | |
321 | 310 | | |
322 | 311 | | |
323 | 312 | | |
324 | 313 | | |
325 | 314 | | |
326 | 315 | | |
327 | | - | |
328 | 316 | | |
329 | 317 | | |
330 | 318 | | |
331 | 319 | | |
332 | | - | |
333 | 320 | | |
334 | 321 | | |
335 | 322 | | |
336 | 323 | | |
337 | 324 | | |
338 | 325 | | |
339 | | - | |
340 | 326 | | |
341 | 327 | | |
342 | 328 | | |
343 | 329 | | |
344 | 330 | | |
345 | 331 | | |
346 | 332 | | |
347 | | - | |
348 | 333 | | |
349 | 334 | | |
350 | 335 | | |
351 | 336 | | |
352 | 337 | | |
353 | 338 | | |
354 | | - | |
355 | 339 | | |
356 | 340 | | |
357 | 341 | | |
| |||
361 | 345 | | |
362 | 346 | | |
363 | 347 | | |
364 | | - | |
365 | | - | |
366 | 348 | | |
367 | 349 | | |
368 | 350 | | |
369 | 351 | | |
370 | 352 | | |
371 | 353 | | |
372 | 354 | | |
373 | | - | |
374 | 355 | | |
375 | 356 | | |
376 | 357 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
36 | | - | |
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
| |||
191 | 189 | | |
192 | 190 | | |
193 | 191 | | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | 192 | | |
202 | 193 | | |
203 | 194 | | |
| |||
0 commit comments