Repository navigation
billing: read capabilities from the server, drop the client-side policy - #15804
Conversation
|
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 (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughThe PR replaces legacy billing-policy and workspace-permission checks with billing capabilities across billing controls, dialogs, deep links, operations, browser fixtures, Storybook mocks, and tests. It adds self-serve upgrade handling and distribution-specific settings navigation. ChangesBilling capability migration
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: 🟡 Moderate · up to Some self-service-only users may see an incorrect add-credits prompt and related telemetry, while successful top-ups may delay the confirmation dialog and toast during capability refresh. These bounded behavior and responsiveness issues need explicit owner follow-up before merge. Suggested reviewers: Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 inconclusive)
✅ Passed checks (6 passed)
Full details: End-To-End Regression Coverage For FixesExplanation The PR metadata includes the changed files and description, including multiple Full details: Website End-To-End Regression CoverageExplanation No changed file is under Full details: Adr Compliance For Entity/Litegraph ChangesExplanation PASS: The changed-file list contains no files under Full details: Description checkExplanation The description provides a clear summary, detailed behavior changes, review considerations, rollout requirements, known residual risk, and verification results. It does not use every template heading, but it contains the required information and is sufficiently complete.
✨ Finishing Touches🧪 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 |
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 2004 passed, 0 failed · 1 flaky📊 Browser Reports
📦 Bundle: 9.36 MB gzip 🟢 -1.98 kBDetailsSummary
Category Glance App Entry Points — 3.78 kB (baseline 3.78 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.39 MB (baseline 1.39 MB) • 🟢 -13 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 — 592 kB (baseline 592 kB) • 🟢 -289 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 — 126 kB (baseline 126 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 7 added / 7 removed / 1 unchanged UI Components — 115 kB (baseline 115 kB) • ⚪ 0 BReusable component library chunks
Status: 7 added / 7 removed / 8 unchanged Data & Services — 3.49 MB (baseline 3.49 MB) • 🔴 +210 BStores, services, APIs, and repositories
Status: 14 added / 14 removed / 3 unchanged Utilities & Hooks — 555 kB (baseline 555 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 21 added / 21 removed / 16 unchanged Vendor & Third-Party — 18.1 MB (baseline 18.1 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 18 unchanged Other — 15.1 MB (baseline 15.1 MB) • 🟢 -8.6 kBBundles that do not match a named category
Status: 80 added / 80 removed / 212 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-08-25T23:33:48.520Z",
"gitSha": "9634eb56eb4b151b265149eaa07c8275bd9f3983",
"branch": "wei/be-8716-c-migrate-consumers",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2084.4299999999976,
"styleRecalcs": 4,
"styleRecalcDurationMs": 6.260000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 680.165,
"heapDeltaBytes": -1202532,
"heapUsedBytes": 61843548,
"domNodes": -283,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 12.283999999999999,
"eventListeners": -189,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2037.1579999999767,
"styleRecalcs": 7,
"styleRecalcDurationMs": 5.608000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 492.927,
"heapDeltaBytes": -23832,
"heapUsedBytes": 62639708,
"domNodes": -282,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 9.191,
"eventListeners": -185,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2268.098000000009,
"styleRecalcs": 78,
"styleRecalcDurationMs": 45.549,
"layouts": 12,
"layoutDurationMs": 3.889,
"taskDurationMs": 1355.643,
"heapDeltaBytes": -11676748,
"heapUsedBytes": 57302288,
"domNodes": -281,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 155.331,
"eventListeners": -185,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2243.0409999999483,
"styleRecalcs": 80,
"styleRecalcDurationMs": 43.384,
"layouts": 12,
"layoutDurationMs": 3.6270000000000002,
"taskDurationMs": 1277.844,
"heapDeltaBytes": -10314780,
"heapUsedBytes": 58677468,
"domNodes": -282,
"jsHeapTotalBytes": 6807552,
"scriptDurationMs": 153.058,
"eventListeners": -185,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1732.9009999999698,
"styleRecalcs": 31,
"styleRecalcDurationMs": 18.029999999999998,
"layouts": 6,
"layoutDurationMs": 0.7509999999999999,
"taskDurationMs": 425.802,
"heapDeltaBytes": 4116896,
"heapUsedBytes": 73062072,
"domNodes": 74,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 13.576,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1714.7489999999834,
"styleRecalcs": 30,
"styleRecalcDurationMs": 16.730999999999998,
"layouts": 6,
"layoutDurationMs": 0.5839999999999999,
"taskDurationMs": 404.112,
"heapDeltaBytes": 4101336,
"heapUsedBytes": 73674608,
"domNodes": 76,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 13.232000000000001,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 742.1190000000024,
"styleRecalcs": 10,
"styleRecalcDurationMs": 6.812999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 462.27299999999997,
"heapDeltaBytes": -7084616,
"heapUsedBytes": 62503844,
"domNodes": 16,
"jsHeapTotalBytes": 6291456,
"scriptDurationMs": 32.02199999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "dom-widget-clipping",
"durationMs": 723.3329999999114,
"styleRecalcs": 9,
"styleRecalcDurationMs": 5.732999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 425.20899999999995,
"heapDeltaBytes": -6795628,
"heapUsedBytes": 62775388,
"domNodes": 14,
"jsHeapTotalBytes": 6291456,
"scriptDurationMs": 29.898,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-idle",
"durationMs": 2042.238999999995,
"styleRecalcs": 4,
"styleRecalcDurationMs": 3.916000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 664.564,
"heapDeltaBytes": -21042176,
"heapUsedBytes": 69611992,
"domNodes": -280,
"jsHeapTotalBytes": 4186112,
"scriptDurationMs": 39.712999999999994,
"eventListeners": -185,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-idle",
"durationMs": 2055.9840000000804,
"styleRecalcs": 5,
"styleRecalcDurationMs": 4.4239999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 561.907,
"heapDeltaBytes": -20573396,
"heapUsedBytes": 70127240,
"domNodes": -279,
"jsHeapTotalBytes": -532480,
"scriptDurationMs": 39.74399999999999,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 3893.933000000004,
"styleRecalcs": 65,
"styleRecalcDurationMs": 10.832999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 2874.441,
"heapDeltaBytes": -13413640,
"heapUsedBytes": 78100860,
"domNodes": -283,
"jsHeapTotalBytes": 4935680,
"scriptDurationMs": 974.53,
"eventListeners": -179,
"totalBlockingTimeMs": 10,
"frameDurationMs": 16.666666666666636,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "large-graph-pan",
"durationMs": 3520.4969999999776,
"styleRecalcs": 65,
"styleRecalcDurationMs": 10.669999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 2758.297,
"heapDeltaBytes": -6798740,
"heapUsedBytes": 84576512,
"domNodes": -280,
"jsHeapTotalBytes": 741376,
"scriptDurationMs": 932.568,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 4644.649000000016,
"styleRecalcs": 66,
"styleRecalcDurationMs": 12.217000000000002,
"layouts": 60,
"layoutDurationMs": 7.956999999999999,
"taskDurationMs": 2813.824,
"heapDeltaBytes": 16297468,
"heapUsedBytes": 88281968,
"domNodes": -233,
"jsHeapTotalBytes": -45056,
"scriptDurationMs": 905.563,
"eventListeners": -147,
"totalBlockingTimeMs": 4,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 4533.655999999951,
"styleRecalcs": 66,
"styleRecalcDurationMs": 11.759000000000002,
"layouts": 60,
"layoutDurationMs": 7.7669999999999995,
"taskDurationMs": 2659.489,
"heapDeltaBytes": 14100600,
"heapUsedBytes": 80055780,
"domNodes": 24,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 874.376,
"eventListeners": 10,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3323.927000000026,
"styleRecalcs": 41,
"styleRecalcDurationMs": 5.427000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 2359.675,
"heapDeltaBytes": -1757456,
"heapUsedBytes": 70915832,
"domNodes": -285,
"jsHeapTotalBytes": -569344,
"scriptDurationMs": 223.762,
"eventListeners": 29,
"totalBlockingTimeMs": 3,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3207.437999999911,
"styleRecalcs": 41,
"styleRecalcDurationMs": 5.434999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 2130.853,
"heapDeltaBytes": -1682280,
"heapUsedBytes": 70947816,
"domNodes": -287,
"jsHeapTotalBytes": -831488,
"scriptDurationMs": 216.889,
"eventListeners": 29,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2049.9489999999696,
"styleRecalcs": 3,
"styleRecalcDurationMs": 3.389,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 671.1560000000001,
"heapDeltaBytes": -21525912,
"heapUsedBytes": 70739484,
"domNodes": -284,
"jsHeapTotalBytes": 3923968,
"scriptDurationMs": 35.92700000000001,
"eventListeners": -185,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2053.6559999999326,
"styleRecalcs": 4,
"styleRecalcDurationMs": 3.0750000000000015,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 577.3170000000001,
"heapDeltaBytes": -22004088,
"heapUsedBytes": 69495596,
"domNodes": -283,
"jsHeapTotalBytes": 3661824,
"scriptDurationMs": 37.85,
"eventListeners": -185,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 817.0069999999896,
"styleRecalcs": 44,
"styleRecalcDurationMs": 10.007000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 578.704,
"heapDeltaBytes": 17999500,
"heapUsedBytes": 81744952,
"domNodes": 14,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 149.644,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 727.2949999999128,
"styleRecalcs": 47,
"styleRecalcDurationMs": 10.381,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 505.73699999999997,
"heapDeltaBytes": 17931088,
"heapUsedBytes": 88230720,
"domNodes": 20,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 131.14900000000003,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2038.343999999995,
"styleRecalcs": 8,
"styleRecalcDurationMs": 8.559999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 589.2330000000001,
"heapDeltaBytes": -11082240,
"heapUsedBytes": 59570324,
"domNodes": -295,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 11.403000000000002,
"eventListeners": -201,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-idle",
"durationMs": 2010.0400000000036,
"styleRecalcs": 8,
"styleRecalcDurationMs": 6.894999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 552.7820000000002,
"heapDeltaBytes": -13741380,
"heapUsedBytes": 55989872,
"domNodes": -298,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 9.936000000000002,
"eventListeners": -201,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 2048.1410000000437,
"styleRecalcs": 79,
"styleRecalcDurationMs": 44.843,
"layouts": 16,
"layoutDurationMs": 5.14,
"taskDurationMs": 1250.732,
"heapDeltaBytes": -5934552,
"heapUsedBytes": 63795248,
"domNodes": -297,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 112.127,
"eventListeners": -201,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1815.5649999999923,
"styleRecalcs": 74,
"styleRecalcDurationMs": 35.614000000000004,
"layouts": 16,
"layoutDurationMs": 4.405,
"taskDurationMs": 1136.277,
"heapDeltaBytes": -13261636,
"heapUsedBytes": 57002796,
"domNodes": -297,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 105.11200000000001,
"eventListeners": -231,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 1368.3219999999778,
"styleRecalcs": 19,
"styleRecalcDurationMs": 28.956000000000003,
"layouts": 14,
"layoutDurationMs": 12.63,
"taskDurationMs": 914.6959999999997,
"heapDeltaBytes": -9503876,
"heapUsedBytes": 85330840,
"domNodes": 13671,
"jsHeapTotalBytes": 10485760,
"scriptDurationMs": 30.484000000000005,
"eventListeners": 2381,
"totalBlockingTimeMs": 122,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 13916.550000000028,
"styleRecalcs": 246,
"styleRecalcDurationMs": 37.367999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10347.583999999999,
"heapDeltaBytes": -4099756,
"heapUsedBytes": 86427520,
"domNodes": -276,
"jsHeapTotalBytes": 2805760,
"scriptDurationMs": 3384.469,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 12399.238000000081,
"styleRecalcs": 247,
"styleRecalcDurationMs": 35.301,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9486.892999999998,
"heapDeltaBytes": -21579792,
"heapUsedBytes": 69045548,
"domNodes": -282,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 3211.086,
"eventListeners": -157,
"totalBlockingTimeMs": 15,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 16084.705999999984,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 15419.215000000002,
"heapDeltaBytes": -29687932,
"heapUsedBytes": 176824116,
"domNodes": -6548,
"jsHeapTotalBytes": 344064,
"scriptDurationMs": 293.528,
"eventListeners": -7473,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 15939.111000000026,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 15272.954000000002,
"heapDeltaBytes": -42478104,
"heapUsedBytes": 163042548,
"domNodes": -6548,
"jsHeapTotalBytes": 1974272,
"scriptDurationMs": 275.812,
"eventListeners": -7473,
"totalBlockingTimeMs": 0,
"frameDurationMs": 18.329999999999927,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 18858.00899999998,
"styleRecalcs": 141,
"styleRecalcDurationMs": 16.459000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 18615.306,
"heapDeltaBytes": -25192204,
"heapUsedBytes": 180081512,
"domNodes": -6548,
"jsHeapTotalBytes": -274432,
"scriptDurationMs": 910.488,
"eventListeners": -7471,
"totalBlockingTimeMs": 15,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 18989.84299999995,
"styleRecalcs": 140,
"styleRecalcDurationMs": 17.237000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 18742.045,
"heapDeltaBytes": -48866992,
"heapUsedBytes": 162585620,
"domNodes": -6548,
"jsHeapTotalBytes": -3805184,
"scriptDurationMs": 838.8720000000001,
"eventListeners": -7471,
"totalBlockingTimeMs": 36,
"frameDurationMs": 17.780000000000047,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 505.7000000000471,
"styleRecalcs": 18,
"styleRecalcDurationMs": 24.45,
"layouts": 3,
"layoutDurationMs": 1.47,
"taskDurationMs": 152.178,
"heapDeltaBytes": 5866668,
"heapUsedBytes": 72364856,
"domNodes": 148,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 10.839000000000002,
"eventListeners": 99,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "workflow-execution",
"durationMs": 456.7979999999352,
"styleRecalcs": 14,
"styleRecalcDurationMs": 19.622,
"layouts": 3,
"layoutDurationMs": 1.122,
"taskDurationMs": 115.953,
"heapDeltaBytes": 5492732,
"heapUsedBytes": 68810928,
"domNodes": 121,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 7.009999999999999,
"eventListeners": 99,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
}
]
} |
Generated output only - no hand-written changes.
Adds the capabilities composable, its API call, and the auth-gate wiring that populates it. The gate's abort signal is threaded through to the request. No consumer reads the resolved values yet - they migrate separately.
9cc5ec6 to
402766b
Compare
0dfc09a to
20d71f0
Compare
Points every consumer at the capabilities composable and deletes the local derivation it replaces, including the top-up deep-link loader: that file reads canTopUp off WorkspacePermissions, which this change removes, so it cannot typecheck a commit later. The deep-link loader also awaits capability initialization before reading the flags, so an eligible user does not lose the link while both are still false.
20d71f0 to
0894b5c
Compare
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #15804 +/- ##
==========================================
+ Coverage 80.18% 82.51% +2.33%
==========================================
Files 2264 1931 -333
Lines 115817 110726 -5091
Branches 33525 32290 -1235
==========================================
- Hits 92870 91371 -1499
+ Misses 22451 19024 -3427
+ Partials 496 331 -165
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 345 files with indirect coverage changes 🚀 New features to boost your workflow:
|
The spec asserts the new capability-driven deep-link behaviour, so it cannot live a PR later than the implementation - this PR would otherwise run main's old spec against the new loader.
…types # Conflicts: # packages/ingest-types/src/index.ts # packages/ingest-types/src/types.gen.ts # packages/ingest-types/src/zod.gen.ts
…s menu The billing-capabilities migration collapsed two Local-only menu paths into their Cloud counterparts and dropped their isCloud guards along the way: - showSubscribeAction lost its `isCloud &&` guard, so the Subscribe / Resubscribe button could render for Local team workspaces. - The Local-only "Plans & Credits" menu item was merged into manage-plan-menu-item, but that button's visibility still requires an active/delinquent subscription, so an unsubscribed Local user lost access to plan/credits settings entirely (and its data-testid changed under it). Restores the pre-migration split (showLocalPlansAndCredits + plans-credits-menu-item, isCloud-gated manage-plan-menu-item) while keeping the new server-resolved canTopUp/canSubscribeSelfServe capabilities for the add/upgrade-credits buttons, which is unaffected by this bug.
…r menu
The migration commit that broke Subscribe/Plan-Credits gating also deleted
the four unit tests that would have caught it, so the regression shipped
silently. Restores equivalent coverage against the new capability source
(useBillingCapabilities is already mocked in this file; nothing here mocks
the removed client-side policy):
- keeps Subscribe hidden on Local after switching to an unsubscribed workspace
- keeps Resubscribe hidden on Local for a cancelled plan
- opens local Plan and Credits instead of Cloud pricing actions
- hides local Plan and Credits without subscription management permission
(paired with a new positive counterpart -- on its own this assertion
passes vacuously against a renamed/merged testid, so it can't stand alone
as a regression guard)
Restoring the tests surfaced a second, previously-unflagged instance of the
same bug class: the "Plans & pricing" menu item had also lost its isCloud
guard (item was Cloud-only, guard silently dropped in the same migration),
and its Local sibling's label string ("Plans and credits") had been deleted
from the locale file. Both are fixed here alongside the guard test restore.
Verified red-then-green: reverted CurrentUserPopoverWorkspace.vue and the
locale key to their pre-fix (migration) state and confirmed exactly the 4
new discriminating tests fail (19 pre-existing tests still pass); restored
the fix and confirmed all 23 pass under --coverage.
The split checked this file out from a branch based on an older main, which reverted 15 keys instead of adding one. nodeBadge.partnerNodesCount was among them, failing badgeSystem's unit tests on a raw i18n key. Rebased onto main's file and re-added only outOfCredits.upgradeBody, the one key this work introduces.
…redits on Local (#16087) Backport of #15799 to `cloud/1.52`. ## Merge order — this PR is stacked Base is deliberately `cloud/1.52`, not `cloud/1.52`. GitHub retargets this PR to `cloud/1.52` once its parent merges. `cloud/1.52` → #15799 → #15803 → #15804 → #15675 → #15967 → #16043 → #16046 → #16067 Every commit in this chain cherry-picks cleanly; there are no hand-resolved conflicts anywhere in the stack. ## Verification Run at the tip of the full stack: 93 unit test files, 1745 tests, 0 failures (`src/platform/workspace`, `src/platform/cloud/subscription`, `src/composables/useCoreCommands.test.ts`, `src/components/actionbar`). ## Why this is in the chain Prerequisite found while backporting #16067. `cloud/1.52` carries `useBillingPolicyCapabilities.ts` but never adopted it in `CurrentUserPopoverWorkspace.vue` / `CreditsTile.vue`. Without this commit #15804 conflicts in both files.
…ource (#16088) Backport of #15803 to `cloud/1.52`. ## Merge order — this PR is stacked Base is deliberately `backport-15799-to-cloud-1.52`, not `cloud/1.52`. GitHub retargets this PR to `cloud/1.52` once its parent merges. `cloud/1.52` → #15799 → #15803 → #15804 → #15675 → #15967 → #16043 → #16046 → #16067 Every commit in this chain cherry-picks cleanly; there are no hand-resolved conflicts anywhere in the stack. ## Verification Run at the tip of the full stack: 93 unit test files, 1745 tests, 0 failures (`src/platform/workspace`, `src/platform/cloud/subscription`, `src/composables/useCoreCommands.test.ts`, `src/components/actionbar`). --------- Co-authored-by: Wei Hai <hai.vincent@gmail.com>
…cy (#15804) Points every Cloud billing consumer at the server-resolved capabilities composable and deletes the client-side derivation it replaces. **This is where rendered behaviour changes.** The rest of the stack was generated output, a dormant source, and tests. Three things ride together because splitting them produces a commit that does not build: - the consumer migration, - deleting the six client-side policy files (a consumer still importing them would not compile), - the top-up deep-link loader, which read `canTopUp` off `WorkspacePermissions` — a property this change removes. The loader now awaits capability initialization before reading the flags, so an eligible user does not lose the `?topup=` deep link while both are still at their initial `false`. ## Behaviour reviewers should agree to **An unsubscribed Cloud owner now sees "Add Credits" alongside "Subscribe"**, where they previously saw only "Subscribe". The old behaviour came from a client-side `topUpAccess` inference; that policy now lives server-side, and the resolver returns `can_top_up=true` for a workspace with no subscription row. The component renders what the server grants, so the guard belongs in the resolver — `cloud#7342` addresses it. Enterprise handling is preserved. `#15855` landed the ENTERPRISE tier while this was in flight and modified the `billingPolicy*` files deleted here; its own description names this stack as the intended end state, with only the tier-label mapping surviving. `useWorkspaceTierLabel`'s `ENTERPRISE: 'enterprise'` and the locale key are retained and byte-identical to that PR. ## Merge checklist — rollout flags With the capability rollout flags **off**, the server returns `can_top_up=true` / `can_subscribe_self_serve=false` for every workspace: every cloud user sees "Add credits" and nobody sees the subscribe upsell. Prod runs a pinned `frontendVersion` (currently `1.51.9`), so merging here does not ship — but this must be settled before a backport reaches a `cloud/1.5x` release branch. - [x] Regenerate `@comfyorg/ingest-types` — #15802, corrected by #15878 to the pipeline-projected output - [x] Land `cloud#7342` — merged 2026-08-25 21:18; verified on cloud `main` - [x] Create both flags in staging (`dreamboothy-dev`) — they did not exist; created disabled at 0% mirroring prod - [ ] Validate flags-on in test-v2 — it already runs `cloud#7342` (image `16b468b`, auto-deployed by Image Updater). Note `can_downgrade_to_personal` is rollout-gated too, so downgrade CTAs stay dark until flags-on - [ ] Confirm billing-api is deployed to prod with `cloud#7342`, then set `active: true` and ramp as a canary Known residual: `can_top_up=false` still carries three meanings (not owner / free tier / no subscription), so `CreditsTile`'s `v-else` can show "Upgrade to add credits" to a member who cannot upgrade. Tracked via the proposed `top_up_denied_reason` on the `cloud#7223` discussion. ## Verification `pnpm typecheck`, `typecheck:browser`, `lint` clean. Full unit suite: **17,758 passed**; the 12 `check-binary-size` failures are pre-existing and environmental. (cherry picked from commit 6dd12d7)
…p the client-side policy (#16089) Backport of #15804 to `cloud/1.52`. ## Merge order — this PR is stacked Base is deliberately `backport-15803-to-cloud-1.52`, not `cloud/1.52`. GitHub retargets this PR to `cloud/1.52` once its parent merges. `cloud/1.52` → #15799 → #15803 → #15804 → #15675 → #15967 → #16043 → #16046 → #16067 Every commit in this chain cherry-picks cleanly; there are no hand-resolved conflicts anywhere in the stack. ## Verification Run at the tip of the full stack: 93 unit test files, 1745 tests, 0 failures (`src/platform/workspace`, `src/platform/cloud/subscription`, `src/composables/useCoreCommands.test.ts`, `src/components/actionbar`). Co-authored-by: Wei Hai <hai.vincent@gmail.com>
Migrates the last five Cloud billing surfaces onto server-resolved
capabilities: cancellation, reactivation, plan and seat changes, member
invitations, and Team-to-personal downgrade.
Each reads its matching capability behind the `isCloud ? capability :
permissions` split already established in this stack, and
`useWorkspaceUI` sheds the fields the server now owns.
## Review fixes applied
- **Free-tier cancel guard** — `can_cancel` encodes role, subscription
presence/status and a scheduled cancellation, but **not tier**: it stays
true for an active FREE plan. Re-applied `!isFreeTier` on top of the
capability. The other three predicates the migration dropped *are*
encoded server-side, so re-adding them would have been redundant. The
backend now owns this too (`cloud#7342`), making the guard removable as
a follow-up.
- **Non-Cloud permission path** — every capability except `canTopUp` is
hard-false off Cloud, so the cancel dialog and pricing table had lost
their Local/Desktop path. Restored across **seven** CTA paths, not the
four first identified: personal and team each have their own subscribe,
reactivate and change-plan branch.
- **Capability mocks no longer alias the permission they replace** — six
test files derived the new capability from the old permission, so
reverting a consumer to the permission guard left the suites green. Each
split, with a `client owner permission = true / server capability =
false` case per migrated branch, every one verified to fail under a
reverted consumer.
- **Guard tested from both sides** — the popover's `!isCloud` menu-item
guard had only same-distribution cases.
## Deferred, with reasons on the thread
- Three surfaces still gating on role permissions (`SubscribeToRun.vue`,
`usePricingTableUrlLoader`, the popover's Plans & pricing entry). None
is broken today. Notably the suggested `canReactivate` mapping for
`SubscribeToRun.vue` **would have introduced a bug** — that button also
renders for never-subscribed and free-tier-exhausted users, who have
`can_reactivate = false`.
- `canPerformCheckout('change')` gating on `can_change_seats`. Not the
right long-term semantic — every path it guards ends at the subscribe
endpoint — but collapsing it to `can_subscribe_self_serve` must wait
until the rollout flags are on, or it blocks every plan change today.
## Release dependency
`showSubscribeAction` and `canPerformCheckout('new')` gate on
`can_subscribe_self_serve`, which the rollout handler forces **false on
the wire** while its flag is off — the current default. Subscribe and
reactivate entry points go dark on Cloud unless that flag is enabled
first. `can_downgrade_to_personal` is gated the same way. Both are on
the checklist in #15804.
## Verification
`pnpm typecheck`, `typecheck:browser`, `lint` clean. Full unit suite:
**17,758 passed**; the 12 `check-binary-size` failures are pre-existing
and environmental.
(cherry picked from commit 91e8969)
…lities (#16090) Backport of #15675 to `cloud/1.52`. ## Merge order — this PR is stacked Base is deliberately `backport-15804-to-cloud-1.52`, not `cloud/1.52`. GitHub retargets this PR to `cloud/1.52` once its parent merges. `cloud/1.52` → #15799 → #15803 → #15804 → #15675 → #15967 → #16043 → #16046 → #16067 Every commit in this chain cherry-picks cleanly; there are no hand-resolved conflicts anywhere in the stack. ## Verification Run at the tip of the full stack: 93 unit test files, 1745 tests, 0 failures (`src/platform/workspace`, `src/platform/cloud/subscription`, `src/composables/useCoreCommands.test.ts`, `src/components/actionbar`). Co-authored-by: Wei Hai <hai.vincent@gmail.com>
…#16067) ## Why this is needed Enterprise workspaces exist in production (`enterprise_monthly` / `enterprise_annual`, provisioned through the comfy-admin console) but the frontend still renders them as a self-serve catalog plan. FE-1662 verified three gaps against the tree, and re-verification after the capabilities migration (#15803/#15804/#15675) and the ENTERPRISE contract landing (#15855) found the surviving surface smaller but real. Supersedes #15403 — same behavioral spec and design of record ([Figma 4404-13011](https://www.figma.com/design/CkFTD4c20PyRGpNVAJgpfV/Team-Plan---Workspaces?node-id=4404-13011), DES-782), rebuilt on the server-capabilities architecture that merged underneath it. Co-authored with @comfydesigner, whose branch this replaces. - Fixes FE-1662 ## Root cause Three distinct causes, one per change group: 1. **Label fallbacks assume the catalog is total.** `resolveSubscriptionTierKey` falls back to `'standard'` for any unmapped tier, so an ENTERPRISE workspace's plan card renders **"Standard"**, Standard's **$20 USD/mo** price (`useWorkspacePlanPricing` has the same fallback), Standard's feature list, and the credits bar borrows Standard's 4,200-credit monthly pool (`CreditsTile.tierKey ?? DEFAULT_TIER_KEY`). A scheduled change to an enterprise plan falls through the `team`-prefix check and labels itself "Standard". 2. **Pricing-table entry points gate on membership, not on whether a catalog exists.** The `?pricing=` deep link (`usePricingTableUrlLoader`), the profile menu's "Plans & pricing", and settings' "View more details about plans & pricing" all gate on `canManageSubscription` (owner), so an Enterprise owner can still open the self-serve pricing table. The subscribe-to-run upsell (`CloudRunButtonWrapper`, `useCoreCommands`) gates only on `canAccessSubscriptionFeatures`, so a lapsed Enterprise workspace is offered a self-serve checkout it must not use. 3. **No representation for a tier outside the catalog.** A tier the build doesn't recognize (server ahead of client) borrowed all of the above from Standard — price and feature claims for a plan the frontend cannot identify. Lifecycle actions (cancel / reactivate / plan change / member invites) are **not** part of this PR's policy surface: the server already resolves them (`hideLifecycleCapabilities` in billing-api keeps `can_top_up=true` and closes the rest), and main already consumes those capabilities. This PR covers rendering and the pricing-catalog entry points only. ## How **One derived policy for every pricing-table entry point.** `useWorkspaceUI.canOpenPricingSurface` reads the server-resolved `can_subscribe_self_serve` on the workspace rail and falls back to membership on `legacy_stripe` — the exact shape of `canReactivatePlan` (#15967), so the legacy-rail regression class that #15967/#16043/#16046 fixed cannot recur here. Consumers: profile-menu "Plans & pricing", settings "View more details", and the `?pricing=` deep link (which now awaits capability initialization before deciding, like the `?topup=` loader, so a pre-load deep link can't slip through). **Tier drives rendering only.** `isSalesManagedTier` (ENTERPRISE or unmapped) hides the catalog price row, benefits list, and borrowed credit pool; `planDisplayName` renders "Enterprise" / "Current plan"; the scheduled-change label resolves enterprise slugs (the only signal on that path — enterprise plans are absent from `plans`); `formatTierName` gains a `te()` guard so an unknown tier degrades to a capitalized string instead of a raw i18n key. The subscribe-to-run upsell and the run-command dialog stay hidden on sales-managed plans (`SubscribeToRun` requires a catalog to sell into); the run button remains a run button. **Capability-driven credits tile.** The inactive-plan zero-state now applies only when the server also withholds top-up (`inactivePlan && !canTopUp`): lapsed self-serve plans keep today's reactivate-to-use-credits treatment (`lapsedSelfServeCapabilities` withholds top-up), while a sales-managed plan — whose top-up stays open whatever the subscription row says — keeps its real balance and Add credits. **Delete workspace hides on Enterprise** (DES-782): deletion requires a cancellation only sales can perform, so the disabled menu item was a permanent dead end. ## Behavioral spec (from #15403, verified by tests) 1. Enterprise owner cannot self-serve any plan change — no upgrade, downgrade, cancel, or reactivate (server capabilities; regression-tested here). 2. The pricing table never appears for an Enterprise workspace — settings, profile menu, or `?pricing=` deep link (quiet no-op). 3. The plan reads "Enterprise" with its renewal date — never another tier's name, price, credits, or feature list. 4. Money-in stays open: top-up and Billing & invoices always reachable. 5. A cancelled or ended Enterprise subscription shows the standard state with no Reactivate/Subscribe action. 6. An unrecognized tier renders as "Current plan" with no borrowed catalog content and no self-serve actions; credits, top-up, and runs keep working, no crash. > Story 5's amended form (ended Enterprise → Subscribe returns, per the 2026-08-21 decision with Justin) is **deliberately out of scope**: billing-api resolves `can_subscribe_self_serve=false` for any enterprise subscription row including ended ones, so that behavior needs a backend change first (contract-first). Tracked as a follow-up. ## Tests - **Unit (321 passing across the 11 touched suites):** new coverage in `tierPricing` (helpers), `useWorkspaceUI` (`canOpenPricingSurface` rail split), `SubscriptionPanelContentWorkspace` (stories 1, 3, 4, 5, 6 + scheduled-change label), `CurrentUserPopoverWorkspace` (menu entry + resubscribe), `usePricingTableUrlLoader` (deep-link no-op + pre-load race), `CreditsTile` (sales-managed pool + inactive state), `CloudRunButtonWrapper` / `useCoreCommands` (upsell suppression), `useWorkspaceMenuItems` (cancel/delete/leave). - **E2E (`browser_tests/tests/dialogs/enterpriseTierCloud.spec.ts`, 7 tests, @cloud):** one per user story against the real cloud build with server-shaped capability mocks (`hideLifecycleCapabilities` shape), plus a Pro-team self-serve regression and an unrecognized-tier no-crash regression. `endedSubscription.spec.ts` additionally pins that a non-enterprise inactive team keeps its Reactivate button. All 10 pass locally against a ComfyUI server serving the cloud dist. - `CloudWorkspaceMockHelper` gained an optional capability-overrides parameter so specs can mock the server's sales-managed shape. ## AS IS / TO BE Screenshots from the real app (cloud dist served by ComfyUI) being attached in a follow-up edit to this description: Plan & Credits panel (Standard-mislabel → Enterprise card), profile menu (Plans & pricing removed), ended-enterprise run button (subscribe upsell removed). Co-authored-by: comfydesigner <247099495+comfydesigner@users.noreply.github.com> (cherry picked from commit bab0873)
… rail and centralize the policy (#16091) Backport of #15967 to `cloud/1.52`. ## Merge order — this PR is stacked Base is deliberately `backport-15675-to-cloud-1.52`, not `cloud/1.52`. GitHub retargets this PR to `cloud/1.52` once its parent merges. `cloud/1.52` → #15799 → #15803 → #15804 → #15675 → #15967 → #16043 → #16046 → #16067 Every commit in this chain cherry-picks cleanly; there are no hand-resolved conflicts anywhere in the stack. ## Verification Run at the tip of the full stack: 93 unit test files, 1745 tests, 0 failures (`src/platform/workspace`, `src/platform/cloud/subscription`, `src/composables/useCoreCommands.test.ts`, `src/components/actionbar`). Co-authored-by: Wei Hai <hai.vincent@gmail.com>
… with the centralized rail policy (#16092) Backport of #16043 to `cloud/1.52`. ## Merge order — this PR is stacked Base is deliberately `backport-15967-to-cloud-1.52`, not `cloud/1.52`. GitHub retargets this PR to `cloud/1.52` once its parent merges. `cloud/1.52` → #15799 → #15803 → #15804 → #15675 → #15967 → #16043 → #16046 → #16067 Every commit in this chain cherry-picks cleanly; there are no hand-resolved conflicts anywhere in the stack. ## Verification Run at the tip of the full stack: 93 unit test files, 1745 tests, 0 failures (`src/platform/workspace`, `src/platform/cloud/subscription`, `src/composables/useCoreCommands.test.ts`, `src/components/actionbar`). --------- Co-authored-by: Wei Hai <hai.vincent@gmail.com>
…centralized rail policy (#16093) Backport of #16046 to `cloud/1.52`. ## Merge order — this PR is stacked Base is deliberately `backport-16043-to-cloud-1.52`, not `cloud/1.52`. GitHub retargets this PR to `cloud/1.52` once its parent merges. `cloud/1.52` → #15799 → #15803 → #15804 → #15675 → #15967 → #16043 → #16046 → #16067 Every commit in this chain cherry-picks cleanly; there are no hand-resolved conflicts anywhere in the stack. ## Verification Run at the tip of the full stack: 93 unit test files, 1745 tests, 0 failures (`src/platform/workspace`, `src/platform/cloud/subscription`, `src/composables/useCoreCommands.test.ts`, `src/components/actionbar`). Co-authored-by: Wei Hai <hai.vincent@gmail.com>
…#16067) ## Why this is needed Enterprise workspaces exist in production (`enterprise_monthly` / `enterprise_annual`, provisioned through the comfy-admin console) but the frontend still renders them as a self-serve catalog plan. FE-1662 verified three gaps against the tree, and re-verification after the capabilities migration (#15803/#15804/#15675) and the ENTERPRISE contract landing (#15855) found the surviving surface smaller but real. Supersedes #15403 — same behavioral spec and design of record ([Figma 4404-13011](https://www.figma.com/design/CkFTD4c20PyRGpNVAJgpfV/Team-Plan---Workspaces?node-id=4404-13011), DES-782), rebuilt on the server-capabilities architecture that merged underneath it. Co-authored with @comfydesigner, whose branch this replaces. - Fixes FE-1662 ## Root cause Three distinct causes, one per change group: 1. **Label fallbacks assume the catalog is total.** `resolveSubscriptionTierKey` falls back to `'standard'` for any unmapped tier, so an ENTERPRISE workspace's plan card renders **"Standard"**, Standard's **$20 USD/mo** price (`useWorkspacePlanPricing` has the same fallback), Standard's feature list, and the credits bar borrows Standard's 4,200-credit monthly pool (`CreditsTile.tierKey ?? DEFAULT_TIER_KEY`). A scheduled change to an enterprise plan falls through the `team`-prefix check and labels itself "Standard". 2. **Pricing-table entry points gate on membership, not on whether a catalog exists.** The `?pricing=` deep link (`usePricingTableUrlLoader`), the profile menu's "Plans & pricing", and settings' "View more details about plans & pricing" all gate on `canManageSubscription` (owner), so an Enterprise owner can still open the self-serve pricing table. The subscribe-to-run upsell (`CloudRunButtonWrapper`, `useCoreCommands`) gates only on `canAccessSubscriptionFeatures`, so a lapsed Enterprise workspace is offered a self-serve checkout it must not use. 3. **No representation for a tier outside the catalog.** A tier the build doesn't recognize (server ahead of client) borrowed all of the above from Standard — price and feature claims for a plan the frontend cannot identify. Lifecycle actions (cancel / reactivate / plan change / member invites) are **not** part of this PR's policy surface: the server already resolves them (`hideLifecycleCapabilities` in billing-api keeps `can_top_up=true` and closes the rest), and main already consumes those capabilities. This PR covers rendering and the pricing-catalog entry points only. ## How **One derived policy for every pricing-table entry point.** `useWorkspaceUI.canOpenPricingSurface` reads the server-resolved `can_subscribe_self_serve` on the workspace rail and falls back to membership on `legacy_stripe` — the exact shape of `canReactivatePlan` (#15967), so the legacy-rail regression class that #15967/#16043/#16046 fixed cannot recur here. Consumers: profile-menu "Plans & pricing", settings "View more details", and the `?pricing=` deep link (which now awaits capability initialization before deciding, like the `?topup=` loader, so a pre-load deep link can't slip through). **Tier drives rendering only.** `isSalesManagedTier` (ENTERPRISE or unmapped) hides the catalog price row, benefits list, and borrowed credit pool; `planDisplayName` renders "Enterprise" / "Current plan"; the scheduled-change label resolves enterprise slugs (the only signal on that path — enterprise plans are absent from `plans`); `formatTierName` gains a `te()` guard so an unknown tier degrades to a capitalized string instead of a raw i18n key. The subscribe-to-run upsell and the run-command dialog stay hidden on sales-managed plans (`SubscribeToRun` requires a catalog to sell into); the run button remains a run button. **Capability-driven credits tile.** The inactive-plan zero-state now applies only when the server also withholds top-up (`inactivePlan && !canTopUp`): lapsed self-serve plans keep today's reactivate-to-use-credits treatment (`lapsedSelfServeCapabilities` withholds top-up), while a sales-managed plan — whose top-up stays open whatever the subscription row says — keeps its real balance and Add credits. **Delete workspace hides on Enterprise** (DES-782): deletion requires a cancellation only sales can perform, so the disabled menu item was a permanent dead end. ## Behavioral spec (from #15403, verified by tests) 1. Enterprise owner cannot self-serve any plan change — no upgrade, downgrade, cancel, or reactivate (server capabilities; regression-tested here). 2. The pricing table never appears for an Enterprise workspace — settings, profile menu, or `?pricing=` deep link (quiet no-op). 3. The plan reads "Enterprise" with its renewal date — never another tier's name, price, credits, or feature list. 4. Money-in stays open: top-up and Billing & invoices always reachable. 5. A cancelled or ended Enterprise subscription shows the standard state with no Reactivate/Subscribe action. 6. An unrecognized tier renders as "Current plan" with no borrowed catalog content and no self-serve actions; credits, top-up, and runs keep working, no crash. > Story 5's amended form (ended Enterprise → Subscribe returns, per the 2026-08-21 decision with Justin) is **deliberately out of scope**: billing-api resolves `can_subscribe_self_serve=false` for any enterprise subscription row including ended ones, so that behavior needs a backend change first (contract-first). Tracked as a follow-up. ## Tests - **Unit (321 passing across the 11 touched suites):** new coverage in `tierPricing` (helpers), `useWorkspaceUI` (`canOpenPricingSurface` rail split), `SubscriptionPanelContentWorkspace` (stories 1, 3, 4, 5, 6 + scheduled-change label), `CurrentUserPopoverWorkspace` (menu entry + resubscribe), `usePricingTableUrlLoader` (deep-link no-op + pre-load race), `CreditsTile` (sales-managed pool + inactive state), `CloudRunButtonWrapper` / `useCoreCommands` (upsell suppression), `useWorkspaceMenuItems` (cancel/delete/leave). - **E2E (`browser_tests/tests/dialogs/enterpriseTierCloud.spec.ts`, 7 tests, @cloud):** one per user story against the real cloud build with server-shaped capability mocks (`hideLifecycleCapabilities` shape), plus a Pro-team self-serve regression and an unrecognized-tier no-crash regression. `endedSubscription.spec.ts` additionally pins that a non-enterprise inactive team keeps its Reactivate button. All 10 pass locally against a ComfyUI server serving the cloud dist. - `CloudWorkspaceMockHelper` gained an optional capability-overrides parameter so specs can mock the server's sales-managed shape. ## AS IS / TO BE Screenshots from the real app (cloud dist served by ComfyUI) being attached in a follow-up edit to this description: Plan & Credits panel (Standard-mislabel → Enterprise card), profile menu (Plans & pricing removed), ended-enterprise run button (subscribe upsell removed). Co-authored-by: comfydesigner <247099495+comfydesigner@users.noreply.github.com> (cherry picked from commit bab0873)
…gh server capabilities (#16094) Backport of #16067 to `cloud/1.52`. ## Merge order — this PR is stacked Base is deliberately `backport-16046-to-cloud-1.52`, not `cloud/1.52`. GitHub retargets this PR to `cloud/1.52` once its parent merges. `cloud/1.52` → #15799 → #15803 → #15804 → #15675 → #15967 → #16043 → #16046 → #16067 Every commit in this chain cherry-picks cleanly; there are no hand-resolved conflicts anywhere in the stack. ## Verification Run at the tip of the full stack: 93 unit test files, 1745 tests, 0 failures (`src/platform/workspace`, `src/platform/cloud/subscription`, `src/composables/useCoreCommands.test.ts`, `src/components/actionbar`). ## Also carries #16032 and #16041 #16067's unit tests need mocks (`app.queuePrompt`, `trackWorkflowExecution`, `useQueueSettingsStore`) that #16032 introduced, and its run-gate coverage comes from #16041. Both are already backported independently as #16084 and #16059. This branch therefore contains them; whichever lands first makes the other's patch a no-op. Without #16032 the `useCoreCommands` hunks conflict and 8 tests fail. --------- Co-authored-by: comfydesigner <247099495+comfydesigner@users.noreply.github.com>
…#16067) ## Why this is needed Enterprise workspaces exist in production (`enterprise_monthly` / `enterprise_annual`, provisioned through the comfy-admin console) but the frontend still renders them as a self-serve catalog plan. FE-1662 verified three gaps against the tree, and re-verification after the capabilities migration (#15803/#15804/#15675) and the ENTERPRISE contract landing (#15855) found the surviving surface smaller but real. Supersedes #15403 — same behavioral spec and design of record ([Figma 4404-13011](https://www.figma.com/design/CkFTD4c20PyRGpNVAJgpfV/Team-Plan---Workspaces?node-id=4404-13011), DES-782), rebuilt on the server-capabilities architecture that merged underneath it. Co-authored with @comfydesigner, whose branch this replaces. - Fixes FE-1662 ## Root cause Three distinct causes, one per change group: 1. **Label fallbacks assume the catalog is total.** `resolveSubscriptionTierKey` falls back to `'standard'` for any unmapped tier, so an ENTERPRISE workspace's plan card renders **"Standard"**, Standard's **$20 USD/mo** price (`useWorkspacePlanPricing` has the same fallback), Standard's feature list, and the credits bar borrows Standard's 4,200-credit monthly pool (`CreditsTile.tierKey ?? DEFAULT_TIER_KEY`). A scheduled change to an enterprise plan falls through the `team`-prefix check and labels itself "Standard". 2. **Pricing-table entry points gate on membership, not on whether a catalog exists.** The `?pricing=` deep link (`usePricingTableUrlLoader`), the profile menu's "Plans & pricing", and settings' "View more details about plans & pricing" all gate on `canManageSubscription` (owner), so an Enterprise owner can still open the self-serve pricing table. The subscribe-to-run upsell (`CloudRunButtonWrapper`, `useCoreCommands`) gates only on `canAccessSubscriptionFeatures`, so a lapsed Enterprise workspace is offered a self-serve checkout it must not use. 3. **No representation for a tier outside the catalog.** A tier the build doesn't recognize (server ahead of client) borrowed all of the above from Standard — price and feature claims for a plan the frontend cannot identify. Lifecycle actions (cancel / reactivate / plan change / member invites) are **not** part of this PR's policy surface: the server already resolves them (`hideLifecycleCapabilities` in billing-api keeps `can_top_up=true` and closes the rest), and main already consumes those capabilities. This PR covers rendering and the pricing-catalog entry points only. ## How **One derived policy for every pricing-table entry point.** `useWorkspaceUI.canOpenPricingSurface` reads the server-resolved `can_subscribe_self_serve` on the workspace rail and falls back to membership on `legacy_stripe` — the exact shape of `canReactivatePlan` (#15967), so the legacy-rail regression class that #15967/#16043/#16046 fixed cannot recur here. Consumers: profile-menu "Plans & pricing", settings "View more details", and the `?pricing=` deep link (which now awaits capability initialization before deciding, like the `?topup=` loader, so a pre-load deep link can't slip through). **Tier drives rendering only.** `isSalesManagedTier` (ENTERPRISE or unmapped) hides the catalog price row, benefits list, and borrowed credit pool; `planDisplayName` renders "Enterprise" / "Current plan"; the scheduled-change label resolves enterprise slugs (the only signal on that path — enterprise plans are absent from `plans`); `formatTierName` gains a `te()` guard so an unknown tier degrades to a capitalized string instead of a raw i18n key. The subscribe-to-run upsell and the run-command dialog stay hidden on sales-managed plans (`SubscribeToRun` requires a catalog to sell into); the run button remains a run button. **Capability-driven credits tile.** The inactive-plan zero-state now applies only when the server also withholds top-up (`inactivePlan && !canTopUp`): lapsed self-serve plans keep today's reactivate-to-use-credits treatment (`lapsedSelfServeCapabilities` withholds top-up), while a sales-managed plan — whose top-up stays open whatever the subscription row says — keeps its real balance and Add credits. **Delete workspace hides on Enterprise** (DES-782): deletion requires a cancellation only sales can perform, so the disabled menu item was a permanent dead end. ## Behavioral spec (from #15403, verified by tests) 1. Enterprise owner cannot self-serve any plan change — no upgrade, downgrade, cancel, or reactivate (server capabilities; regression-tested here). 2. The pricing table never appears for an Enterprise workspace — settings, profile menu, or `?pricing=` deep link (quiet no-op). 3. The plan reads "Enterprise" with its renewal date — never another tier's name, price, credits, or feature list. 4. Money-in stays open: top-up and Billing & invoices always reachable. 5. A cancelled or ended Enterprise subscription shows the standard state with no Reactivate/Subscribe action. 6. An unrecognized tier renders as "Current plan" with no borrowed catalog content and no self-serve actions; credits, top-up, and runs keep working, no crash. > Story 5's amended form (ended Enterprise → Subscribe returns, per the 2026-08-21 decision with Justin) is **deliberately out of scope**: billing-api resolves `can_subscribe_self_serve=false` for any enterprise subscription row including ended ones, so that behavior needs a backend change first (contract-first). Tracked as a follow-up. ## Tests - **Unit (321 passing across the 11 touched suites):** new coverage in `tierPricing` (helpers), `useWorkspaceUI` (`canOpenPricingSurface` rail split), `SubscriptionPanelContentWorkspace` (stories 1, 3, 4, 5, 6 + scheduled-change label), `CurrentUserPopoverWorkspace` (menu entry + resubscribe), `usePricingTableUrlLoader` (deep-link no-op + pre-load race), `CreditsTile` (sales-managed pool + inactive state), `CloudRunButtonWrapper` / `useCoreCommands` (upsell suppression), `useWorkspaceMenuItems` (cancel/delete/leave). - **E2E (`browser_tests/tests/dialogs/enterpriseTierCloud.spec.ts`, 7 tests, @cloud):** one per user story against the real cloud build with server-shaped capability mocks (`hideLifecycleCapabilities` shape), plus a Pro-team self-serve regression and an unrecognized-tier no-crash regression. `endedSubscription.spec.ts` additionally pins that a non-enterprise inactive team keeps its Reactivate button. All 10 pass locally against a ComfyUI server serving the cloud dist. - `CloudWorkspaceMockHelper` gained an optional capability-overrides parameter so specs can mock the server's sales-managed shape. ## AS IS / TO BE Screenshots from the real app (cloud dist served by ComfyUI) being attached in a follow-up edit to this description: Plan & Credits panel (Standard-mislabel → Enterprise card), profile menu (Plans & pricing removed), ended-enterprise run button (subscribe upsell removed). Co-authored-by: comfydesigner <247099495+comfydesigner@users.noreply.github.com>
|
|
|
|
|
|
Points every Cloud billing consumer at the server-resolved capabilities composable and deletes the client-side derivation it replaces.
This is where rendered behaviour changes. The rest of the stack was generated output, a dormant source, and tests.
Three things ride together because splitting them produces a commit that does not build:
canTopUpoffWorkspacePermissions— a property this change removes.The loader now awaits capability initialization before reading the flags, so an eligible user does not lose the
?topup=deep link while both are still at their initialfalse.Behaviour reviewers should agree to
An unsubscribed Cloud owner now sees "Add Credits" alongside "Subscribe", where they previously saw only "Subscribe". The old behaviour came from a client-side
topUpAccessinference; that policy now lives server-side, and the resolver returnscan_top_up=truefor a workspace with no subscription row. The component renders what the server grants, so the guard belongs in the resolver —cloud#7342addresses it.Enterprise handling is preserved.
#15855landed the ENTERPRISE tier while this was in flight and modified thebillingPolicy*files deleted here; its own description names this stack as the intended end state, with only the tier-label mapping surviving.useWorkspaceTierLabel'sENTERPRISE: 'enterprise'and the locale key are retained and byte-identical to that PR.Merge checklist — rollout flags
With the capability rollout flags off, the server returns
can_top_up=true/can_subscribe_self_serve=falsefor every workspace: every cloud user sees "Add credits" and nobody sees the subscribe upsell. Prod runs a pinnedfrontendVersion(currently1.51.9), so merging here does not ship — but this must be settled before a backport reaches acloud/1.5xrelease branch.@comfyorg/ingest-types— [chore] Update Ingest API types from cloud@16c40f37e5 #15802, corrected by [chore] Restore bot-projected ingest types #15878 to the pipeline-projected outputcloud#7342— merged 2026-08-25 21:18; verified on cloudmaindreamboothy-dev) — they did not exist; created disabled at 0% mirroring prodcloud#7342(image16b468b, auto-deployed by Image Updater). Notecan_downgrade_to_personalis rollout-gated too, so downgrade CTAs stay dark until flags-oncloud#7342, then setactive: trueand ramp as a canaryKnown residual:
can_top_up=falsestill carries three meanings (not owner / free tier / no subscription), soCreditsTile'sv-elsecan show "Upgrade to add credits" to a member who cannot upgrade. Tracked via the proposedtop_up_denied_reasonon thecloud#7223discussion.Verification
pnpm typecheck,typecheck:browser,lintclean. Full unit suite: 17,758 passed; the 12check-binary-sizefailures are pre-existing and environmental.