Repository navigation
fix(billing): open the billing portal on OUTSTANDING_PAYMENT_REQUIRED - #15267
Conversation
The subscribe API now returns a distinct error code when an unpaid invoice blocks a plan change. Treat it as a direct trigger for the payment-recovery flow instead of relying on the billing-status probe, which is not populated for every billing configuration.
🎨 Storybook: ✅ Built — View Storybook📦 Bundle: 8.85 MB gzip 🔴 +20 BDetailsSummary
Category Glance App Entry Points — 3.71 kB (baseline 3.71 kB) • ⚪ 0 BMain entry bundles and manifests Status: 1 unchanged Graph Workspace — 1.37 MB (baseline 1.37 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration Status: 3 unchanged Views & Navigation — 124 kB (baseline 124 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces Status: 17 unchanged Panels & Settings — 565 kB (baseline 565 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens Status: 26 unchanged User & Accounts — 27.7 kB (baseline 27.7 kB) • ⚪ 0 BAuthentication, profile, and account management bundles Status: 11 unchanged Editors & Dialogs — 125 kB (baseline 125 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors Status: 8 unchanged UI Components — 67.1 kB (baseline 67.1 kB) • ⚪ 0 BReusable component library chunks Status: 14 unchanged Data & Services — 3.52 MB (baseline 3.52 MB) • ⚪ 0 BStores, services, APIs, and repositories Status: 17 unchanged Utilities & Hooks — 550 kB (baseline 550 kB) • ⚪ 0 BHelpers, composables, and utility bundles Status: 38 unchanged Vendor & Third-Party — 16.8 MB (baseline 16.8 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 18 unchanged Other — 14.2 MB (baseline 14.2 MB) • 🔴 +55 BBundles that do not match a named category
Status: 3 added / 3 removed / 283 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-08-14T20:25:57.306Z",
"gitSha": "bf6df3928375d12624e805412ac511577e49d2fe",
"branch": "wei/past-due-recovery-code",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2037.9570000000058,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.5969999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 508.48,
"heapDeltaBytes": 4938072,
"heapUsedBytes": 69544116,
"domNodes": 16,
"jsHeapTotalBytes": 24903680,
"scriptDurationMs": 9.568999999999999,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-idle",
"durationMs": 2016.3139999999657,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.188,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 469.54100000000005,
"heapDeltaBytes": 5057900,
"heapUsedBytes": 69599320,
"domNodes": 18,
"jsHeapTotalBytes": 24641536,
"scriptDurationMs": 7.447000000000002,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2196.9819999999913,
"styleRecalcs": 83,
"styleRecalcDurationMs": 53.794000000000004,
"layouts": 12,
"layoutDurationMs": 4.116,
"taskDurationMs": 1181.499,
"heapDeltaBytes": -14035500,
"heapUsedBytes": 50441728,
"domNodes": -281,
"jsHeapTotalBytes": 22777856,
"scriptDurationMs": 138.137,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1869.9810000000525,
"styleRecalcs": 73,
"styleRecalcDurationMs": 36.039,
"layouts": 12,
"layoutDurationMs": 3.9699999999999998,
"taskDurationMs": 887.005,
"heapDeltaBytes": -17266876,
"heapUsedBytes": 47350404,
"domNodes": -281,
"jsHeapTotalBytes": 23564288,
"scriptDurationMs": 115.342,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1733.8809999999967,
"styleRecalcs": 31,
"styleRecalcDurationMs": 20.353999999999996,
"layouts": 6,
"layoutDurationMs": 0.809,
"taskDurationMs": 432.31399999999996,
"heapDeltaBytes": 8046292,
"heapUsedBytes": 72758452,
"domNodes": 77,
"jsHeapTotalBytes": 25427968,
"scriptDurationMs": 13.156999999999998,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1756.3370000000305,
"styleRecalcs": 33,
"styleRecalcDurationMs": 19.498,
"layouts": 6,
"layoutDurationMs": 0.667,
"taskDurationMs": 412.62899999999996,
"heapDeltaBytes": 7963696,
"heapUsedBytes": 72333020,
"domNodes": 78,
"jsHeapTotalBytes": 24903680,
"scriptDurationMs": 12.189,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 641.132999999968,
"styleRecalcs": 10,
"styleRecalcDurationMs": 7.748999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 417.70400000000006,
"heapDeltaBytes": -12449184,
"heapUsedBytes": 52043052,
"domNodes": 16,
"jsHeapTotalBytes": 26214400,
"scriptDurationMs": 62.187000000000005,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 576.4960000000201,
"styleRecalcs": 11,
"styleRecalcDurationMs": 7.721,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 384.323,
"heapDeltaBytes": -11126380,
"heapUsedBytes": 53588148,
"domNodes": 18,
"jsHeapTotalBytes": 25427968,
"scriptDurationMs": 59.495000000000005,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2032.3099999999954,
"styleRecalcs": 8,
"styleRecalcDurationMs": 8.496,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 690.4639999999999,
"heapDeltaBytes": 12666132,
"heapUsedBytes": 72176664,
"domNodes": -284,
"jsHeapTotalBytes": 2457600,
"scriptDurationMs": 17.002000000000002,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2031.3630000000558,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.716000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 641.7189999999999,
"heapDeltaBytes": 10507156,
"heapUsedBytes": 70930248,
"domNodes": -283,
"jsHeapTotalBytes": 2719744,
"scriptDurationMs": 18.395999999999997,
"eventListeners": -179,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2278.2700000000204,
"styleRecalcs": 68,
"styleRecalcDurationMs": 15.083999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1298.368,
"heapDeltaBytes": 10245804,
"heapUsedBytes": 70660520,
"domNodes": -285,
"jsHeapTotalBytes": 3174400,
"scriptDurationMs": 353.991,
"eventListeners": -147,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2214.523999999983,
"styleRecalcs": 69,
"styleRecalcDurationMs": 15.056,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1244.901,
"heapDeltaBytes": 10216808,
"heapUsedBytes": 71477908,
"domNodes": -284,
"jsHeapTotalBytes": 3436544,
"scriptDurationMs": 347.479,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3397.754999999961,
"styleRecalcs": 63,
"styleRecalcDurationMs": 14.054,
"layouts": 60,
"layoutDurationMs": 7.773000000000001,
"taskDurationMs": 1492.4400000000003,
"heapDeltaBytes": 4420508,
"heapUsedBytes": 67087920,
"domNodes": -289,
"jsHeapTotalBytes": 2457600,
"scriptDurationMs": 404.13,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-zoom",
"durationMs": 3145.705000000021,
"styleRecalcs": 64,
"styleRecalcDurationMs": 14.715999999999996,
"layouts": 60,
"layoutDurationMs": 7.4719999999999995,
"taskDurationMs": 1353.732,
"heapDeltaBytes": 16901872,
"heapUsedBytes": 79015728,
"domNodes": 10,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 384.84999999999997,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "minimap-idle",
"durationMs": 2010.8260000000087,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.91,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 695.1670000000001,
"heapDeltaBytes": 12162324,
"heapUsedBytes": 72630644,
"domNodes": -284,
"jsHeapTotalBytes": 2981888,
"scriptDurationMs": 16.087999999999997,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2012.9729999999881,
"styleRecalcs": 7,
"styleRecalcDurationMs": 6.893,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 665.5820000000001,
"heapDeltaBytes": 12487912,
"heapUsedBytes": 73720472,
"domNodes": -285,
"jsHeapTotalBytes": 3506176,
"scriptDurationMs": 18.413000000000007,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 629.3440000000032,
"styleRecalcs": 47,
"styleRecalcDurationMs": 11.571000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 426.089,
"heapDeltaBytes": -10467952,
"heapUsedBytes": 54233280,
"domNodes": 20,
"jsHeapTotalBytes": 25952256,
"scriptDurationMs": 123.17500000000001,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 617.6849999999376,
"styleRecalcs": 48,
"styleRecalcDurationMs": 12.95,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 419.04999999999995,
"heapDeltaBytes": -9964544,
"heapUsedBytes": 54549636,
"domNodes": 22,
"jsHeapTotalBytes": 25952256,
"scriptDurationMs": 122.167,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-idle",
"durationMs": 2021.9989999999939,
"styleRecalcs": 10,
"styleRecalcDurationMs": 9.720999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 526.3599999999999,
"heapDeltaBytes": 5163300,
"heapUsedBytes": 69712656,
"domNodes": 20,
"jsHeapTotalBytes": 25427968,
"scriptDurationMs": 9.252,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 1995.0489999999945,
"styleRecalcs": 11,
"styleRecalcDurationMs": 10.227,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 486.90599999999995,
"heapDeltaBytes": 5041340,
"heapUsedBytes": 69715780,
"domNodes": 22,
"jsHeapTotalBytes": 25165824,
"scriptDurationMs": 7.802,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1680.3340000000162,
"styleRecalcs": 75,
"styleRecalcDurationMs": 37.61000000000001,
"layouts": 16,
"layoutDurationMs": 5.045,
"taskDurationMs": 816.5649999999999,
"heapDeltaBytes": -4205480,
"heapUsedBytes": 60368060,
"domNodes": 60,
"jsHeapTotalBytes": 25690112,
"scriptDurationMs": 92.50900000000001,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1695.0920000000451,
"styleRecalcs": 76,
"styleRecalcDurationMs": 36.205,
"layouts": 16,
"layoutDurationMs": 4.1930000000000005,
"taskDurationMs": 774.163,
"heapDeltaBytes": -4067660,
"heapUsedBytes": 60613580,
"domNodes": 64,
"jsHeapTotalBytes": 25165824,
"scriptDurationMs": 86.713,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 1400.470999999925,
"styleRecalcs": 19,
"styleRecalcDurationMs": 30.95200000000001,
"layouts": 14,
"layoutDurationMs": 12.768,
"taskDurationMs": 942.8839999999998,
"heapDeltaBytes": -6024148,
"heapUsedBytes": 79593832,
"domNodes": 13673,
"jsHeapTotalBytes": 11534336,
"scriptDurationMs": 18.789999999999996,
"eventListeners": 2375,
"totalBlockingTimeMs": 141,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 9006.87499999998,
"styleRecalcs": 249,
"styleRecalcDurationMs": 39.812,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4676.698,
"heapDeltaBytes": 5788204,
"heapUsedBytes": 65954384,
"domNodes": -281,
"jsHeapTotalBytes": 3436544,
"scriptDurationMs": 1178.7179999999998,
"eventListeners": -163,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "viewport-pan-sweep",
"durationMs": 8470.491000000038,
"styleRecalcs": 249,
"styleRecalcDurationMs": 39.331,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4310.227999999999,
"heapDeltaBytes": 15727968,
"heapUsedBytes": 75701800,
"domNodes": -284,
"jsHeapTotalBytes": 3436544,
"scriptDurationMs": 1047.202,
"eventListeners": -131,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 17985.297000000002,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17081.688,
"heapDeltaBytes": -28567292,
"heapUsedBytes": 167647724,
"domNodes": -8312,
"jsHeapTotalBytes": -10166272,
"scriptDurationMs": 127.241,
"eventListeners": -16389,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 18116.488000000005,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17171.67,
"heapDeltaBytes": -45206852,
"heapUsedBytes": 165567448,
"domNodes": -8312,
"jsHeapTotalBytes": -19865600,
"scriptDurationMs": 130.64199999999997,
"eventListeners": -16391,
"totalBlockingTimeMs": 0,
"frameDurationMs": 18.329999999999927,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 21368.930000000033,
"styleRecalcs": 172,
"styleRecalcDurationMs": 18.65300000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 20702.067,
"heapDeltaBytes": -34164612,
"heapUsedBytes": 176100288,
"domNodes": -8312,
"jsHeapTotalBytes": -11022336,
"scriptDurationMs": 407.48599999999993,
"eventListeners": -16383,
"totalBlockingTimeMs": 25,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 21599.187000000027,
"styleRecalcs": 177,
"styleRecalcDurationMs": 19.918999999999965,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 20933.363,
"heapDeltaBytes": -14828236,
"heapUsedBytes": 182520100,
"domNodes": -8312,
"jsHeapTotalBytes": -11771904,
"scriptDurationMs": 410.147,
"eventListeners": -16383,
"totalBlockingTimeMs": 101,
"frameDurationMs": 18.330000000000048,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 473.528999999985,
"styleRecalcs": 17,
"styleRecalcDurationMs": 21.540000000000003,
"layouts": 3,
"layoutDurationMs": 1.3100000000000003,
"taskDurationMs": 117.67399999999999,
"heapDeltaBytes": 5060544,
"heapUsedBytes": 68701100,
"domNodes": 148,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 8.853,
"eventListeners": 99,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 454.92799999999534,
"styleRecalcs": 13,
"styleRecalcDurationMs": 18.021,
"layouts": 2,
"layoutDurationMs": 0.47000000000000014,
"taskDurationMs": 101.529,
"heapDeltaBytes": 4931792,
"heapUsedBytes": 68753876,
"domNodes": 123,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 6.5489999999999995,
"eventListeners": 97,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
}
]
}🎭 Playwright: ✅ 1816 passed, 0 failed · 1 flaky📊 Browser Reports
|
🎭 Playwright: ⏳ Running... |
|
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 (2)
📝 WalkthroughWalkthroughThe subscription checkout recovery flow now treats ChangesPayment recovery
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This localized billing recovery change directly opens the billing portal for outstanding payment errors while preserving existing fallback behavior, with focused test coverage; no actionable merge-blocking risk remains. Possibly related PRs
Suggested labels: Suggested reviewers: Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 inconclusive)
✅ Passed checks (5 passed)
✨ Finishing Touches📝 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 |
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @wei-hai.
✅ No high-signal findings.
Panel: 7/8 reviewers contributed findings.
Reviewers that did not contribute: kimi-k3-max:edge-case (parse_error)
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #15267 +/- ##
========================================
Coverage 81.33% 81.33%
========================================
Files 1884 1884
Lines 109538 109539 +1
Branches 33207 32736 -471
========================================
+ Hits 89092 89093 +1
+ Misses 20070 20060 -10
- Partials 376 386 +10
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 8 files with indirect coverage changes 🚀 New features to boost your workflow:
|
dante01yoon
left a comment
There was a problem hiding this comment.
question: Could we link Comfy-Org/cloud#6858 here and keep this PR blocked until that backend contract is merged and deployed? I verified current cloud/main still emits TRANSITION_NOT_ALLOWED; OUTSTANDING_PAYMENT_REQUIRED exists only on the unmerged Cloud PR ref. Since this branch consumes a server-defined state, the backend contract should land first rather than letting the frontend establish it independently.
The frontend handling itself looks correct, and the targeted checkout suite passes (102/102).
dante01yoon
left a comment
There was a problem hiding this comment.
please block until API landed
The subscribe API now returns a distinct
OUTSTANDING_PAYMENT_REQUIREDcode when an unpaid invoice blocks a plan change. Previously that case came back as the genericTRANSITION_NOT_ALLOWED, so the client had to guess whether it was a payment problem by making a second call togetBillingStatus()and checking forpayment_failed. That probe is unreliable —billing_statusis not populated for every billing configuration, and when it isn't, the user is shown a bare error message with no way to act on it.flowchart LR subgraph after ["after"] A2[OUTSTANDING_<br/>PAYMENT_REQUIRED] --> B2[open billing portal] C2[TRANSITION_NOT_ALLOWED] --> D2{"probe<br/>billing_status"} --> E2[portal, or plain error] end subgraph before ["before"] A1[unpaid invoice<br/>blocks plan change] --> B1[TRANSITION_NOT_ALLOWED] B1 --> C1{"probe<br/>billing_status"} C1 -->|populated| D1[open billing portal] C1 -->|not populated| E1[plain error,<br/>no action offered] endChange
recoverOutstandingPaymenttreats the new code as a direct trigger, short-circuiting before the probe runs.Deliberately additive
Both existing paths are untouched:
SUBSCRIPTION_PAYMENT_REQUIREDcheck stays — it is referenced across many existing tests.TRANSITION_NOT_ALLOWED+getBillingStatus()fallback stays — it works correctly whereverbilling_statusis populated, and it covers the window while the backend change rolls out. Removing it would fix one set of accounts by breaking another.Test
One row added to the existing table test. It asserts the portal opens and that
getBillingStatus()is called zero times — skipping that probe is the point of the new code, so the test pins it. Reverting the source change fails this test.npx vitest run --coverage src/platform/workspace/composables/useSubscriptionCheckout.test.ts→ 102 passed. Run with--coverageto match CI, since coverage instrumentation catches mock-hoisting failures a plain run does not.