Repository navigation
fix(billing): tolerate subscription tiers absent from the personal catalog - #15838
dante01yoon wants to merge 2 commits into
Conversation
…talog Resurrects the closed #15396 on current main. The ingest SubscriptionTier enum gained ENTERPRISE (cloud#6874), so the next generated-types update (#15813) fails vue-tsc: toTierKey indexes a Record of the five personal catalog tiers, and deriveBillingPolicyState's exhaustive switch rejects the new member. Both now degrade to their restrictive fallbacks instead of failing the build, so a backend tier addition can never break the frontend again. The fallback is compatibility-only, not policy: an unrecognised tier resolves to the no-subscription state deliberately. Server-resolved capabilities remain the policy source; the Enterprise rendering follows in its own PR once #15813 lands. Co-Authored-By: Wei Hai <wei@comfy.org>
🎭 Playwright: ✅ 1997 passed, 0 failed · 1 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook📦 Bundle: 9.14 MB gzip 🔴 +3 BDetailsSummary
Category Glance App Entry Points — 3.71 kB (baseline 3.71 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.4 MB (baseline 1.4 MB) • ⚪ 0 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 — 591 kB (baseline 591 kB) • ⚪ 0 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 — 125 kB (baseline 125 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 7 added / 7 removed / 1 unchanged UI Components — 112 kB (baseline 112 kB) • ⚪ 0 BReusable component library chunks
Status: 7 added / 7 removed / 8 unchanged Data & Services — 3.44 MB (baseline 3.44 MB) • 🔴 +198 BStores, services, APIs, and repositories
Status: 14 added / 14 removed / 3 unchanged Utilities & Hooks — 549 kB (baseline 549 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 18 added / 18 removed / 19 unchanged Vendor & Third-Party — 18.1 MB (baseline 18.1 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 18 unchanged Other — 14.3 MB (baseline 14.3 MB) • ⚪ 0 BBundles that do not match a named category
Status: 70 added / 70 removed / 220 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-08-25T00:15:55.260Z",
"gitSha": "d1f00fc0bec2d71fd98b1e60f17559ee751b7e46",
"branch": "dante/tolerate-unknown-subscription-tiers",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2090.4449999999883,
"styleRecalcs": 6,
"styleRecalcDurationMs": 5.196000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 547.163,
"heapDeltaBytes": -13298764,
"heapUsedBytes": 55923764,
"domNodes": -282,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 8.294999999999998,
"eventListeners": -157,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-idle",
"durationMs": 2053.724999999986,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.281999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 478.60600000000005,
"heapDeltaBytes": 235384,
"heapUsedBytes": 68720608,
"domNodes": -282,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 8.047,
"eventListeners": -185,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2204.8939999999675,
"styleRecalcs": 80,
"styleRecalcDurationMs": 40.338,
"layouts": 12,
"layoutDurationMs": 3.162,
"taskDurationMs": 1212.1589999999999,
"heapDeltaBytes": 4979680,
"heapUsedBytes": 74199028,
"domNodes": -279,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 162.235,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2178.1949999999597,
"styleRecalcs": 78,
"styleRecalcDurationMs": 37.540000000000006,
"layouts": 12,
"layoutDurationMs": 3.1870000000000003,
"taskDurationMs": 1190.872,
"heapDeltaBytes": 4717900,
"heapUsedBytes": 73831368,
"domNodes": -282,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 155.71500000000003,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1723.7399999999639,
"styleRecalcs": 31,
"styleRecalcDurationMs": 16.737,
"layouts": 6,
"layoutDurationMs": 0.646,
"taskDurationMs": 346.835,
"heapDeltaBytes": 4379816,
"heapUsedBytes": 74310960,
"domNodes": 74,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 9.944999999999999,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1734.886000000074,
"styleRecalcs": 31,
"styleRecalcDurationMs": 13.673,
"layouts": 6,
"layoutDurationMs": 0.48399999999999993,
"taskDurationMs": 341.477,
"heapDeltaBytes": 4360600,
"heapUsedBytes": 73544632,
"domNodes": 74,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 10.359999999999998,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 709.8290000000134,
"styleRecalcs": 11,
"styleRecalcDurationMs": 7.308999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 423.508,
"heapDeltaBytes": -6047748,
"heapUsedBytes": 64160072,
"domNodes": 18,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 30.494,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 722.1190000000206,
"styleRecalcs": 10,
"styleRecalcDurationMs": 6.673,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 428.37699999999995,
"heapDeltaBytes": -6888256,
"heapUsedBytes": 62296476,
"domNodes": 16,
"jsHeapTotalBytes": 6029312,
"scriptDurationMs": 31.652,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-idle",
"durationMs": 2072.4759999999947,
"styleRecalcs": 5,
"styleRecalcDurationMs": 6.088000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 562.119,
"heapDeltaBytes": -18840888,
"heapUsedBytes": 71851504,
"domNodes": -268,
"jsHeapTotalBytes": -528384,
"scriptDurationMs": 37.105,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-idle",
"durationMs": 2039.1100000000506,
"styleRecalcs": 4,
"styleRecalcDurationMs": 3.3450000000000006,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 563.4380000000001,
"heapDeltaBytes": -22034156,
"heapUsedBytes": 69206368,
"domNodes": -281,
"jsHeapTotalBytes": 3403776,
"scriptDurationMs": 41.18599999999999,
"eventListeners": -183,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-pan",
"durationMs": 3333.8830000000144,
"styleRecalcs": 67,
"styleRecalcDurationMs": 11.536,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 2651.839,
"heapDeltaBytes": 6111008,
"heapUsedBytes": 97862504,
"domNodes": -284,
"jsHeapTotalBytes": 4939776,
"scriptDurationMs": 964.645,
"eventListeners": -181,
"totalBlockingTimeMs": 25,
"frameDurationMs": 16.666666666666636,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 3305.0040000000536,
"styleRecalcs": 66,
"styleRecalcDurationMs": 10.334999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 2645.7699999999995,
"heapDeltaBytes": -25290564,
"heapUsedBytes": 66700492,
"domNodes": -283,
"jsHeapTotalBytes": 4714496,
"scriptDurationMs": 975.6199999999999,
"eventListeners": -181,
"totalBlockingTimeMs": 21,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 4274.270000000001,
"styleRecalcs": 66,
"styleRecalcDurationMs": 10.675,
"layouts": 60,
"layoutDurationMs": 7.0009999999999994,
"taskDurationMs": 2459.407,
"heapDeltaBytes": 8695752,
"heapUsedBytes": 74990100,
"domNodes": 24,
"jsHeapTotalBytes": 1048576,
"scriptDurationMs": 855.365,
"eventListeners": 12,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "large-graph-zoom",
"durationMs": 4248.540000000048,
"styleRecalcs": 66,
"styleRecalcDurationMs": 10.339999999999998,
"layouts": 60,
"layoutDurationMs": 6.961,
"taskDurationMs": 2454.8450000000003,
"heapDeltaBytes": 7843036,
"heapUsedBytes": 74122184,
"domNodes": 24,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 859.152,
"eventListeners": 10,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "legacy-node-drag",
"durationMs": 3150.9659999999826,
"styleRecalcs": 41,
"styleRecalcDurationMs": 5.172,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1998.9409999999998,
"heapDeltaBytes": 12663084,
"heapUsedBytes": 80563024,
"domNodes": 0,
"jsHeapTotalBytes": 942080,
"scriptDurationMs": 208.421,
"eventListeners": 188,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666636,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "legacy-node-drag",
"durationMs": 3123.156999999992,
"styleRecalcs": 41,
"styleRecalcDurationMs": 4.8969999999999985,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1989.0760000000002,
"heapDeltaBytes": 12029324,
"heapUsedBytes": 80172132,
"domNodes": 0,
"jsHeapTotalBytes": 1204224,
"scriptDurationMs": 197.77000000000004,
"eventListeners": 188,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666636,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 1997.1030000000383,
"styleRecalcs": 2,
"styleRecalcDurationMs": 1.6360000000000021,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 493.6950000000001,
"heapDeltaBytes": 8799924,
"heapUsedBytes": 73819096,
"domNodes": -274,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 35.504999999999995,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2032.726999999909,
"styleRecalcs": 2,
"styleRecalcDurationMs": 2.0079999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 524.8749999999999,
"heapDeltaBytes": -21829212,
"heapUsedBytes": 72928380,
"domNodes": -279,
"jsHeapTotalBytes": -790528,
"scriptDurationMs": 33.535,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 738.3469999999761,
"styleRecalcs": 46,
"styleRecalcDurationMs": 9.331,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 512.1080000000001,
"heapDeltaBytes": 17769880,
"heapUsedBytes": 88071928,
"domNodes": 18,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 143.92100000000002,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 724.542999999926,
"styleRecalcs": 46,
"styleRecalcDurationMs": 9.441,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 515.656,
"heapDeltaBytes": 17834164,
"heapUsedBytes": 87619592,
"domNodes": 18,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 136.473,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2008.404999999982,
"styleRecalcs": 7,
"styleRecalcDurationMs": 6.244999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 463.5,
"heapDeltaBytes": 2781660,
"heapUsedBytes": 65845976,
"domNodes": -297,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 6.995999999999999,
"eventListeners": -231,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2004.0940000000091,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.123,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 463.456,
"heapDeltaBytes": -10127260,
"heapUsedBytes": 59597536,
"domNodes": -296,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 7.396,
"eventListeners": -201,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1823.3559999999898,
"styleRecalcs": 77,
"styleRecalcDurationMs": 36.013000000000005,
"layouts": 16,
"layoutDurationMs": 4.617000000000001,
"taskDurationMs": 1076.972,
"heapDeltaBytes": -4613820,
"heapUsedBytes": 65301960,
"domNodes": -297,
"jsHeapTotalBytes": 6021120,
"scriptDurationMs": 113.045,
"eventListeners": -201,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1840.9599999999955,
"styleRecalcs": 77,
"styleRecalcDurationMs": 35.362,
"layouts": 16,
"layoutDurationMs": 4.098,
"taskDurationMs": 1075.758,
"heapDeltaBytes": -2740976,
"heapUsedBytes": 68095504,
"domNodes": -295,
"jsHeapTotalBytes": 6807552,
"scriptDurationMs": 112.93700000000001,
"eventListeners": -199,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-transition-enter",
"durationMs": 1384.0040000000045,
"styleRecalcs": 19,
"styleRecalcDurationMs": 31.519,
"layouts": 14,
"layoutDurationMs": 14.338,
"taskDurationMs": 890.1300000000001,
"heapDeltaBytes": 19715016,
"heapUsedBytes": 102219508,
"domNodes": 13671,
"jsHeapTotalBytes": 11272192,
"scriptDurationMs": 28.850999999999996,
"eventListeners": 2381,
"totalBlockingTimeMs": 135,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "viewport-pan-sweep",
"durationMs": 12413.172999999972,
"styleRecalcs": 247,
"styleRecalcDurationMs": 33.49,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9069.313000000002,
"heapDeltaBytes": 1368044,
"heapUsedBytes": 92486768,
"domNodes": -282,
"jsHeapTotalBytes": 4907008,
"scriptDurationMs": 3179.0080000000003,
"eventListeners": -129,
"totalBlockingTimeMs": 20,
"frameDurationMs": 16.66333333333338,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 12363.81599999993,
"styleRecalcs": 247,
"styleRecalcDurationMs": 33.366,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9037.642,
"heapDeltaBytes": 1522504,
"heapUsedBytes": 92202188,
"domNodes": -282,
"jsHeapTotalBytes": 4382720,
"scriptDurationMs": 3178.764,
"eventListeners": -129,
"totalBlockingTimeMs": 20,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 16965.104999999996,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16378.668999999998,
"heapDeltaBytes": -35134836,
"heapUsedBytes": 176871156,
"domNodes": -6548,
"jsHeapTotalBytes": -5967872,
"scriptDurationMs": 319.11999999999995,
"eventListeners": -7475,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.779999999999927,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 16932.924999999956,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16411.076999999997,
"heapDeltaBytes": -34830108,
"heapUsedBytes": 176713392,
"domNodes": -6548,
"jsHeapTotalBytes": -6426624,
"scriptDurationMs": 318.578,
"eventListeners": -7473,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 20838.38700000001,
"styleRecalcs": 175,
"styleRecalcDurationMs": 17.680999999999976,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 20474.332000000002,
"heapDeltaBytes": -23095932,
"heapUsedBytes": 188081888,
"domNodes": -6548,
"jsHeapTotalBytes": -6496256,
"scriptDurationMs": 927.377,
"eventListeners": -7471,
"totalBlockingTimeMs": 38,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 20539.54699999997,
"styleRecalcs": 175,
"styleRecalcDurationMs": 16.913999999999984,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 20140.788,
"heapDeltaBytes": -21015980,
"heapUsedBytes": 185259996,
"domNodes": -6548,
"jsHeapTotalBytes": -2748416,
"scriptDurationMs": 903.4619999999999,
"eventListeners": -7467,
"totalBlockingTimeMs": 42,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "workflow-execution",
"durationMs": 512.4630000000252,
"styleRecalcs": 14,
"styleRecalcDurationMs": 22.308,
"layouts": 3,
"layoutDurationMs": 0.754,
"taskDurationMs": 130.84099999999998,
"heapDeltaBytes": 5498252,
"heapUsedBytes": 72383600,
"domNodes": 126,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 7.417,
"eventListeners": 99,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "workflow-execution",
"durationMs": 123.6620000000812,
"styleRecalcs": 7,
"styleRecalcDurationMs": 16.483999999999998,
"layouts": 3,
"layoutDurationMs": 1.343,
"taskDurationMs": 95.54199999999999,
"heapDeltaBytes": 3349532,
"heapUsedBytes": 69952720,
"domNodes": 128,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 5.294999999999999,
"eventListeners": 27,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
}
]
} |
|
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 makes subscription tier handling tolerant of runtime values outside the personal catalog and generated tier union. Unknown pricing tiers return ChangesSubscription tier compatibility
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change narrowly adds compatibility handling for subscription tiers outside the personal catalog and includes targeted regression coverage plus typecheck verification; no actionable merge-blocking risk remains beyond normal checks and review. Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 inconclusive)
✅ Passed checks (6 passed)
Full details: Description checkExplanation The description provides the cause, affected code paths, implementation details, deliberate limitations, verification results, and scope. It does not use the exact template headings, but it contains the required information and is complete. Full details: Linked Issues checkExplanation The changes satisfy the coding objectives in [ Full details: End-To-End Regression Coverage For FixesExplanation The changed-file list and PR description are available, but the PR title and commit subjects are not available in the review context. The check requires commit-subject evidence when commit subjects are unavailable, so the bug-fix signal cannot be established without guessing. The PR changes ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 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 |
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #15838 +/- ##
==========================================
+ Coverage 80.02% 82.43% +2.41%
==========================================
Files 2251 1921 -330
Lines 114235 109240 -4995
Branches 31608 31634 +26
==========================================
- Hits 91416 90053 -1363
+ Misses 22348 18857 -3491
+ Partials 471 330 -141
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 338 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Covers the one patch line codecov flagged: a null catalog key (workspace-level or unrecognised tier) must not read as unpaid.
1c6606a to
86f91d3
Compare
Stacked on the ingest-types regeneration (#15813) and the tier guard (#15838). ENTERPRISE now arrives through the generated union, so the policy derivation matches it as a typed case instead of string-sniffing tier or plan_slug: active takes the team policy states, lapsed keeps a dedicated Enterprise state so a sales-managed customer is never shown the personal subscribe upsell. The workspace tier label maps ENTERPRISE and tolerates lowercase plan slugs (enterprise_monthly). No regression to existing tiers: a characterization matrix pins all 28 pre-ENTERPRISE input combinations in both distributions, and the same matrix passes unchanged against main's implementation.
…act (#15855) ## Why this is needed Enterprise workspaces exist in production (cloud#6873 provisioned the plan rows, cloud#6874 published the tier in the contract), but the frontend cannot represent them: the tier label renders nothing and a lapsed Enterprise workspace is classified as an ordinary no-subscription state, exposing the personal subscribe upsell to a sales-managed customer. The prior attempt (#15403) blocked on deriving this from `tier`/`plan_slug` string-sniffing because the generated enum could not carry `ENTERPRISE`. It can now — this PR consumes it as a typed contract value, no hand-declared or inferred types anywhere. ## Stack — merge order 1. #15838 — tier guard (makes main tolerate unknown tiers) 2. #15813 — ingest-types regeneration (bot-generated, brings `ENTERPRISE` into the union) 3. **this PR** — typed Enterprise rendering This branch is stacked on both, so the diff shown against `main` includes their commits until they merge; the ENTERPRISE handling itself is the single commit `e7c9ca9` (139 lines, 9 files). ## Root cause `deriveBillingPolicyState` had no representation for a workspace-level, sales-managed tier: active-or-lapsed Enterprise fell through to either the Team branch (never — `isTeamPlan` is false for it) or the generic `WithoutActiveSubscription`, whose capabilities row upsells self-serve subscribe. The tier label map simply had no `ENTERPRISE` entry, and cloud sends lowercase plan slugs (`enterprise_monthly`) that the uppercase-keyed matcher missed. ## How it changes - `deriveBillingPolicyState`: typed `input.tier === 'ENTERPRISE'` branch — active → `{Cloud,Local}AndTeam` (existing team policy), lapsed → new `{Cloud,Local}EnterpriseWithoutActiveSubscription` state. - `getBillingPolicyCapabilities`: rows for the new states — `topUpAccess: 'allowed'`, `showsSubscribeUpsellUI: false`. Sales-managed reactivation goes through sales, so unlike the lapsed self-serve Team state it neither withholds top-up nor upsells. This matches the server-side capability resolver, which resolves `can_subscribe_self_serve=false` while leaving `can_top_up` open for Enterprise (verified by executing cloud's resolver during the cloud#7223 review). - `useWorkspaceTierLabel`: `ENTERPRISE → 'enterprise'` label key; plan-slug matching now uppercases first so cloud's lowercase slugs resolve. - Locale: `subscription.tiers.enterprise.name`. These policy rows live in the client-side layer that the capabilities migration stack (#15802–#15675) later deletes in favor of server-resolved `can_*` values — at which point only the label mapping survives. That is the intended end state; this PR is the bridge that makes Enterprise render correctly until then. ## Regression guarantee - **Characterization matrix**: a new test pins all 28 pre-ENTERPRISE input combinations (7 tiers × canAccess × isTeamPlan) in both distributions. The identical matrix was executed against `main`'s implementation — 28/28 pass — proving every non-ENTERPRISE input produces byte-identical output before and after. - **Exhaustive capabilities table**: the per-state test enumerates every `BillingPolicyState` kind; adding a state without a row is a compile error, and every pre-existing row is unchanged. - 26 test files / 380 tests green across `src/platform/cloud/subscription` and the tier-label suite; `pnpm typecheck` green against the regenerated types. - Unknown-future-tier behavior from #15838 retained and re-pinned with a non-ENTERPRISE exemplar. ## AS-IS / TO-BE - AS-IS: Enterprise workspace shows no tier label; lapsed Enterprise sees personal subscribe/upgrade upsell. - TO-BE: "Enterprise" label renders from the typed tier (including from `enterprise_monthly`/`enterprise_annual` plan slugs); lapsed Enterprise keeps top-up but never sees self-serve upsell. UI screenshots require an Enterprise-provisioned cloud workspace; the rendered-behavior coverage here is the unit matrix plus the full Playwright suite on CI. Real-app captures can be added once a staging Enterprise workspace is available. --------- Co-authored-by: dante01yoon <6510430+dante01yoon@users.noreply.github.com> Co-authored-by: Wei Hai <wei@comfy.org> Co-authored-by: GitHub Action <action@github.com>
Why this is needed
cloud#6874 added
ENTERPRISEto the ingestSubscriptionTierenum, and the regenerated types have already arrived on the frontend as #15813. That PR is red right now, and stays red until this lands. Until it merges, every backend change to the ingest OpenAPI spec is blocked from reaching the frontend, because the projection workflow reuses the single fixed-branch PR.This PR resurrects the closed #15396 (unchanged in intent, rebased onto current main — one test-location conflict resolved) rather than re-deriving the fix. Credit to @wei-hai for the original.
Root cause
Two consumers of the generated tier union assume the union is closed:
tierPricing.ts:61—toTierKeyindexesTIER_TO_KEY[tier], aRecordof the five personal-catalog tiers. A sixth member fails with TS7053.useBillingPolicyState.ts:47—deriveBillingPolicyState's switch ends ininput.tier satisfies never. A new member fails with TS1360/TS2322.Exact errors, reproduced on #15813's
lint-and-formatrun:Found 3 errors in 2 files.The union is generated from the backend spec, so it can gain members without any frontend change. Consumers must tolerate that, not fail the build.
How it changes
toTierKeynarrows with anObject.hasOwntype guard and returnsnullfor any tier outside the personal catalog (TEAM, ENTERPRISE, future tiers, and non-string junk from unvalidated JSON).satisfies neverbecomes a fail-closed fallback to the restrictive no-subscription state, explicitly commented as compatibility-only, not a policy signal — an unrecognised tier must not inherittopUpAccess: 'allowed'just because this build doesn't know it.case 'ENTERPRISE'on purpose: the literal isn't in the union until [chore] Update Ingest API types from cloud@2f554c4 #15813 merges, so referencing it here would not compile. The proper Enterprise rendering (label, hidden self-serve surfaces) follows in its own PR on top of the regenerated types.Verification
vitest: 31 tests pass across both touched suites, including the new unrecognised-tier, inherited-property (__proto__/constructor), and non-string-input guards.pnpm typecheckpasses against current types (no ENTERPRISE) — safe to merge now.pnpm typecheckalso passes with [chore] Update Ingest API types from cloud@2f554c4 #15813's regeneratedpackages/ingest-typesoverlaid — proves [chore] Update Ingest API types from cloud@2f554c4 #15813 goes green once this lands.AS-IS / TO-BE
Type-level guard only — no rendered UI change in the app today (the fallback state is only reachable once a tier outside the current union arrives at runtime). Regression coverage is the test suite above rather than screenshots.
Known, deliberate limitation (inherited from #15396, called out in the code comment): until the Enterprise rendering PR lands, an active ENTERPRISE workspace resolves to the restrictive no-subscription state — fail-closed on access, wrong on intent. That window is why the Enterprise feature PR follows immediately after #15813.