Repository navigation
feat(billing): checkout failures land in the dialog, not toasts - #16571
comfydesigner wants to merge 7 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🎭 Playwright: ✅ 1891 passed, 0 failed · 3 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook📦 Bundle Size
⚡ Performance Report
Absolute values
Raw data{
"timestamp": "2026-09-03T02:08:59.174Z",
"gitSha": "7366d5f77cb70027288ace3f158a543d79cce6cf",
"branch": "comfydesigner/checkout-failure-dialog",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2068.778000000009,
"styleRecalcs": 10,
"styleRecalcDurationMs": 5.9430000000000005,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 457.24499999999995,
"heapDeltaBytes": -13850232,
"heapUsedBytes": 55840720,
"domNodes": -280,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 6.595,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-idle",
"durationMs": 2019.7800000000825,
"styleRecalcs": 11,
"styleRecalcDurationMs": 10.633999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 425.57500000000005,
"heapDeltaBytes": 10825932,
"heapUsedBytes": 80994844,
"domNodes": -276,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 6.933999999999999,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1717.4739999999815,
"styleRecalcs": 74,
"styleRecalcDurationMs": 22.029,
"layouts": 14,
"layoutDurationMs": 2.4459999999999997,
"taskDurationMs": 616.465,
"heapDeltaBytes": 5151472,
"heapUsedBytes": 75525960,
"domNodes": -279,
"jsHeapTotalBytes": 6021120,
"scriptDurationMs": 93.797,
"eventListeners": -185,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1707.0360000000164,
"styleRecalcs": 73,
"styleRecalcDurationMs": 22.198000000000004,
"layouts": 14,
"layoutDurationMs": 2.8979999999999997,
"taskDurationMs": 636.398,
"heapDeltaBytes": 4574448,
"heapUsedBytes": 75119404,
"domNodes": -278,
"jsHeapTotalBytes": 6021120,
"scriptDurationMs": 97.681,
"eventListeners": -185,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1672.4100000000135,
"styleRecalcs": 32,
"styleRecalcDurationMs": 11.812000000000001,
"layouts": 6,
"layoutDurationMs": 0.8210000000000001,
"taskDurationMs": 279.98400000000004,
"heapDeltaBytes": 4422776,
"heapUsedBytes": 74864284,
"domNodes": 78,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 7.827000000000001,
"eventListeners": 21,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1671.489000000065,
"styleRecalcs": 31,
"styleRecalcDurationMs": 12.459000000000001,
"layouts": 6,
"layoutDurationMs": 0.885,
"taskDurationMs": 292.529,
"heapDeltaBytes": 4690440,
"heapUsedBytes": 75208196,
"domNodes": 79,
"jsHeapTotalBytes": 6291456,
"scriptDurationMs": 8.966999999999999,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 548.9390000000185,
"styleRecalcs": 12,
"styleRecalcDurationMs": 4.669,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 332.52700000000004,
"heapDeltaBytes": -8087228,
"heapUsedBytes": 62540264,
"domNodes": 20,
"jsHeapTotalBytes": 6553600,
"scriptDurationMs": 116.27499999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66666666666665,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 515.0569999999561,
"styleRecalcs": 13,
"styleRecalcDurationMs": 5.558999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 325.08799999999997,
"heapDeltaBytes": -8068352,
"heapUsedBytes": 62488564,
"domNodes": 22,
"jsHeapTotalBytes": 6291456,
"scriptDurationMs": 104.059,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666682,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2028.887999999995,
"styleRecalcs": 8,
"styleRecalcDurationMs": 4.887000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 508.9809999999999,
"heapDeltaBytes": -14496452,
"heapUsedBytes": 86310224,
"domNodes": -264,
"jsHeapTotalBytes": -573440,
"scriptDurationMs": 25.779000000000003,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2030.3760000000466,
"styleRecalcs": 6,
"styleRecalcDurationMs": 3.7069999999999985,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 479.6739999999999,
"heapDeltaBytes": -14068524,
"heapUsedBytes": 86710624,
"domNodes": -266,
"jsHeapTotalBytes": -1359872,
"scriptDurationMs": 32.467999999999996,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-pan",
"durationMs": 2093.5530000000426,
"styleRecalcs": 68,
"styleRecalcDurationMs": 7.9159999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1155.8319999999999,
"heapDeltaBytes": 19075688,
"heapUsedBytes": 84327432,
"domNodes": -266,
"jsHeapTotalBytes": 225280,
"scriptDurationMs": 541.372,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2087.746999999922,
"styleRecalcs": 66,
"styleRecalcDurationMs": 6.597000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1137.1899999999998,
"heapDeltaBytes": 18178680,
"heapUsedBytes": 83615476,
"domNodes": 8,
"jsHeapTotalBytes": 225280,
"scriptDurationMs": 550.1700000000001,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3068.7110000000075,
"styleRecalcs": 62,
"styleRecalcDurationMs": 7.567999999999999,
"layouts": 60,
"layoutDurationMs": 7.8340000000000005,
"taskDurationMs": 1177.1419999999998,
"heapDeltaBytes": 11696596,
"heapUsedBytes": 79369416,
"domNodes": 6,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 499.161,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3050.155000000018,
"styleRecalcs": 62,
"styleRecalcDurationMs": 8.285999999999998,
"layouts": 60,
"layoutDurationMs": 8.238999999999999,
"taskDurationMs": 1183.187,
"heapDeltaBytes": 9760248,
"heapUsedBytes": 76248620,
"domNodes": 6,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 501.75100000000003,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "legacy-node-drag",
"durationMs": 2168.252999999993,
"styleRecalcs": 42,
"styleRecalcDurationMs": 4.016000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1336.0210000000002,
"heapDeltaBytes": 17867364,
"heapUsedBytes": 85598632,
"domNodes": 4,
"jsHeapTotalBytes": 417792,
"scriptDurationMs": 636.1340000000001,
"eventListeners": 186,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "legacy-node-drag",
"durationMs": 2196.662999999944,
"styleRecalcs": 44,
"styleRecalcDurationMs": 4.611000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1324.135,
"heapDeltaBytes": 13180956,
"heapUsedBytes": 80803080,
"domNodes": 8,
"jsHeapTotalBytes": 417792,
"scriptDurationMs": 610.9,
"eventListeners": 186,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "minimap-idle",
"durationMs": 1999.6790000000146,
"styleRecalcs": 5,
"styleRecalcDurationMs": 2.7040000000000015,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 444.064,
"heapDeltaBytes": 21814344,
"heapUsedBytes": 87949368,
"domNodes": -269,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 23.521,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2008.5980000000063,
"styleRecalcs": 6,
"styleRecalcDurationMs": 3.2179999999999986,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 478.079,
"heapDeltaBytes": 10402760,
"heapUsedBytes": 86942436,
"domNodes": -269,
"jsHeapTotalBytes": -1921024,
"scriptDurationMs": 26.224999999999998,
"eventListeners": -181,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 496.5740000000096,
"styleRecalcs": 47,
"styleRecalcDurationMs": 6.683,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 295.449,
"heapDeltaBytes": 14902168,
"heapUsedBytes": 87358344,
"domNodes": 20,
"jsHeapTotalBytes": 6029312,
"scriptDurationMs": 91.303,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 538.3259999999837,
"styleRecalcs": 48,
"styleRecalcDurationMs": 7.7650000000000015,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 299.99399999999997,
"heapDeltaBytes": 14831464,
"heapUsedBytes": 87392592,
"domNodes": 22,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 88.475,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-idle",
"durationMs": 2007.093999999995,
"styleRecalcs": 10,
"styleRecalcDurationMs": 5.371,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 391.452,
"heapDeltaBytes": -9972516,
"heapUsedBytes": 62708600,
"domNodes": -296,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 5.976999999999999,
"eventListeners": -201,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 1999.4289999999637,
"styleRecalcs": 10,
"styleRecalcDurationMs": 5.587,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 402.408,
"heapDeltaBytes": -8179164,
"heapUsedBytes": 63421116,
"domNodes": -295,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 6.588,
"eventListeners": -201,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1739.2489999999725,
"styleRecalcs": 79,
"styleRecalcDurationMs": 24.704000000000004,
"layouts": 18,
"layoutDurationMs": 3.025,
"taskDurationMs": 615.16,
"heapDeltaBytes": 2503288,
"heapUsedBytes": 75207828,
"domNodes": -292,
"jsHeapTotalBytes": 6545408,
"scriptDurationMs": 68.15,
"eventListeners": -231,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1726.8280000000686,
"styleRecalcs": 77,
"styleRecalcDurationMs": 23.258000000000003,
"layouts": 18,
"layoutDurationMs": 3.1180000000000003,
"taskDurationMs": 609.248,
"heapDeltaBytes": -11858568,
"heapUsedBytes": 60655828,
"domNodes": -294,
"jsHeapTotalBytes": 6545408,
"scriptDurationMs": 67.93299999999999,
"eventListeners": -201,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 915.922999999907,
"styleRecalcs": 20,
"styleRecalcDurationMs": 24.166,
"layouts": 16,
"layoutDurationMs": 10.187,
"taskDurationMs": 701.9580000000001,
"heapDeltaBytes": -5269600,
"heapUsedBytes": 86660384,
"domNodes": 13751,
"jsHeapTotalBytes": 11010048,
"scriptDurationMs": 22.133,
"eventListeners": 2381,
"totalBlockingTimeMs": 110,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "viewport-pan-sweep",
"durationMs": 8101.518999999997,
"styleRecalcs": 248,
"styleRecalcDurationMs": 20.105000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4104.28,
"heapDeltaBytes": 21376048,
"heapUsedBytes": 86233092,
"domNodes": -268,
"jsHeapTotalBytes": 749568,
"scriptDurationMs": 1821.6109999999999,
"eventListeners": -137,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8173.321999999985,
"styleRecalcs": 249,
"styleRecalcDurationMs": 22.875999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4151.331,
"heapDeltaBytes": 13992488,
"heapUsedBytes": 88985304,
"domNodes": -268,
"jsHeapTotalBytes": -385024,
"scriptDurationMs": 1782.911,
"eventListeners": -167,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "vue-large-graph-idle",
"durationMs": 10613.734999999962,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10223.707,
"heapDeltaBytes": -14316644,
"heapUsedBytes": 174934196,
"domNodes": -6548,
"jsHeapTotalBytes": -1142784,
"scriptDurationMs": 125.32300000000002,
"eventListeners": -7473,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333338,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 11161.49100000007,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10662.877000000002,
"heapDeltaBytes": -24783708,
"heapUsedBytes": 176912112,
"domNodes": -6548,
"jsHeapTotalBytes": 4722688,
"scriptDurationMs": 158.45399999999998,
"eventListeners": -7477,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 13780.100000000004,
"styleRecalcs": 68,
"styleRecalcDurationMs": 11.552000000000007,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13126.791000000001,
"heapDeltaBytes": -17926432,
"heapUsedBytes": 169618804,
"domNodes": -6548,
"jsHeapTotalBytes": 10756096,
"scriptDurationMs": 636.467,
"eventListeners": -7471,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 14066.859999999906,
"styleRecalcs": 67,
"styleRecalcDurationMs": 11.832999999999982,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13411.72,
"heapDeltaBytes": -37869720,
"heapUsedBytes": 170790008,
"domNodes": -6548,
"jsHeapTotalBytes": 3448832,
"scriptDurationMs": 634.409,
"eventListeners": -7475,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333326,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-node-resize-workload",
"durationMs": 3972.5729999999544,
"styleRecalcs": 20,
"styleRecalcDurationMs": 58.254,
"layouts": 20,
"layoutDurationMs": 17.922000000000008,
"taskDurationMs": 3833.698,
"heapDeltaBytes": -7248456,
"heapUsedBytes": 181538492,
"domNodes": -6548,
"jsHeapTotalBytes": 14147584,
"scriptDurationMs": 61.805,
"eventListeners": -7475,
"totalBlockingTimeMs": 3,
"frameDurationMs": 17.220000000000013,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 3964.7950000000947,
"styleRecalcs": 20,
"styleRecalcDurationMs": 60.858999999999966,
"layouts": 20,
"layoutDurationMs": 18.364000000000004,
"taskDurationMs": 3815.3,
"heapDeltaBytes": -9306200,
"heapUsedBytes": 178343480,
"domNodes": -6548,
"jsHeapTotalBytes": 13377536,
"scriptDurationMs": 61.212,
"eventListeners": -7473,
"totalBlockingTimeMs": 70,
"frameDurationMs": 17.220000000000013,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 85.64699999999448,
"styleRecalcs": 7,
"styleRecalcDurationMs": 10.239999999999998,
"layouts": 3,
"layoutDurationMs": 0.743,
"taskDurationMs": 63.99500000000001,
"heapDeltaBytes": 3239312,
"heapUsedBytes": 71524784,
"domNodes": 109,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 5.211,
"eventListeners": 49,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "workflow-execution",
"durationMs": 445.3569999999445,
"styleRecalcs": 14,
"styleRecalcDurationMs": 16.39,
"layouts": 2,
"layoutDurationMs": 0.53,
"taskDurationMs": 84.52000000000001,
"heapDeltaBytes": 5055560,
"heapUsedBytes": 73314832,
"domNodes": 125,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 6.239,
"eventListeners": 99,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
}
]
}🔬 E2E Coverage
Top 10 files by uncovered lines
|
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## comfydesigner/checkout-declined-outcome #16571 +/- ##
========================================================================
Coverage 82.30% 82.30%
========================================================================
Files 2020 2021 +1
Lines 116785 116826 +41
Branches 32356 32371 +15
========================================================================
+ Hits 96117 96152 +35
- Misses 20490 20496 +6
Partials 178 178
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 9 files with indirect coverage changes 🚀 New features to boost your workflow:
|
dante01yoon
left a comment
There was a problem hiding this comment.
Reviewing this as a draft since you listed it in the merge order — flag if you'd rather I hold until it's marked ready.
The attended/unattended rule is the right idea and it's the direct answer to the thing you raised in the Slack thread — a toast firing behind a dialog that's already showing the same outcome. Splitting processing from declined also addresses your own point that the decline copy blames the card when the card often isn't at fault. I like both.
One blocking issue: "attended" is asserted by the composable, but only one of its two hosts can actually render an outcome. On the other one this converts a toast into silence.
Also a suggestion on where the failure taxonomy should live. Two smaller notes I checked and cleared: classifyFailure correctly receives the raw Stripe code rather than the mapped copy (the updateOperationStatus call above it doesn't mutate the argument), and the processing_error step is properly wired into the unified dialog's chrome conditions.
| // While this dialog holds an operation, its outcome renders here — the | ||
| // store's success/failure toasts stay quiet. Closing the dialog releases | ||
| // the operation back to toast delivery. | ||
| watch( | ||
| activeCheckoutOperationId, | ||
| (newId, oldId) => { | ||
| if (oldId) billingOperationStore.markOperationUnattended(oldId) | ||
| if (newId) billingOperationStore.markOperationAttended(newId) | ||
| }, | ||
| { immediate: true } | ||
| ) |
There was a problem hiding this comment.
issue (blocking): This marks the operation attended for every host of the composable, but only SubscriptionRequiredDialogContentUnified.vue renders the outcome steps.
The other host is SubscriptionRequiredDialogContentWorkspace.vue, mounted for isLegacyTeamPlan users (useSubscriptionDialog.ts:133). Its template branches on preview (line 6), pricing (70), and success (131) only — there is no declined and no processing_error.
So for a legacy team subscriber whose charge fails:
- This watcher marks the operation attended.
- The store now skips the failure toast —
handleFailure's guard at billingOperationStore.ts:839 checks!attendedOperations.has(opId). advanceToSuccessOnOperationroutes toshowFailureOutcome→checkoutStepbecomes'declined'or'processing_error'.- Neither matches any branch in that template, so the dialog renders empty.
Net result: no outcome screen and no toast. The customer's payment failed and nothing tells them. That's a regression from current main, where the toast at least fires — and it's a worse failure than the blank-step problems on the earlier PRs in this stack, because there the information still existed somewhere on screen.
The root cause is that "attended" is a claim about rendering, but it's being asserted by the composable, which doesn't know whether its host renders outcomes. Two ways to line those up:
- Have the host opt in — the composable takes a
rendersOutcomes: booleanoption (or the dialog callsmarkOperationAttendeditself), so only the unified dialog suppresses; or - Give the legacy host the outcome steps too, which also fixes the
'verifying'blank I flagged on feat(billing): see and cancel a payment your bank is still verifying #15923.
The first is smaller and safe to land now. The second is where this should end up, but it's a bigger change than this PR is scoped for.
There was a problem hiding this comment.
Fixed in bdf6ef5, together with the same class of bug one level down: #15923's re-entry initializer also ran for the workspace host, landing it on a verifying step it can't render. The composable now takes rendersRecoverySteps (introduced on the base branch in 87c4e25); only the Unified host opts in. For the legacy workspace host: no attended claim, no failure routing into steps it lacks — its outcomes stay toast-driven exactly as today. New composable test pins that only an opted-in host claims the operation.
| // The processing class is Stripe telling us the rails hiccuped — the card | ||
| // itself was never judged. Everything else, including codes we don't | ||
| // recognize, is treated as the bank's verdict. | ||
| const PROCESSING_FAILURE_CODES = new Set([ | ||
| 'processing_error', | ||
| 'issuer_not_available', | ||
| 'try_again_later' | ||
| ]) | ||
|
|
||
| function classifyFailure(errorMessage: string | null): BillingFailureClass { | ||
| return errorMessage && PROCESSING_FAILURE_CODES.has(errorMessage) | ||
| ? 'processing' | ||
| : 'declined' | ||
| } |
There was a problem hiding this comment.
suggestion: This is the second hardcoded copy of the same Stripe taxonomy in this file, and the two are already required to agree.
billingFailureDetail (line 1036) has a switch whose processing_error / issuer_not_available / try_again_later arm maps to processingErrorDetail — the exact three codes in this Set. They match today. Nothing keeps them matching: adding a fourth processing code to the switch so it gets the right copy leaves this classifier still calling it 'declined', and the customer gets processing copy on a screen telling them to update their card. A silent, plausible-looking divergence.
Cheapest fix: derive one from the other. classifyFailure could switch on the same code list, or billingFailureDetail could return { detail, class } so there's one table.
The more durable fix is the one I'd actually argue for: this is the server's taxonomy. Stripe distinguishes a processing failure from an issuer decline, Cloud sees that distinction, and we're re-deriving it from a string with a frontend allowlist that has to be redeployed to learn a new code. If the billing-status contract carried the class alongside the code, this function wouldn't exist and couldn't drift.
One thing I'd like your read on regardless: the comment says unrecognized codes are "treated as the bank's verdict." That default sends every unknown failure to the declined screen — "Your card couldn't be charged. Try another card, or contact your bank" plus an Update payment method CTA. For a rails hiccup we don't have a code for, that tells the customer their good card is bad and nudges them to replace it. It's the same misdiagnosis you called out in the thread, just narrowed to three codes rather than removed.
Would defaulting unknown → processing be safer? "Try again" costs a real decline one wasted retry; "contact your bank" costs a healthy card a support call and possibly a replaced card. Worth deciding deliberately rather than inheriting it from the Set.has fallback.
There was a problem hiding this comment.
Agreed — same commit makes the Set the single source: billingFailureDetail now checks PROCESSING_FAILURE_CODES before its switch, and the three duplicate cases are gone. A fourth processing code added to the Set now changes both the copy and the classification together.
…heckout-failure-dialog
…gner/checkout-failure-dialog
…gner/checkout-failure-dialog # Conflicts: # src/platform/workspace/composables/useSubscriptionCheckout.test.ts
…gner/checkout-failure-dialog
dante01yoon
left a comment
There was a problem hiding this comment.
Re-reviewed at f7254767 (was c6b907cc). Both findings resolved, verified in code:
- Attended claim for hosts that can't render outcomes —
rendersRecoveryStepsnow gates both the attended claim and #15923's re-entry initializer, defaulting tofalseso only the Unified host opts in. Catching that the same class of bug existed one level down was the right instinct; fixing it on the base branch rather than here means the legacy workspace host is safe across the whole stack instead of just this PR. - Duplicated Stripe taxonomy —
PROCESSING_FAILURE_CODESis the single source now:billingFailureDetailchecks it before its switch and the three duplicate cases are gone. A fourth processing code added to the Set moves the copy and the classification together, which is what I was after.
Approving. Still marked draft — that's yours to lift whenever the stack below it is ready; nothing on my side is holding it.
…gner/checkout-failure-dialog
dante01yoon
left a comment
There was a problem hiding this comment.
Following up on my approval — CI evidence landed after it, so flagging rather than leaving the approval unqualified. No new code review: the head is unchanged (93c94ba5), and both points I raised on Sep 2 (the legacy-host attended claim, and PROCESSING_FAILURE_CODES as the single source for billingFailureDetail) are still resolved in bdf6ef527e.
Unanchored
browser_tests/tests/dialogs/checkout3dsStates.spec.ts:167 › Checkout 3DS verifying re-entry › cancel returns to plan selection @cloud fails on this head, all 3 retries (run 33705710528, started 01:57Z Sep 3 — about five hours after I approved at 21:08Z Sep 2).
It looks inherited rather than caused by this PR: the same test fails on your base #15944 and on #16848 above you, and not on #16561, which sits on the other branch. I've asked on #15944 to trace where it enters, since that's the lowest point in the lineage where it's actually observed (#15923's latest head never ran the e2e job, so it's unmeasured rather than green).
Nothing for you to do here if it resolves on #15944 — noting it so this PR doesn't merge on a red suite inherited from underneath.
(creditsTile.spec.ts:489 also fails, but on both lineages, so that one reads as environmental.)
Closes FE-1981. Stacked on #15944 (declined outcome screen) — review that first.
Implements the attended/unattended rule for checkout outcomes: while the pricing dialog is open, a failed or succeeded charge renders in the dialog; toasts only carry outcomes nobody is watching.
What changes
billingOperationStore): terminal failures now carry afailureClass—processingfor the rails-hiccup codes (processing_error,issuer_not_available,try_again_later),declinedfor everything else including unrecognized codes. The mapped human copy inerrorMessageis unchanged.SubscriptionProcessingErrorWorkspace, Figma 5709-49062): "Payment couldn't be processed" — the card is fine, so the only action is Try again, which returns to the confirm step with the quote intact. Declined (5b, from feat(billing): show the bank's decline reason inside the checkout #15944) keeps Update payment method; processing errors deliberately don't offer it.advanceToSuccessOnOperationnow routes a terminal failure to 5b/5c by class, instead of leaving the customer on the confirm step with only a toast. The re-entry (verifying) path classifies the same way.Unattended operations — dialog closed mid-verification, other-tab checkouts, top-ups — keep exactly today's toast behaviour.
Tests
┆ Linear: FE-1981