Repository navigation
fix(billing): surface an unknown billing op type instead of defaulting silently - #14759
Conversation
🎭 Playwright: ✅ 1790 passed, 0 failed · 1 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook📦 Bundle: 8.26 MB gzip 🔴 +300 BDetailsSummary
Category Glance App Entry Points — 3.64 kB (baseline 3.64 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.35 MB (baseline 1.35 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed / 1 unchanged Views & Navigation — 114 kB (baseline 114 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 13 added / 13 removed / 4 unchanged Panels & Settings — 551 kB (baseline 551 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 11 added / 11 removed / 15 unchanged User & Accounts — 27 kB (baseline 27 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 6 added / 6 removed / 4 unchanged Editors & Dialogs — 124 kB (baseline 124 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 6 added / 6 removed / 1 unchanged UI Components — 72.1 kB (baseline 72.1 kB) • ⚪ 0 BReusable component library chunks
Status: 6 added / 6 removed / 9 unchanged Data & Services — 3.48 MB (baseline 3.48 MB) • 🔴 +665 BStores, services, APIs, and repositories
Status: 14 added / 14 removed / 3 unchanged Utilities & Hooks — 386 kB (baseline 386 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 16 added / 16 removed / 20 unchanged Vendor & Third-Party — 15.7 MB (baseline 15.7 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 16 unchanged Other — 12.8 MB (baseline 12.8 MB) • ⚪ 0 BBundles that do not match a named category
Status: 70 added / 70 removed / 211 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-08-05T05:30:05.853Z",
"gitSha": "d96d5434abe0d92a89f7edaddee84e56b4948f18",
"branch": "fix/billing-resume-mode-exhaustive",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2034.6160000000282,
"styleRecalcs": 8,
"styleRecalcDurationMs": 8.534000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 629.417,
"heapDeltaBytes": 5373712,
"heapUsedBytes": 69627448,
"domNodes": 16,
"jsHeapTotalBytes": 24903680,
"scriptDurationMs": 27.794,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2041.296999999986,
"styleRecalcs": 9,
"styleRecalcDurationMs": 9.146999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 553.385,
"heapDeltaBytes": 5364928,
"heapUsedBytes": 69398776,
"domNodes": 18,
"jsHeapTotalBytes": 25165824,
"scriptDurationMs": 22.102999999999998,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2246.490999999992,
"styleRecalcs": 80,
"styleRecalcDurationMs": 54.523,
"layouts": 12,
"layoutDurationMs": 4.087,
"taskDurationMs": 1282.383,
"heapDeltaBytes": -12121252,
"heapUsedBytes": 51945000,
"domNodes": -282,
"jsHeapTotalBytes": 23048192,
"scriptDurationMs": 177.02100000000002,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1917.9530000000113,
"styleRecalcs": 76,
"styleRecalcDurationMs": 46.364000000000004,
"layouts": 12,
"layoutDurationMs": 3.7940000000000005,
"taskDurationMs": 1024.287,
"heapDeltaBytes": -13721116,
"heapUsedBytes": 50462676,
"domNodes": -281,
"jsHeapTotalBytes": 24883200,
"scriptDurationMs": 136.514,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1766.8679999999881,
"styleRecalcs": 31,
"styleRecalcDurationMs": 23.184000000000005,
"layouts": 6,
"layoutDurationMs": 0.8240000000000003,
"taskDurationMs": 455.772,
"heapDeltaBytes": 8653016,
"heapUsedBytes": 72736396,
"domNodes": 78,
"jsHeapTotalBytes": 24903680,
"scriptDurationMs": 25.743000000000002,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1756.5759999999955,
"styleRecalcs": 31,
"styleRecalcDurationMs": 20.176,
"layouts": 6,
"layoutDurationMs": 0.743,
"taskDurationMs": 456.459,
"heapDeltaBytes": 8610760,
"heapUsedBytes": 72697892,
"domNodes": 78,
"jsHeapTotalBytes": 25165824,
"scriptDurationMs": 27.610000000000003,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 702.2910000000024,
"styleRecalcs": 10,
"styleRecalcDurationMs": 7.684,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 420.758,
"heapDeltaBytes": -10665836,
"heapUsedBytes": 53488032,
"domNodes": 16,
"jsHeapTotalBytes": 25427968,
"scriptDurationMs": 67.458,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 632.0959999999332,
"styleRecalcs": 11,
"styleRecalcDurationMs": 13.034,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 436.02299999999997,
"heapDeltaBytes": -11280908,
"heapUsedBytes": 53077256,
"domNodes": 18,
"jsHeapTotalBytes": 25690112,
"scriptDurationMs": 67.56899999999999,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2028.9730000000077,
"styleRecalcs": 8,
"styleRecalcDurationMs": 8.408999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 900.5699999999999,
"heapDeltaBytes": 4996440,
"heapUsedBytes": 65153616,
"domNodes": -283,
"jsHeapTotalBytes": 3252224,
"scriptDurationMs": 149.729,
"eventListeners": -179,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2029.7409999999445,
"styleRecalcs": 7,
"styleRecalcDurationMs": 7.695999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 782.2490000000001,
"heapDeltaBytes": 6888780,
"heapUsedBytes": 67131052,
"domNodes": -283,
"jsHeapTotalBytes": 3514368,
"scriptDurationMs": 134.575,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2553.0990000000315,
"styleRecalcs": 69,
"styleRecalcDurationMs": 14.872,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1567.349,
"heapDeltaBytes": 1217400,
"heapUsedBytes": 61806728,
"domNodes": -283,
"jsHeapTotalBytes": 3969024,
"scriptDurationMs": 546.8969999999999,
"eventListeners": -179,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2352.4110000000746,
"styleRecalcs": 69,
"styleRecalcDurationMs": 15.295999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1458.75,
"heapDeltaBytes": 7425904,
"heapUsedBytes": 68073580,
"domNodes": -285,
"jsHeapTotalBytes": 4231168,
"scriptDurationMs": 494.767,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3682.243000000028,
"styleRecalcs": 65,
"styleRecalcDurationMs": 16.570999999999998,
"layouts": 60,
"layoutDurationMs": 8.09,
"taskDurationMs": 1807.6439999999998,
"heapDeltaBytes": -5660544,
"heapUsedBytes": 56495112,
"domNodes": -289,
"jsHeapTotalBytes": 5087232,
"scriptDurationMs": 655.858,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666636,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3562.020000000075,
"styleRecalcs": 64,
"styleRecalcDurationMs": 15.3,
"layouts": 60,
"layoutDurationMs": 7.991999999999999,
"taskDurationMs": 1721.712,
"heapDeltaBytes": 15080508,
"heapUsedBytes": 77204008,
"domNodes": -289,
"jsHeapTotalBytes": 5087232,
"scriptDurationMs": 617.83,
"eventListeners": -181,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "minimap-idle",
"durationMs": 2030.7480000000169,
"styleRecalcs": 7,
"styleRecalcDurationMs": 6.814000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 773.8839999999999,
"heapDeltaBytes": 6418628,
"heapUsedBytes": 67016160,
"domNodes": -285,
"jsHeapTotalBytes": 2990080,
"scriptDurationMs": 133.973,
"eventListeners": -181,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2040.9270000000106,
"styleRecalcs": 8,
"styleRecalcDurationMs": 8.536999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 834.374,
"heapDeltaBytes": 2509592,
"heapUsedBytes": 63136372,
"domNodes": -283,
"jsHeapTotalBytes": 2727936,
"scriptDurationMs": 142.85600000000002,
"eventListeners": -179,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 731.3479999999686,
"styleRecalcs": 45,
"styleRecalcDurationMs": 10.637999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 465.43699999999995,
"heapDeltaBytes": -10207440,
"heapUsedBytes": 54094324,
"domNodes": 16,
"jsHeapTotalBytes": 25952256,
"scriptDurationMs": 128.472,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 685.9479999999394,
"styleRecalcs": 47,
"styleRecalcDurationMs": 13.047,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 452.086,
"heapDeltaBytes": -10619516,
"heapUsedBytes": 53791080,
"domNodes": 20,
"jsHeapTotalBytes": 26214400,
"scriptDurationMs": 131.77800000000002,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2029.4610000000262,
"styleRecalcs": 8,
"styleRecalcDurationMs": 8.248999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 669.255,
"heapDeltaBytes": -17231908,
"heapUsedBytes": 46835060,
"domNodes": -283,
"jsHeapTotalBytes": 23310336,
"scriptDurationMs": 23.384,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2022.854999999936,
"styleRecalcs": 9,
"styleRecalcDurationMs": 9.977000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 604.2989999999999,
"heapDeltaBytes": -16117520,
"heapUsedBytes": 48066268,
"domNodes": -281,
"jsHeapTotalBytes": 22786048,
"scriptDurationMs": 20.141,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1806.6599999999653,
"styleRecalcs": 78,
"styleRecalcDurationMs": 45.145,
"layouts": 16,
"layoutDurationMs": 4.984999999999999,
"taskDurationMs": 942.578,
"heapDeltaBytes": -17109172,
"heapUsedBytes": 47044216,
"domNodes": -279,
"jsHeapTotalBytes": 23834624,
"scriptDurationMs": 111.94000000000001,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1723.5660000000053,
"styleRecalcs": 75,
"styleRecalcDurationMs": 40.27,
"layouts": 16,
"layoutDurationMs": 4.755,
"taskDurationMs": 875.257,
"heapDeltaBytes": -3964196,
"heapUsedBytes": 60213396,
"domNodes": 62,
"jsHeapTotalBytes": 24903680,
"scriptDurationMs": 105.835,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 1448.865000000069,
"styleRecalcs": 16,
"styleRecalcDurationMs": 32.882,
"layouts": 12,
"layoutDurationMs": 13.556,
"taskDurationMs": 1078.4830000000004,
"heapDeltaBytes": 30619432,
"heapUsedBytes": 99272576,
"domNodes": 13673,
"jsHeapTotalBytes": 15466496,
"scriptDurationMs": 44.223,
"eventListeners": 2375,
"totalBlockingTimeMs": 148,
"frameDurationMs": 16.66333333333338,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 9296.83,
"styleRecalcs": 249,
"styleRecalcDurationMs": 40.91400000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5364.098999999999,
"heapDeltaBytes": 20325452,
"heapUsedBytes": 79988392,
"domNodes": -283,
"jsHeapTotalBytes": 5017600,
"scriptDurationMs": 1713.533,
"eventListeners": -131,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 9565.967,
"styleRecalcs": 250,
"styleRecalcDurationMs": 41.949,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5384.014,
"heapDeltaBytes": 21313940,
"heapUsedBytes": 81840836,
"domNodes": -280,
"jsHeapTotalBytes": 6852608,
"scriptDurationMs": 1773.9260000000002,
"eventListeners": -161,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 17889.373999999974,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17869.658,
"heapDeltaBytes": -37324268,
"heapUsedBytes": 167237832,
"domNodes": -8312,
"jsHeapTotalBytes": -7282688,
"scriptDurationMs": 615.509,
"eventListeners": -16387,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.77333333333336,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 17802.142000000003,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17785.791,
"heapDeltaBytes": -58950604,
"heapUsedBytes": 167188368,
"domNodes": -8312,
"jsHeapTotalBytes": -5185536,
"scriptDurationMs": 620.946,
"eventListeners": -16387,
"totalBlockingTimeMs": 15,
"frameDurationMs": 17.77333333333336,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 22195.155999999995,
"styleRecalcs": 163,
"styleRecalcDurationMs": 23.519000000000013,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 22169.123,
"heapDeltaBytes": -41376044,
"heapUsedBytes": 164352664,
"domNodes": -8312,
"jsHeapTotalBytes": -10166272,
"scriptDurationMs": 991.9859999999999,
"eventListeners": -16387,
"totalBlockingTimeMs": 676,
"frameDurationMs": 18.333333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 22339.073999999982,
"styleRecalcs": 162,
"styleRecalcDurationMs": 23.463999999999984,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 22312.655,
"heapDeltaBytes": -41022360,
"heapUsedBytes": 164303716,
"domNodes": -8312,
"jsHeapTotalBytes": -10690560,
"scriptDurationMs": 991.419,
"eventListeners": -16379,
"totalBlockingTimeMs": 683,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 467.46600000005856,
"styleRecalcs": 12,
"styleRecalcDurationMs": 18.13,
"layouts": 3,
"layoutDurationMs": 0.7719999999999999,
"taskDurationMs": 114.14399999999999,
"heapDeltaBytes": 5314908,
"heapUsedBytes": 68698292,
"domNodes": 132,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 10.651,
"eventListeners": 99,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "workflow-execution",
"durationMs": 470.6650000000536,
"styleRecalcs": 13,
"styleRecalcDurationMs": 19.417000000000005,
"layouts": 3,
"layoutDurationMs": 0.636,
"taskDurationMs": 118.846,
"heapDeltaBytes": 5077776,
"heapUsedBytes": 68404012,
"domNodes": 121,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 10.071,
"eventListeners": 97,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.699999999999818
}
]
} |
📝 WalkthroughWalkthroughWorkspace billing recovery now resolves pending operation types explicitly. Top-ups use the top-up path. Subscriptions and missing values use subscription recovery. Unexpected values are reported to Sentry and use subscription recovery. Tests cover these cases. ChangesBilling recovery
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
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 |
f76e044 to
7a236d3
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @wei-hai.
Found 3 finding(s).
| Severity | Count |
|---|---|
| 🟡 Medium | 1 |
| 🟢 Low | 2 |
Panel: 8/8 reviewers contributed findings.
7a236d3 to
00a38fb
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #14759 +/- ##
========================================
Coverage 79.59% 79.59%
========================================
Files 1797 1797
Lines 116879 116890 +11
Branches 34184 33341 -843
========================================
+ Hits 93025 93036 +11
+ Misses 23293 23288 -5
- Partials 561 566 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 3 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Recovering a pending operation picked its client path with a two-way check that sent everything except `topup` down the subscription path. A type this client does not know now reports to Sentry instead of passing silently, and the switch is exhaustive so a widened union fails to compile. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
00a38fb to
1339dbc
Compare
|
Fixed — the two uncovered lines were Worth fixing rather than waiving: that's the value the server sends today for an initial subscription or a plan change, so it's the most-taken branch in production, and nothing exercised it. The existing tests covered Added |
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
dante01yoon
left a comment
There was a problem hiding this comment.
The explicit undefined branch is valid: an omitted optional response field becomes undefined, and older servers only exposed subscription operations through this recovery path. Handling it separately also lets the default branch represent genuinely unknown runtime values while preserving the never exhaustiveness check.
The remaining trade-off is deliberate: a future unknown type is reported to Sentry but still resumes through subscription UI and telemetry. That can temporarily mislabel the operation, but avoids stranding a customer during client/server version skew. The hand-maintained API union means Sentry—not the compile-time check—is the protection against an uncoordinated server change.
|
|
|
|
…e instead of defaulting silently (#14819) Manual backport of #14759 — the automatic cherry-pick of `994d92a` hit a conflict. Recovering a pending billing operation picked its client path with a two-way check, so anything that was not `topup` became `subscription` — including a value this client has never heard of. `subscription` is the worst branch to default into: a mislabelled operation flips `isSettingUp`, covering the user's real plan with a "setting up your subscription" spinner until the operation settles. This replaces the ternary with an exhaustive `switch` that reports an unrecognized value to Sentry (`billing_unknown_resume_mode`) and still resumes recovery. No behavior change against any value the API sends today. ## Conflict resolution One conflict, in the import block of `src/platform/workspace/composables/useWorkspaceBilling.ts`: ``` <<<<<<< HEAD import { computed, ref, shallowRef } from 'vue' ======= import { captureException } from '@sentry/vue' import { computed, ref, shallowRef, watch } from 'vue' >>>>>>> ``` `main` imports `watch` from an unrelated change that is not on this branch. Kept this branch's vue import and added the `@sentry/vue` import the cherry-pick needs. `watch` appears nowhere else in the file on this branch, so importing it would have been an unused-import error. The rest of the commit — `resumeModeFor`, the call site, and all three tests — applied unchanged. The `pending_billing_op_type` union in `workspaceApi.ts` is identical here to `main`, so the `never` exhaustiveness check compiles as written. ## Verified on this branch `vitest run --coverage` on `useWorkspaceBilling.test.ts` (74 passed), `pnpm typecheck`, `pnpm lint` (0 errors), `pnpm format:check`. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
… instead of defaulting silently (#14818) Manual backport of #14759 — the automatic cherry-pick of `994d92a` hit a conflict. Recovering a pending billing operation picked its client path with a two-way check, so anything that was not `topup` became `subscription` — including a value this client has never heard of. `subscription` is the worst branch to default into: a mislabelled operation flips `isSettingUp`, covering the user's real plan with a "setting up your subscription" spinner until the operation settles. This replaces the ternary with an exhaustive `switch` that reports an unrecognized value to Sentry (`billing_unknown_resume_mode`) and still resumes recovery. No behavior change against any value the API sends today. ## Conflict resolution One conflict, in the import block of `src/platform/workspace/composables/useWorkspaceBilling.ts`: ``` <<<<<<< HEAD import { computed, ref, shallowRef } from 'vue' ======= import { captureException } from '@sentry/vue' import { computed, ref, shallowRef, watch } from 'vue' >>>>>>> ``` `main` imports `watch` from an unrelated change that is not on this branch. Kept this branch's vue import and added the `@sentry/vue` import the cherry-pick needs. `watch` appears nowhere else in the file on this branch, so importing it would have been an unused-import error. The rest of the commit — `resumeModeFor`, the call site, and all three tests — applied unchanged. The `pending_billing_op_type` union in `workspaceApi.ts` is identical here to `main`, so the `never` exhaustiveness check compiles as written. ## Verified on this branch `vitest run --coverage` on `useWorkspaceBilling.test.ts` (74 passed), `pnpm typecheck`, `pnpm lint` (0 errors), `pnpm format:check`. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…e instead of defaulting silently (#14817) Manual backport of #14759 — the automatic cherry-pick of `994d92a` hit a conflict. Recovering a pending billing operation picked its client path with a two-way check, so anything that was not `topup` became `subscription` — including a value this client has never heard of. `subscription` is the worst branch to default into: a mislabelled operation flips `isSettingUp`, covering the user's real plan with a "setting up your subscription" spinner until the operation settles. This replaces the ternary with an exhaustive `switch` that reports an unrecognized value to Sentry (`billing_unknown_resume_mode`) and still resumes recovery. No behavior change against any value the API sends today. ## Conflict resolution One conflict, in the import block of `src/platform/workspace/composables/useWorkspaceBilling.ts`: ``` <<<<<<< HEAD import { computed, ref, shallowRef } from 'vue' ======= import { captureException } from '@sentry/vue' import { computed, ref, shallowRef, watch } from 'vue' >>>>>>> ``` `main` imports `watch` from an unrelated change that is not on this branch. Kept this branch's vue import and added the `@sentry/vue` import the cherry-pick needs. `watch` appears nowhere else in the file on this branch, so importing it would have been an unused-import error. The rest of the commit — `resumeModeFor`, the call site, and all three tests — applied unchanged. The `pending_billing_op_type` union in `workspaceApi.ts` is identical here to `main`, so the `never` exhaustiveness check compiles as written. ## Verified on this branch `vitest run --coverage` on `useWorkspaceBilling.test.ts` (74 passed), `pnpm typecheck`, `pnpm lint` (0 errors), `pnpm format:check`. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
… instead of defaulting silently (#14816) Manual backport of #14759 — the automatic cherry-pick of `994d92a` hit a conflict. Recovering a pending billing operation picked its client path with a two-way check, so anything that was not `topup` became `subscription` — including a value this client has never heard of. `subscription` is the worst branch to default into: a mislabelled operation flips `isSettingUp`, covering the user's real plan with a "setting up your subscription" spinner until the operation settles. This replaces the ternary with an exhaustive `switch` that reports an unrecognized value to Sentry (`billing_unknown_resume_mode`) and still resumes recovery. No behavior change against any value the API sends today. ## Conflict resolution One conflict, in the import block of `src/platform/workspace/composables/useWorkspaceBilling.ts`: ``` <<<<<<< HEAD import { computed, ref, shallowRef } from 'vue' ======= import { captureException } from '@sentry/vue' import { computed, ref, shallowRef, watch } from 'vue' >>>>>>> ``` `main` imports `watch` from an unrelated change that is not on this branch. Kept this branch's vue import and added the `@sentry/vue` import the cherry-pick needs. `watch` appears nowhere else in the file on this branch, so importing it would have been an unused-import error. The rest of the commit — `resumeModeFor`, the call site, and all three tests — applied unchanged. The `pending_billing_op_type` union in `workspaceApi.ts` is identical here to `main`, so the `never` exhaustiveness check compiles as written. ## Verified on this branch `vitest run --coverage` on `useWorkspaceBilling.test.ts` (74 passed), `pnpm typecheck`, `pnpm lint` (0 errors), `pnpm format:check`. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Follow-up to #14715. No behavior change against any value the API sends today — this is about what happens to the next one.
Recovering a pending billing operation picked its client path with a two-way check, so anything that was not
topupbecamesubscription— including a value this client has never heard of.Before
flowchart LR A["'subscription'"] --> S[subscription path] B["'topup'"] --> T[topup path] U[undefined] --> S N["any new value"] -.silently.-> S style N fill:#f8d7da,stroke:#b02a37,stroke-dasharray: 4After
flowchart LR A["'subscription'"] --> S[subscription path] B["'topup'"] --> T[topup path] U[undefined] --> S N["any new value"] --> R["subscription path<br/>+ Sentry report"] style N fill:#d1e7dd,stroke:#0f5132 style R fill:#d1e7dd,stroke:#0f5132Why it matters
subscriptionis the worst branch to default into. A mislabelled operation flipsisSettingUp, so the panel covers the user's real plan with a "setting up your subscription" spinner for as long as the operation is pending;topupActionOperationnever matches; andhandleSuccessreconciles the subscription instead of refetching the balance. Same failure #14715 fixed, waiting for the next value.The change
An exhaustive
switch:undefinedstill resolves tosubscription— the compatibility path for a server that does not send the field, and why fix(billing): resume a pending top-up as a top-up, not a subscription #14715 was safe to land alone.billing_unknown_resume_mode).const unexpected: never = typeindefaultmeans a widened union fails to compile.The unknown case still resumes as a subscription, deliberately. It is reachable only when this bundle is older than the server. In that window, dropping recovery strands a customer who cannot reach the payment page, while a wrong panel clears on reload — so recovery wins, and the report is what makes the skew visible.
JSON.stringifyrather thanStringin the report:Stringthrows on a value with no callabletoString/valueOf, and throwing out of the branch that exists to absorb a bad value would abort the whole status read. The value came from a parsed response, so it cannot be circular.Tests
Three paths, all through
fetchStatus:recovers a pending subscription reported explicitlyrecovers a pending top-up as a top-up, not a subscriptiontopuppathreports a resume mode it does not recognizeThe absent-field compatibility path is already covered by the existing
recovers a pending subscription operation from billing status.vitest run --coverage(76 passed, matching how CI runs unit tests),pnpm typecheck,pnpm lint,pnpm format.Scope note
BillingStatusResponseis hand-written inworkspaceApi.tsrather than taken from@comfyorg/ingest-types, so thenevercheck is exhaustive over a hand-maintained union: it catches an edit to that union that misses this switch, but cannot widen on its own when the API changes. Single-sourcing it means regenerating the types package, which rewrites the whole generated surface and belongs in its own PR. Until then the Sentry report is the signal that matters here.The server-side counterpart is tracked separately and does not gate this PR.