Repository navigation
feat(billing): members get the ending heads-up too - #16940
comfydesigner wants to merge 16 commits into
Conversation
The amber state card fired for a cancelled or an ended subscription. Cancelled earns it: the plan is still running and the card names the date features stop, so it is a heads-up with a deadline. Ended does not — by then the panel heading, the plan status and the credits tile already say the plan is over, and the card is a fourth telling of the same fact. It is also the wrong treatment, not just redundant. Warning border over warning fill makes it the loudest element in the panel, which puts a terminal, non-actionable state above the payment-failed banner in the visual hierarchy, and it pairs that fill with an info icon our convention reserves for notices. It has no design of record. Gate the card on cancelled-and-still-running and let an Inactive badge on the plan name carry the ended state. The ended card's title and description lose their only caller and are removed from all locales.
The ended-state assertions keyed on "Your subscription has ended", a string this branch deletes from every locale. A query for text that can no longer render always passes, so those six assertions would have gone on passing had the card kept rendering for an ended subscription — the exact regression they exist to catch. Give the card a data-testid and assert on the element. Where an ended case asserted both removed strings plus the cancelled description, one absence check on the card now covers all three. Pin the other direction too: a cancelled Enterprise plan that is still running keeps the card, not just the Canceled badge.
Dropping the ended card left the Personal case with nothing in its place. The badge was gated on being outside a Personal workspace, so a lapsed Personal plan that cannot self-serve rendered its old paid identity and price beside a Cancel plan button, with no badge, no card and a blank date — reading as a live subscription. The card it replaced never made that distinction, so the badge should not either. Ended is ended, wherever the workspace lives.
toHaveCount(0) is satisfied by an empty page, so both card-removal regressions could pass against a panel that had not finished loading — the card could come back and the tests would stay green. Order a positive signal ahead of each absence check: the Enterprise heading and Inactive badge in the sales-managed spec, and the billing portal button in the Personal one, which renders whichever branch that workspace takes.
An Enterprise workspace whose contract gets an end date from sales no longer shows the amber cancelled card, Canceled badge, or an early "Ends on" line the moment the date lands, which could read as broken months ahead of time. Until 14 days before the end date (SALES_MANAGED_ENDING_NOTICE_DAYS) the plan renders as plainly active. Inside the window, owners get the muted ending banner with Enterprise-specific copy pointing to sales, and never a Reactivate action. Once the date passes, the existing Inactive handling applies unchanged. Self-serve Team plans keep their current behavior: banner immediately on cancellation, team copy, Reactivate, amber card.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (26)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughSubscription panels and billing banners now distinguish inactive subscriptions from cancellations and show ending notices for eligible Enterprise and team plans. The changes also update related tests and translations, and adjust WebGL context setup for two canvas types. ChangesSubscription status and billing notices
WebGL context setup
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant WorkspaceView
participant useBillingBanner
participant deriveBillingBanner
participant BillingStatusBanner
WorkspaceView->>useBillingBanner: Read subscription and plan tier
useBillingBanner->>deriveBillingBanner: Pass subscription state and current timestamp
deriveBillingBanner-->>useBillingBanner: Return ending state when applicable
useBillingBanner-->>BillingStatusBanner: Provide derived banner state
BillingStatusBanner-->>WorkspaceView: Render role- and plan-specific notice
Possibly related PRs
Suggested labels: Merge Risk: 🔵 Low · up to Members who have run out of credits may see an ending notice that incorrectly suggests they can still run workflows. This is a bounded messaging issue; the change is otherwise mergeable with owner awareness. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to Members gain a read-only ending notice, not a billing action. However, turning off the banner rollout does not restore the previous Enterprise cancellation warning, leaving some users with a less prominent heads-up before the workspace ends. Retained concerns
Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 7✅ Passed checks (7 passed)
✨ Finishing Touches 💡 1⚔️ Resolve merge conflicts 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
🎭 Playwright: ✅ 1910 passed, 0 failed · 3 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook📦 Bundle Size
⚡ Performance Report
Absolute values
Raw data{
"timestamp": "2026-09-04T22:44:07.072Z",
"gitSha": "e148928435ce4eec43e49623553646cc9387a4be",
"branch": "comfydesigner/member-ending-banner",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2047.1529999999802,
"styleRecalcs": 10,
"styleRecalcDurationMs": 10.989,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 613.7920000000001,
"heapDeltaBytes": 10291652,
"heapUsedBytes": 79130968,
"domNodes": -279,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 12.796000000000001,
"eventListeners": -180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-idle",
"durationMs": 2039.3849999999247,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.077,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 550.333,
"heapDeltaBytes": -12176716,
"heapUsedBytes": 58278436,
"domNodes": -282,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 10.193999999999999,
"eventListeners": -150,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2033.6609999999382,
"styleRecalcs": 81,
"styleRecalcDurationMs": 50.434,
"layouts": 14,
"layoutDurationMs": 5.908,
"taskDurationMs": 1073.9509999999998,
"heapDeltaBytes": 1092180,
"heapUsedBytes": 71108304,
"domNodes": -278,
"jsHeapTotalBytes": 6545408,
"scriptDurationMs": 187.16299999999998,
"eventListeners": -184,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1856.956000000082,
"styleRecalcs": 77,
"styleRecalcDurationMs": 40.64900000000001,
"layouts": 14,
"layoutDurationMs": 4.616,
"taskDurationMs": 892.8699999999998,
"heapDeltaBytes": -8158096,
"heapUsedBytes": 62634480,
"domNodes": -279,
"jsHeapTotalBytes": 4448256,
"scriptDurationMs": 159.294,
"eventListeners": -150,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1739.8650000000089,
"styleRecalcs": 31,
"styleRecalcDurationMs": 20.151999999999997,
"layouts": 6,
"layoutDurationMs": 1.245,
"taskDurationMs": 386.721,
"heapDeltaBytes": 4745252,
"heapUsedBytes": 75059140,
"domNodes": 76,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 11.127,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1681.805000000054,
"styleRecalcs": 32,
"styleRecalcDurationMs": 18.672,
"layouts": 6,
"layoutDurationMs": 1.17,
"taskDurationMs": 415.31399999999996,
"heapDeltaBytes": 5048004,
"heapUsedBytes": 75568080,
"domNodes": 77,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 14.296000000000003,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 699.5620000000145,
"styleRecalcs": 12,
"styleRecalcDurationMs": 8.292,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 487.71799999999996,
"heapDeltaBytes": 18235036,
"heapUsedBytes": 88535696,
"domNodes": 20,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 168.98,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 712.4979999999823,
"styleRecalcs": 11,
"styleRecalcDurationMs": 8.610000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 479.07800000000003,
"heapDeltaBytes": 18105492,
"heapUsedBytes": 88092412,
"domNodes": 18,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 169.67399999999998,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2030.7739999999512,
"styleRecalcs": 5,
"styleRecalcDurationMs": 5.317000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 686.6589999999999,
"heapDeltaBytes": 11185392,
"heapUsedBytes": 87187796,
"domNodes": -272,
"jsHeapTotalBytes": -2199552,
"scriptDurationMs": 36.77699999999999,
"eventListeners": -178,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2043.215000000032,
"styleRecalcs": 5,
"styleRecalcDurationMs": 4.677999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 677.117,
"heapDeltaBytes": -13721932,
"heapUsedBytes": 86946196,
"domNodes": -267,
"jsHeapTotalBytes": -589824,
"scriptDurationMs": 39.315000000000005,
"eventListeners": -148,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2965.3150000000323,
"styleRecalcs": 64,
"styleRecalcDurationMs": 10.600999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1895.2619999999997,
"heapDeltaBytes": 16655296,
"heapUsedBytes": 93794008,
"domNodes": -276,
"jsHeapTotalBytes": -2498560,
"scriptDurationMs": 929.286,
"eventListeners": -176,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2621.9220000000405,
"styleRecalcs": 65,
"styleRecalcDurationMs": 10.831,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1772.195,
"heapDeltaBytes": 27187020,
"heapUsedBytes": 92900268,
"domNodes": -271,
"jsHeapTotalBytes": 225280,
"scriptDurationMs": 872.4269999999999,
"eventListeners": -178,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3720.9699999999657,
"styleRecalcs": 60,
"styleRecalcDurationMs": 10.514000000000003,
"layouts": 60,
"layoutDurationMs": 12.761999999999999,
"taskDurationMs": 1785.851,
"heapDeltaBytes": 11741380,
"heapUsedBytes": 79979748,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 806.268,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3574.6619999999893,
"styleRecalcs": 60,
"styleRecalcDurationMs": 9.945999999999996,
"layouts": 60,
"layoutDurationMs": 12.18,
"taskDurationMs": 1703.8369999999998,
"heapDeltaBytes": 8491916,
"heapUsedBytes": 76125952,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 775.083,
"eventListeners": 10,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3141.8280000000323,
"styleRecalcs": 40,
"styleRecalcDurationMs": 4.955000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1943.346,
"heapDeltaBytes": 17840284,
"heapUsedBytes": 85873264,
"domNodes": 0,
"jsHeapTotalBytes": 417792,
"scriptDurationMs": 964.4939999999999,
"eventListeners": 188,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "legacy-node-drag",
"durationMs": 3118.003999999928,
"styleRecalcs": 40,
"styleRecalcDurationMs": 5.028999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1924.3970000000002,
"heapDeltaBytes": 17038836,
"heapUsedBytes": 84653288,
"domNodes": 0,
"jsHeapTotalBytes": 942080,
"scriptDurationMs": 955.388,
"eventListeners": 188,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2002.4200000000292,
"styleRecalcs": 2,
"styleRecalcDurationMs": 1.8209999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 589.8919999999999,
"heapDeltaBytes": 22246836,
"heapUsedBytes": 88371924,
"domNodes": -273,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 35.288,
"eventListeners": -150,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2028.854000000024,
"styleRecalcs": 2,
"styleRecalcDurationMs": 2.349,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 684.5819999999999,
"heapDeltaBytes": 10623268,
"heapUsedBytes": 87784064,
"domNodes": -275,
"jsHeapTotalBytes": -2461696,
"scriptDurationMs": 38.86999999999999,
"eventListeners": -178,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 606.661000000031,
"styleRecalcs": 47,
"styleRecalcDurationMs": 11.947000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 415.3,
"heapDeltaBytes": 15131064,
"heapUsedBytes": 88105864,
"domNodes": 20,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 144.78799999999998,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 668.9579999999751,
"styleRecalcs": 46,
"styleRecalcDurationMs": 11.508000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 454.08899999999994,
"heapDeltaBytes": 15197284,
"heapUsedBytes": 88116092,
"domNodes": 18,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 150.88800000000003,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2007.1709999999712,
"styleRecalcs": 10,
"styleRecalcDurationMs": 10.046,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 537.8609999999999,
"heapDeltaBytes": -8326168,
"heapUsedBytes": 64724632,
"domNodes": -294,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 9.929999999999998,
"eventListeners": -196,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2021.127999999976,
"styleRecalcs": 10,
"styleRecalcDurationMs": 9.075,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 531.6919999999999,
"heapDeltaBytes": 400472,
"heapUsedBytes": 73312496,
"domNodes": -296,
"jsHeapTotalBytes": 6021120,
"scriptDurationMs": 8.927000000000001,
"eventListeners": -226,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1756.4710000000332,
"styleRecalcs": 77,
"styleRecalcDurationMs": 40.38999999999999,
"layouts": 18,
"layoutDurationMs": 6.013,
"taskDurationMs": 888.4459999999999,
"heapDeltaBytes": -12069820,
"heapUsedBytes": 60833796,
"domNodes": -295,
"jsHeapTotalBytes": 6545408,
"scriptDurationMs": 117.13900000000001,
"eventListeners": -196,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1731.4830000000256,
"styleRecalcs": 77,
"styleRecalcDurationMs": 38.847,
"layouts": 18,
"layoutDurationMs": 5.058,
"taskDurationMs": 854.4340000000001,
"heapDeltaBytes": -14645412,
"heapUsedBytes": 58197456,
"domNodes": -296,
"jsHeapTotalBytes": 7331840,
"scriptDurationMs": 110.821,
"eventListeners": -196,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 1400.3830000000335,
"styleRecalcs": 20,
"styleRecalcDurationMs": 34.964999999999996,
"layouts": 16,
"layoutDurationMs": 17.01,
"taskDurationMs": 987.5910000000001,
"heapDeltaBytes": -7368888,
"heapUsedBytes": 84885392,
"domNodes": 13751,
"jsHeapTotalBytes": 11010048,
"scriptDurationMs": 32.062999999999995,
"eventListeners": 2385,
"totalBlockingTimeMs": 148,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "viewport-pan-sweep",
"durationMs": 8708.47500000002,
"styleRecalcs": 247,
"styleRecalcDurationMs": 35.537,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5946.175,
"heapDeltaBytes": -8092736,
"heapUsedBytes": 93752692,
"domNodes": -270,
"jsHeapTotalBytes": -626688,
"scriptDurationMs": 2739.8959999999997,
"eventListeners": -132,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8813.182000000097,
"styleRecalcs": 249,
"styleRecalcDurationMs": 37.48500000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5987.419999999999,
"heapDeltaBytes": -11862112,
"heapUsedBytes": 89687376,
"domNodes": -264,
"jsHeapTotalBytes": -102400,
"scriptDurationMs": 2766.0930000000003,
"eventListeners": -132,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333338,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 17435.231000000043,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16845.785,
"heapDeltaBytes": -35941492,
"heapUsedBytes": 174522936,
"domNodes": -6552,
"jsHeapTotalBytes": -4673536,
"scriptDurationMs": 313.069,
"eventListeners": -7473,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666763,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 18337.1709999999,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17638.531,
"heapDeltaBytes": -35109776,
"heapUsedBytes": 174734948,
"domNodes": -6577,
"jsHeapTotalBytes": -5406720,
"scriptDurationMs": 308.61499999999995,
"eventListeners": -7473,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.780000000000047,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 22145.122000000014,
"styleRecalcs": 174,
"styleRecalcDurationMs": 21.73799999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 21884.971,
"heapDeltaBytes": -28919372,
"heapUsedBytes": 181620128,
"domNodes": -6548,
"jsHeapTotalBytes": -5169152,
"scriptDurationMs": 963.431,
"eventListeners": -7469,
"totalBlockingTimeMs": 29,
"frameDurationMs": 17.776666666666763,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 22527.199999999993,
"styleRecalcs": 169,
"styleRecalcDurationMs": 23.932999999999982,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 22230.427,
"heapDeltaBytes": -32705876,
"heapUsedBytes": 181252852,
"domNodes": -6548,
"jsHeapTotalBytes": -8761344,
"scriptDurationMs": 981.5160000000001,
"eventListeners": -7467,
"totalBlockingTimeMs": 47,
"frameDurationMs": 17.780000000000047,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-node-resize-workload",
"durationMs": 6624.912999999992,
"styleRecalcs": 20,
"styleRecalcDurationMs": 100.15399999999997,
"layouts": 20,
"layoutDurationMs": 39.51600000000001,
"taskDurationMs": 6547.946000000001,
"heapDeltaBytes": -32557460,
"heapUsedBytes": 176327956,
"domNodes": -6548,
"jsHeapTotalBytes": 6328320,
"scriptDurationMs": 174.391,
"eventListeners": -7469,
"totalBlockingTimeMs": 613,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-node-resize-workload",
"durationMs": 6361.470000000054,
"styleRecalcs": 20,
"styleRecalcDurationMs": 95.607,
"layouts": 20,
"layoutDurationMs": 31.894999999999992,
"taskDurationMs": 6300.490999999999,
"heapDeltaBytes": -37354280,
"heapUsedBytes": 173304056,
"domNodes": -6548,
"jsHeapTotalBytes": 2170880,
"scriptDurationMs": 138.87099999999998,
"eventListeners": -7469,
"totalBlockingTimeMs": 425,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-zoom-out-idle",
"durationMs": 9193.875999999931,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8965.658000000001,
"heapDeltaBytes": 11023764,
"heapUsedBytes": 178733100,
"domNodes": 0,
"jsHeapTotalBytes": 3932160,
"scriptDurationMs": 169.52899999999994,
"eventListeners": -12,
"totalBlockingTimeMs": 0,
"frameDurationMs": 18.333333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8723.08299999986,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8475.323,
"heapDeltaBytes": 2567724,
"heapUsedBytes": 174827176,
"domNodes": 0,
"jsHeapTotalBytes": -4456448,
"scriptDurationMs": 167.76999999999998,
"eventListeners": -14,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 475.68300000000363,
"styleRecalcs": 17,
"styleRecalcDurationMs": 26.832,
"layouts": 4,
"layoutDurationMs": 2.004,
"taskDurationMs": 135.01200000000003,
"heapDeltaBytes": 5008888,
"heapUsedBytes": 73838756,
"domNodes": 145,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 14.779000000000002,
"eventListeners": 65,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "workflow-execution",
"durationMs": 108.46500000002379,
"styleRecalcs": 7,
"styleRecalcDurationMs": 18.531,
"layouts": 2,
"layoutDurationMs": 0.869,
"taskDurationMs": 81.459,
"heapDeltaBytes": 3020644,
"heapUsedBytes": 71862900,
"domNodes": 106,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 5.345000000000001,
"eventListeners": 33,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
}
]
}🔬 E2E Coverage
Top 10 files by uncovered lines
|
Only a tier the frontend positively identifies as Enterprise gets the quiet end-date treatment; an unrecognized tier keeps the stock cancelled presentation (badge, amber card, ending banner with Reactivate) instead of borrowing Enterprise copy or losing its only in-app path to undo a cancellation. An Enterprise contract also never offers the panel's self-serve Reactivate button, even where the legacy billing rail would resolve the capability true, and a cancelled Enterprise plan with no end date falls back to the stock treatment rather than rendering fully active. The 14-day window now rides a coarse shared clock, so a long-lived session crosses into the notice window without waiting for a data refresh.
The backend confirmed cancel_at can disappear between polls when a webhook outage or reordering clears it, flipping the workspace back to plainly active with a renewal date. The presentation is fully computed and nothing latches, so it already reverts; these tests pin that the ending banner derives away and the panel returns to the Renews-on line with no badge or card.
1221b81 to
03bfb02
Compare
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #16940 +/- ##
==========================================
+ Coverage 81.12% 82.71% +1.59%
==========================================
Files 2459 2042 -417
Lines 126457 119174 -7283
Branches 31885 29833 -2052
==========================================
- Hits 102584 98571 -4013
+ Misses 23358 20423 -2935
+ Partials 515 180 -335
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 435 files with indirect coverage changes 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @comfydesigner.
Found 6 finding(s).
| Severity | Count |
|---|---|
| 🟡 Medium | 2 |
| 🟢 Low | 3 |
| ⚪ Nit | 1 |
Panel: 8/8 reviewers contributed findings.
| ? t(`${bs}.ending.body`) | ||
| : t(`${bs}.ending.memberBody`), | ||
| action: | ||
| canManage.value && canReactivatePlan.value ? 'reactivate' : null, |
There was a problem hiding this comment.
🟡 Medium — The new canManage && conjunction makes this the only reactivation surface not gated on canReactivatePlan alone — useResubscribe.handleResubscribe, SubscriptionPanelContentWorkspace.vue, CurrentUserPopoverWorkspace.vue and UnifiedPricingTable.vue all use the single gate, and useWorkspaceUI documents that they must not diverge because the reverse hides a working action. canManage is a client-side mirror (activeWorkspace !== null && role === 'owner', and subscription-management rather than lifecycle permission) that reads false when the workspace list has not loaded or the cached role is stale, so a genuine owner can lose Reactivate here while the settings panel below still offers a button whose handler executes; the same gate also swaps the enterprise "reach out to our sales team" copy for member copy at line 162. Consider gating only the copy on role and leaving the action on canReactivatePlan.
Raised by 4 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case, gpt-5.6-sol-max edge-case, kimi-k3-max edge-case).
| action: canReactivatePlan.value ? 'reactivate' : null, | ||
| body: canManage.value | ||
| ? t(`${bs}.ending.body`) | ||
| : t(`${bs}.ending.memberBody`), |
There was a problem hiding this comment.
🟡 Medium — memberBody's claim "You can run workflows until then." is false when the workspace has no credits: deriveBillingBanner falls through to 'ending' when hasFunds === false and the out-of-credits banner has been dismissed (members can dismiss it), and the enterprise branch above never consults hasFunds at all. Members previously got no ending banner, so this incorrect capability claim is newly reachable — consider copy that does not assert runnability, or suppressing the member body when hasFunds === false.
Raised by 2 of 8 reviewers (claude-opus-5-thinking-max edge-case, claude-opus-5-thinking-max adversarial).
| if (inputs.isCancelled && inputs.endDate && inputs.canManage) { | ||
| // Members see the ending notice too, not just the owners who can act on | ||
| // it: better a heads-up now than a run lock on the end date. | ||
| if (inputs.isCancelled && inputs.endDate) { |
There was a problem hiding this comment.
🟢 Low — The self-serve rail has no notice window, so a member now sees this banner from the moment of cancellation until endDate — up to ~12 months for an annual plan cancelled just after renewal — and the member variant is dismissible: false with no action, leaving no way to clear it. The 14-day isWithinEnterpriseEndingNotice gate on the enterprise rail exists to avoid exactly this; consider applying a window or allowing dismissal for members.
Raised by 1 of 8 reviewers (claude-opus-5-thinking-max edge-case).
| state.canReactivate = false | ||
| // Pin the gate itself: a rail that resolves reactivation true still must | ||
| // not surface the action to a member. | ||
| state.canReactivatePlan = true |
There was a problem hiding this comment.
🟢 Low — beforeEach resets canReactivate but not canReactivatePlan, so this value leaks across tests: the later "hides reactivation when the server denies it" case leaves it false for every test after it, which can silently make a "Reactivate is absent" assertion vacuous under a reorder or a filtered run. Add state.canReactivatePlan = true to beforeEach alongside state.canReactivate.
Raised by 2 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case).
| inputs.isCancelled && | ||
| inputs.endDate && | ||
| inputs.canManage && | ||
| isWithinEnterpriseEndingNotice(inputs.endDate, now) |
There was a problem hiding this comment.
🟢 Low — Dropping canManage from the enterprise rail exposes the sales-negotiated contract end date to every workspace member for the first time; the value already reaches the member's browser in the billing-status payload, so this is a UI-scope change rather than a new wire-level leak. Worth confirming with the billing/product owners that member visibility of enterprise cancel_at is intended, and that no billing action relies on this client-side role check for enforcement.
Raised by 2 of 8 reviewers (claude-opus-5-thinking-max adversarial, kimi-k3-max adversarial).
| body: t(`${bs}.ending.body`), | ||
| action: canReactivatePlan.value ? 'reactivate' : null, | ||
| body: canManage.value | ||
| ? t(`${bs}.ending.body`) |
There was a problem hiding this comment.
⚪ Nit — When canManage is true but canReactivatePlan is false, the owner body still reads "Reactivate to keep your shared credits and seats" while action resolves to null, so no Reactivate control renders anywhere. Pre-existing, but this expression is being edited anyway — consider copy that does not instruct an action the user has no control for.
Raised by 1 of 8 reviewers (gemini-3.1-pro edge-case).
…d date The cancelled-Enterprise spec still pinned the old presentation — a Canceled badge the moment sales sets an end date months out. It now expects what users get: a plainly active panel (no badge, no amber card, no banner, no early Ends-on line) until two weeks before the end date, plus a companion case inside the window where the muted ending notice carries the message with the sales copy and no self-serve actions. The fixtures use relative dates so they cannot drift across the 14-day threshold, and the window case turns on the billing_control_enabled rollout flag the banner sits behind.
03bfb02 to
7e66a1e
Compare
dante01yoon
left a comment
There was a problem hiding this comment.
Reviewed the delta on top of #16934 — as advertised, only the last commit is new here.
The member work itself is clean. The derivation change is genuinely confined to the two 'ending' outcomes; owners are untouched in practice (canManage is true for them, so canManage && canReactivatePlan is the same expression they had); the copy matches FE-2036 and the member Figma frames; and flipping the two base-branch tests that pinned the old members-see-nothing gap is the right call rather than working around them. Good catch that the member variant was designed but never built for any tier — splitting it out of FE-2035 instead of riding along was the right instinct.
Commenting rather than approving for one reason: this stacks on #16934, where I have left a blocking finding about deriving the Enterprise ending/cancelled distinction in the frontend from tier + cancel_at when the backend documents that cancel_at alone cannot carry it. This PR inherits that branch wholesale for the Enterprise member path, so it should follow whatever #16934 lands on. Nothing here needs changing on its own account beyond the two notes inline.
Unanchored
nit-pick (non-blocking):No e2e coverage for the member variant. The unit coverage of the derivation is good, so this is a judgement call rather than a gap I would block on — but this is a behavioural change for every member of every cancelled team workspace, andbrowser_tests/tests/dialogs/enterpriseTierCloud.spec.tsalready has the harness a role-scoped case would need.nit-pick (non-blocking):Same as on #16934 — no AS-IS / TO-BE capture from the real app in the description. The member banner has never rendered before, so a capture is doing more work here than usual. Fine to add after opening.
| if (inputs.isCancelled && inputs.endDate && inputs.canManage) { | ||
| // Members see the ending notice too, not just the owners who can act on | ||
| // it: better a heads-up now than a run lock on the end date. | ||
| if (inputs.isCancelled && inputs.endDate) { |
There was a problem hiding this comment.
question: This is the widest-reaching line in the stack. Dropping canManage means every member of every self-serve Team workspace with a scheduled cancellation starts seeing a banner they have never seen before, immediately, with no threshold damping it — the Enterprise path at least has the 14-day window in front of it.
That is precisely what FE-2036 asks for, so no objection to the behaviour itself. Two things I would like pinned before it ships:
- Is
billing_control_enabledalready on in production? If it is, this is an instant change for existing cancelled team workspaces rather than a dark launch. Worth stating in the description and giving Sonam and Hunter a heads-up, since members will start asking about a banner that appeared without anything changing on their plan. deriveBillingBannerfills a single slot withoutOfCreditsahead ofending. So a member of a cancelled team workspace that is also out of credits sees the out-of-credits banner, dismisses it, and then gets the ending notice. That sequencing is defensible, but it is new for members and nothing covers it — a derive-level test would pin it cheaply.
There was a problem hiding this comment.
Both pinned. (1) billing_control_enabled is a PostHog percentage rollout, sticky per user (common/featuregates/flags.go:306 in cloud) — the exact prod percentage needs a PostHog read, so we're treating this as live-on-merge for the flagged slice and giving Sonam and Hunter the heads-up before it lands; adding the note to the description. (2) The out-of-credits-before-ending sequencing is now pinned at the derive level in 87e421c754 (member + both conditions → outOfCredits, ending only after dismissal). Same commit adds the role-scoped e2e case from your other note — member of a cancelled team workspace sees the informational variant, no action.
| ? t(`${bs}.ending.body`) | ||
| : t(`${bs}.ending.memberBody`), | ||
| action: | ||
| canManage.value && canReactivatePlan.value ? 'reactivate' : null, |
There was a problem hiding this comment.
suggestion (non-blocking): Adding canManage && here is a no-op today: deriveBillingBanner no longer gates on canManage, canReactivatePlan already resolves false for members server-side, and for owners canManage is true by definition.
I would keep it — belt and braces on an action that starts a billing change is cheap — but note this is now the second place in the stack where the frontend re-asserts a rule the server capability already encodes (the other being the !isEnterprisePlan guard on the panel's Reactivate button in #16934). If the can_reactivate question on that PR turns into a billing-api ticket, this line belongs in the same note, so the two guards do not drift apart from the capability or from each other.
There was a problem hiding this comment.
Agreed and keeping it — belt and braces on a billing write is cheap. Worth noting the other guard you paired it with is now gone: #16934 drops the !isEnterprisePlan condition on the panel's Reactivate (it was precautionary), so this canManage && is the only spot left where the client re-asserts a rule the capability encodes, and the comment stands as its documentation.
…ixture The far-out Enterprise case deliberately renders no date row at all: the contract is billed yearly upfront and will not renew, so "Renews on" would be a false claim. Assert the absence in both the unit test and the e2e far-out test so a refactor cannot silently flip it back. Also spread the workspace helper's default /api/features payload in the billing-control override so only that one flag diverges from the stock fixture.
…ed window The unbounded-below window is safe because cloud's common/repository/billing/subscription.go:55 transitions a canceled row whose cancel_at has passed into ended on first load and returns no active subscription; say so instead of gesturing at it.
Calling getContext('webgl2', attributes) through the
OffscreenCanvas | HTMLCanvasElement union resolves to the generic string
overload under TypeScript 6, typing the result as RenderingContext and
cascading 16 errors through setupContext. Resolving the call per concrete
type keeps the WebGL2RenderingContext return type; pnpm typecheck was
failing on every commit because of it (CI does not run vue-tsc). No
behavior change.
Members of a cancelled team or ending enterprise workspace now see the same ending banner owners do, instead of finding out when the workspace goes inactive under them. Their variant is informational only: title plus "You can run workflows until then.", no Reactivate action and no dismissal — the notice stays up exactly like the owner banner. Owners keep the banner they had, with Reactivate on self-serve teams. The Enterprise 14-day notice window applies to members on the same schedule as owners.
7e66a1e to
87e421c
Compare
9ef8125 to
1bda5eb
Compare
0362ba8 to
cff5b4f
Compare
dante01yoon
left a comment
There was a problem hiding this comment.
Re-reviewed at 87e421c7, after #16934 merged and this PR was retargeted to main.
Thanks for the follow-ups on my last round: the precedence test and the e2e member case both answer what I asked for.
Main has moved past this PR since then, though. #19680 (merged 2026-10-01) already ships the member ending banner. On main, src/platform/billing/composables/useBillingBanner.ts has no canManage gate in either deriveEnterpriseBanner or deriveLifecycleNotice. BillingStatusBanner.vue renders ending.memberBody ("You can run workflows until then.") with no action for members on both rails. These tests on main already cover it:
deriveBillingBanner.test.ts: "shows the ending banner to members too" and "shows a member the ending notice, not the plan change, once cancelled"BillingStatusBanner.test.ts: "shows members the ending notice without a Resume plan action"
The PR is also CONFLICTING. The files it edits were moved to src/platform/billing/ in #21741, and its diff against main still includes the already-squashed #16934 commits.
The only part not on main yet is the browser test for the member variant. I'd suggest closing this PR, or rebasing it down to just that e2e case updated for the current copy (see inline). Either works for me.
Checks: I read the diffs of d71eeec and 87e421c and compared them with origin/main (79bffa3). I did not run the Cloud Playwright suite.
| if (inputs.isCancelled && inputs.endDate && inputs.canManage) { | ||
| // Members see the ending notice too, not just the owners who can act on | ||
| // it: better a heads-up now than a run lock on the end date. | ||
| if (inputs.isCancelled && inputs.endDate) { |
There was a problem hiding this comment.
question: This change is already on main through #19680. deriveLifecycleNotice in src/platform/billing/composables/useBillingBanner.ts returns 'ending' on isCancelled && endDate with no role check, and the Enterprise branch dropped canManage too. This file has also moved to src/platform/billing/ (#21741). Is anything here still needed beyond the e2e case, or can this PR be closed or reduced to that test?
| ).toBeVisible() | ||
| // Not the owner variant: no Reactivate action, no owner body. | ||
| await expect( | ||
| content.getByRole('button', { name: 'Reactivate plan' }) |
There was a problem hiding this comment.
issue: After a rebase, these two negative assertions can't fail. #19680 renamed the owner action to "Resume plan" and changed the owner body to "You won't be charged again. Members keep full access until then. Resume your plan to keep your team's shared credits." Nothing on main renders "Reactivate plan" or "Reactivate to keep your shared credits and seats." any more. If a regression showed the owner action to a member, toHaveCount(0) would still pass. Could we assert against the current strings, ideally through the en/main.json keys (ending.reactivate, ending.body) so a copy change can't silently empty the check again?
| const content = await workspace.openPlanAndCreditsSettings() | ||
|
|
||
| await expect( | ||
| content.getByText('Your team plan ends on', { exact: false }) |
There was a problem hiding this comment.
issue: On main the team title is "Your Team plan ends on {date}" (capital T). getByText with exact: false matches case-insensitively, so this still passes, but it pins copy that no longer exists. While you're updating this case, the comments added in this block (lines 413-417 and 440) also need to go under the no-comments rule in AGENTS.md. The test name already says what the case proves.
Members of a cancelled team or ending enterprise workspace now get the same heads-up owners do — today they see nothing and find out when the workspace goes inactive under them. Their banner is informational: title plus body, nothing to click; owners keep exactly what they have.
No dismissal on either variant — design clarified that the "Don't show again" layer in the Figma frame is a hidden stale layer, not part of the rendered design. The member banner is title + body only and persists exactly like the owner banner, so
useBillingBanner's dismiss stays out-of-credits-only.Derivation change is confined to the
'ending'outcomes ofderiveBillingBanner(drops thecanManagegate on both the team branch and the Enterprise notice-window branch). The Enterprise notice window is role-independent: members and owners see it on the same day. All other banner kinds untouched.Two base-branch tests asserted the old member gap ("hides the ending banner from members" and the Enterprise member variant); those flipped to assert the new behavior, everything else is additive.
Stacked on #16934 (
comfydesigner/enterprise-ending-threshold), rebased on its Cursor-review fixes (Enterprise-strict scoping,ENTERPRISE_ENDING_NOTICE_DAYS, reactive clock) — only the last commit is new here.Linear: FE-2036
Rollout
billing_control_enabledis a PostHog percentage rollout (sticky per user), so this banner is live on merge for the flagged slice — members of cancelled team workspaces in that slice see it immediately, with no threshold damping (the Enterprise path has the 14-day window; the team path shows on cancellation by design, per FE-2036). Sonam and Hunter notified before merge.