Repository navigation
feat(billing): show the bank's decline reason inside the checkout - #15944
comfydesigner wants to merge 10 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: ✅ 1895 passed, 0 failed · 1 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook📦 Bundle Size
⚡ Performance Report
Absolute values
Raw data{
"timestamp": "2026-09-03T02:10:40.806Z",
"gitSha": "83dec2cf0a168119dec6c9b30eebe92e56d6e139",
"branch": "comfydesigner/checkout-declined-outcome",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2054.844000000003,
"styleRecalcs": 9,
"styleRecalcDurationMs": 6.925999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 494.864,
"heapDeltaBytes": 2286536,
"heapUsedBytes": 72612692,
"domNodes": -281,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 8.676,
"eventListeners": -185,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-idle",
"durationMs": 2021.1229999999887,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.416999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 504.93100000000004,
"heapDeltaBytes": -12065812,
"heapUsedBytes": 57603884,
"domNodes": -282,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 8.34,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1925.0169999999684,
"styleRecalcs": 80,
"styleRecalcDurationMs": 43.865,
"layouts": 14,
"layoutDurationMs": 4.913,
"taskDurationMs": 926.3100000000001,
"heapDeltaBytes": -9803148,
"heapUsedBytes": 59766328,
"domNodes": -281,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 153.92,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1815.0769999999739,
"styleRecalcs": 76,
"styleRecalcDurationMs": 36.348,
"layouts": 14,
"layoutDurationMs": 4.628,
"taskDurationMs": 839.912,
"heapDeltaBytes": -7969740,
"heapUsedBytes": 62467816,
"domNodes": -281,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 140.66,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1705.2100000000223,
"styleRecalcs": 30,
"styleRecalcDurationMs": 20.042,
"layouts": 6,
"layoutDurationMs": 1.2389999999999999,
"taskDurationMs": 368.04099999999994,
"heapDeltaBytes": 4424072,
"heapUsedBytes": 74616508,
"domNodes": 78,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 11.979999999999997,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1670.4859999999826,
"styleRecalcs": 32,
"styleRecalcDurationMs": 16.278000000000002,
"layouts": 6,
"layoutDurationMs": 1.0809999999999997,
"taskDurationMs": 350.172,
"heapDeltaBytes": 4437932,
"heapUsedBytes": 74566356,
"domNodes": 79,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 10.806,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 756.7070000000058,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.669000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 483.99100000000004,
"heapDeltaBytes": 17509000,
"heapUsedBytes": 87708364,
"domNodes": 14,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 166.489,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 647.4719999999934,
"styleRecalcs": 11,
"styleRecalcDurationMs": 7.906,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 437.847,
"heapDeltaBytes": -7808096,
"heapUsedBytes": 62735336,
"domNodes": 18,
"jsHeapTotalBytes": 6029312,
"scriptDurationMs": 153.363,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2050.161000000003,
"styleRecalcs": 4,
"styleRecalcDurationMs": 3.7509999999999972,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 587.117,
"heapDeltaBytes": 10819216,
"heapUsedBytes": 86516548,
"domNodes": -271,
"jsHeapTotalBytes": -1921024,
"scriptDurationMs": 31.55,
"eventListeners": -185,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2034.0099999999666,
"styleRecalcs": 5,
"styleRecalcDurationMs": 3.788,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 605.465,
"heapDeltaBytes": 10229516,
"heapUsedBytes": 86104124,
"domNodes": -273,
"jsHeapTotalBytes": -1921024,
"scriptDurationMs": 37.889,
"eventListeners": -183,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2230.858000000012,
"styleRecalcs": 66,
"styleRecalcDurationMs": 11.289,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1621.3959999999997,
"heapDeltaBytes": -15435748,
"heapUsedBytes": 86291780,
"domNodes": -273,
"jsHeapTotalBytes": -872448,
"scriptDurationMs": 809.388,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2139.4940000000133,
"styleRecalcs": 65,
"styleRecalcDurationMs": 11.081999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1508.9360000000001,
"heapDeltaBytes": 14917156,
"heapUsedBytes": 80659872,
"domNodes": -272,
"jsHeapTotalBytes": 225280,
"scriptDurationMs": 738.042,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3564.0249999999583,
"styleRecalcs": 60,
"styleRecalcDurationMs": 10.397,
"layouts": 60,
"layoutDurationMs": 12.553999999999998,
"taskDurationMs": 1648.593,
"heapDeltaBytes": 8030996,
"heapUsedBytes": 75277976,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 746.0870000000001,
"eventListeners": 10,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3418.851000000018,
"styleRecalcs": 60,
"styleRecalcDurationMs": 10.404,
"layouts": 60,
"layoutDurationMs": 12.820000000000002,
"taskDurationMs": 1624.851,
"heapDeltaBytes": 8466996,
"heapUsedBytes": 75532160,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 733.537,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "legacy-node-drag",
"durationMs": 3037.085999999988,
"styleRecalcs": 40,
"styleRecalcDurationMs": 5.244999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1866.2930000000001,
"heapDeltaBytes": 17100332,
"heapUsedBytes": 84483420,
"domNodes": 0,
"jsHeapTotalBytes": 417792,
"scriptDurationMs": 942.255,
"eventListeners": 188,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.660000000000007,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3011.9600000000446,
"styleRecalcs": 41,
"styleRecalcDurationMs": 6.003000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1830.823,
"heapDeltaBytes": 18437844,
"heapUsedBytes": 85229300,
"domNodes": -280,
"jsHeapTotalBytes": 2252800,
"scriptDurationMs": 911.691,
"eventListeners": 188,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2043.8690000000292,
"styleRecalcs": 7,
"styleRecalcDurationMs": 5.507999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 597.925,
"heapDeltaBytes": 10076056,
"heapUsedBytes": 86629412,
"domNodes": -269,
"jsHeapTotalBytes": -2445312,
"scriptDurationMs": 31.901,
"eventListeners": -185,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2046.3039999999637,
"styleRecalcs": 4,
"styleRecalcDurationMs": 3.895999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 604.033,
"heapDeltaBytes": 9954936,
"heapUsedBytes": 86544640,
"domNodes": -275,
"jsHeapTotalBytes": -1396736,
"scriptDurationMs": 31.768000000000004,
"eventListeners": -185,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 606.9590000000176,
"styleRecalcs": 47,
"styleRecalcDurationMs": 10.004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 417.08,
"heapDeltaBytes": 14777820,
"heapUsedBytes": 87562856,
"domNodes": 20,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 145.969,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 577.0880000000034,
"styleRecalcs": 47,
"styleRecalcDurationMs": 9.824,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 402.845,
"heapDeltaBytes": 14845900,
"heapUsedBytes": 87408560,
"domNodes": 20,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 139.346,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2013.1510000000503,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.122,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 492.83200000000005,
"heapDeltaBytes": -8269088,
"heapUsedBytes": 64281780,
"domNodes": -293,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 7.765999999999998,
"eventListeners": -203,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2008.4410000000616,
"styleRecalcs": 10,
"styleRecalcDurationMs": 7.799,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 487.311,
"heapDeltaBytes": 3541016,
"heapUsedBytes": 75974832,
"domNodes": -297,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 7.731999999999999,
"eventListeners": -231,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1707.0769999999698,
"styleRecalcs": 77,
"styleRecalcDurationMs": 34.969,
"layouts": 18,
"layoutDurationMs": 5.549999999999999,
"taskDurationMs": 785.486,
"heapDeltaBytes": -11257116,
"heapUsedBytes": 60992144,
"domNodes": -296,
"jsHeapTotalBytes": 4448256,
"scriptDurationMs": 97.63000000000001,
"eventListeners": -201,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1716.1800000000085,
"styleRecalcs": 77,
"styleRecalcDurationMs": 34.428,
"layouts": 18,
"layoutDurationMs": 4.724,
"taskDurationMs": 776.4649999999999,
"heapDeltaBytes": 3204656,
"heapUsedBytes": 75524464,
"domNodes": -295,
"jsHeapTotalBytes": 6545408,
"scriptDurationMs": 99.759,
"eventListeners": -233,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 1401.3630000000603,
"styleRecalcs": 18,
"styleRecalcDurationMs": 30.916999999999994,
"layouts": 14,
"layoutDurationMs": 14.307000000000004,
"taskDurationMs": 950.4749999999999,
"heapDeltaBytes": -5421328,
"heapUsedBytes": 86861420,
"domNodes": 13751,
"jsHeapTotalBytes": 11010048,
"scriptDurationMs": 32.60900000000001,
"eventListeners": 2383,
"totalBlockingTimeMs": 125,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "viewport-pan-sweep",
"durationMs": 8407.28200000001,
"styleRecalcs": 247,
"styleRecalcDurationMs": 38.874,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5530.153,
"heapDeltaBytes": -11266920,
"heapUsedBytes": 89339888,
"domNodes": -268,
"jsHeapTotalBytes": -1396736,
"scriptDurationMs": 2485.272,
"eventListeners": -139,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "viewport-pan-sweep",
"durationMs": 8445.856999999933,
"styleRecalcs": 248,
"styleRecalcDurationMs": 38.443,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5595.991000000001,
"heapDeltaBytes": -12046480,
"heapUsedBytes": 88466816,
"domNodes": -269,
"jsHeapTotalBytes": -1134592,
"scriptDurationMs": 2531.604,
"eventListeners": -139,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "vue-large-graph-idle",
"durationMs": 17904.042000000005,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17115.984,
"heapDeltaBytes": -30653280,
"heapUsedBytes": 179114360,
"domNodes": -6548,
"jsHeapTotalBytes": 2228224,
"scriptDurationMs": 286.126,
"eventListeners": -7471,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.780000000000047,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 17928.739999999947,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17180.272,
"heapDeltaBytes": -32838772,
"heapUsedBytes": 176926072,
"domNodes": -6548,
"jsHeapTotalBytes": -655360,
"scriptDurationMs": 283.10200000000003,
"eventListeners": -7475,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 21616.403999999988,
"styleRecalcs": 163,
"styleRecalcDurationMs": 19.072000000000035,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 21333.591,
"heapDeltaBytes": -36614948,
"heapUsedBytes": 179896128,
"domNodes": -6548,
"jsHeapTotalBytes": 1302528,
"scriptDurationMs": 919.3,
"eventListeners": -7467,
"totalBlockingTimeMs": 63,
"frameDurationMs": 17.220000000000073,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 22221.389999999927,
"styleRecalcs": 178,
"styleRecalcDurationMs": 21.303999999999988,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 21877.978000000003,
"heapDeltaBytes": -39637028,
"heapUsedBytes": 162449576,
"domNodes": -6548,
"jsHeapTotalBytes": 2351104,
"scriptDurationMs": 943.869,
"eventListeners": -7467,
"totalBlockingTimeMs": 207,
"frameDurationMs": 17.776666666666763,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-node-resize-workload",
"durationMs": 6312.140999999997,
"styleRecalcs": 20,
"styleRecalcDurationMs": 73.10100000000003,
"layouts": 20,
"layoutDurationMs": 24.248000000000005,
"taskDurationMs": 6216.487,
"heapDeltaBytes": -26183960,
"heapUsedBytes": 176706272,
"domNodes": -6548,
"jsHeapTotalBytes": 12603392,
"scriptDurationMs": 117.333,
"eventListeners": -7471,
"totalBlockingTimeMs": 436,
"frameDurationMs": 18.33666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-node-resize-workload",
"durationMs": 6240.110999999956,
"styleRecalcs": 20,
"styleRecalcDurationMs": 75.11399999999996,
"layouts": 20,
"layoutDurationMs": 24.521,
"taskDurationMs": 6152.192,
"heapDeltaBytes": -27731328,
"heapUsedBytes": 174713276,
"domNodes": -6548,
"jsHeapTotalBytes": 12075008,
"scriptDurationMs": 109.866,
"eventListeners": -7473,
"totalBlockingTimeMs": 449,
"frameDurationMs": 17.776666666666703,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 99.53999999993357,
"styleRecalcs": 7,
"styleRecalcDurationMs": 12.926000000000002,
"layouts": 2,
"layoutDurationMs": 0.5979999999999998,
"taskDurationMs": 71.317,
"heapDeltaBytes": 3244212,
"heapUsedBytes": 71884476,
"domNodes": 112,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 5.835000000000002,
"eventListeners": 49,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "workflow-execution",
"durationMs": 466.35600000001887,
"styleRecalcs": 12,
"styleRecalcDurationMs": 19.339999999999996,
"layouts": 3,
"layoutDurationMs": 0.8599999999999999,
"taskDurationMs": 101.217,
"heapDeltaBytes": 5049388,
"heapUsedBytes": 73397128,
"domNodes": 123,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 7.523000000000001,
"eventListeners": 99,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
}
]
}🔬 E2E Coverage
Top 10 files by uncovered lines
|
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## comfydesigner/checkout-3ds-cancel #15944 +/- ##
====================================================================
Coverage ? 82.30%
====================================================================
Files ? 2020
Lines ? 116785
Branches ? 32356
====================================================================
Hits ? 96117
Misses ? 20490
Partials ? 178
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
09c5f8a to
2aad3b1
Compare
…heckout-declined-outcome
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @comfydesigner.
Found 6 finding(s).
| Severity | Count |
|---|---|
| 🟠 High | 1 |
| 🟡 Medium | 2 |
| 🟢 Low | 3 |
Panel: 8/8 reviewers contributed findings.
| checkoutDeclineReason.value = null | ||
| const opId = activeCheckoutOperation.value?.opId | ||
| if (opId) billingOperationStore.clearOperation(opId) | ||
| checkoutStep.value = 'preview' |
There was a problem hiding this comment.
🟠 High — declined is only entered from the verifying watcher, and verifying is only the initial step on re-entry with a recovered pending operation — a path where previewData, selectedTierKey, and selectedTeamCheckout are all still null. Forcing checkoutStep to 'preview' therefore leaves previewVariant null, so none of the branches under <template v-if="checkoutStep === 'preview'"> render and both declined CTAs (Back, and Update payment method which delegates here) strand the user on an empty dialog with only the back arrow as an escape. Fall back to 'pricing' when there is no preserved quote/selection, the way handleCancelPendingPayment and the success branch already guard this exact case.
Raised by 6 of 8 reviewers (claude-opus-5-thinking-max adversarial, gpt-5.6-sol-max adversarial, kimi-k3-max adversarial, claude-opus-5-thinking-max edge-case, gpt-5.6-sol-max edge-case, kimi-k3-max edge-case).
There was a problem hiding this comment.
Fixed in f3600d4 — back routes to 'preview' only when previewData is preserved, else to plan selection; composable tests cover both entry paths.
| /> | ||
|
|
||
| <SubscriptionDeclinedWorkspace | ||
| v-if="checkoutStep === 'declined'" |
There was a problem hiding this comment.
🟡 Medium — The declined screen is shown for any operation in the terminal failed status, which the billing store also uses for checkout_superseded (deliberately not surfaced, since its replacement is proceeding normally) and for backend/network/system failures. Those cases now get a full-screen "Payment declined" that blames the customer's bank and offers a payment-method fix that cannot address the real error; gate the transition on a provider-decline category, or use generic failure copy.
Raised by 3 of 8 reviewers (claude-opus-5-thinking-max adversarial, gpt-5.6-sol-max adversarial, gpt-5.6-sol-max edge-case).
There was a problem hiding this comment.
Partly guarded already, fully addressed one PR up. Superseded operations can't reach this screen: supersession only happens when a new attempt has replaced the active operation, and both routing sites guard on the active operation id, so the superseded op is no longer the one being watched. Backend/system failures do land here on this branch with the generic mapped copy; the classification that splits them arrives in #16571 (stacked on this), where processing-class failures get their own outcome screen with Try again and no payment-method CTA. The residual default — unknown code → declined — is deliberate: an unrecognized failure on a charge is most likely the charge.
| <span class="text-sm text-muted-foreground"> | ||
| {{ $t('subscription.declined.reasonLabel') }} | ||
| </span> | ||
| <span class="text-sm text-base-foreground">{{ declineReason }}</span> |
There was a problem hiding this comment.
🟡 Medium — checkoutDeclineReason comes from the operation's errorMessage, which handleFailure fills with the first-party billingFailureDetail(...) i18n string (falling back to "We couldn't update your subscription. Please try again."), never the processor's text — so labeling it "Stripe reasoning:" attributes our own copy to Stripe. Since that value is never empty for a failed subscription op, the v-if always renders and usually just restates the body text, meaning the null case the unit test covers cannot occur in production.
Raised by 1 of 8 reviewers (claude-opus-5-thinking-max adversarial).
There was a problem hiding this comment.
Label fixed in f3600d4: "What your bank said" (the copy the Outcome Screens design uses) — the box carries our mapped rendering of the bank's decline code, so attributing it to Stripe was wrong on both ends. The always-renders point stands for the generic fallback until #16571's failure classification lands; with it, the verdict-class codes are the ones that reach this screen with a reason.
| function handleDeclinedBack() { | ||
| checkoutDeclineReason.value = null | ||
| const opId = activeCheckoutOperation.value?.opId | ||
| if (opId) billingOperationStore.clearOperation(opId) |
There was a problem hiding this comment.
🟢 Low — clearOperation(opId) removes the record but leaves activeCheckoutOperationId pointing at the deleted id, unlike the sibling cleanup paths resetToPricing() and handleCancelPendingPayment(), which both null it right after removing the operation. Because activeCheckoutOperation only falls back to billingOperationStore.subscriptionActionOperation when that ref is null, the dialog stays blind to any other subscription operation (e.g. a reconciliation_needed op) until a new subscribe overwrites the id.
Raised by 3 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case, kimi-k3-max edge-case).
There was a problem hiding this comment.
Fixed in f3600d4 — handleDeclinedBack nulls activeCheckoutOperationId right after clearOperation, matching resetToPricing and handleCancelPendingPayment.
| !isEmbeddedConfirmStep && | ||
| !isVerifyingStep | ||
| !isVerifyingStep && | ||
| !isDeclinedStep |
There was a problem hiding this comment.
🟢 Low — This adds the declined step to the "Choose a Plan" header guard, but the v-if="reason === 'out_of_credits'" block just below it has no step gating, so a dialog opened from an out-of-credits prompt stacks "Insufficient credits" above "Payment declined" inside a fixed-height overflow-hidden panel. The verifying and success steps already have the same omission, so gating that block on the step is a better fix than adding another negation here.
Raised by 1 of 8 reviewers (claude-opus-5-thinking-max edge-case).
There was a problem hiding this comment.
Took the better fix as suggested: the out-of-credits block is now positively gated on the plan-facing steps (pricing/preview), which also covers the pre-existing verifying/success stacking.
| expect(screen.getByText('Payment declined')).toBeInTheDocument() | ||
| }) | ||
|
|
||
| it('offers a retry rather than ending the flow', async () => { |
There was a problem hiding this comment.
🟢 Low — The name promises a flow-level guarantee, but the test only asserts that the child emits updatePayment and back — nothing covers where the parent's handleDeclinedBack actually lands, which is exactly where the retry dead-ends on the preview step. Asserting the resulting checkoutStep in a useSubscriptionCheckout or dialog-level test would catch that.
Raised by 1 of 8 reviewers (claude-opus-5-thinking-max edge-case).
There was a problem hiding this comment.
Right level, wrong file — added the flow-level assertions to the composable suite in f3600d4: in-flow back lands on the preserved preview, recovered back lands on pricing. The component test keeps asserting only what the child owns (its emits).
dante01yoon
left a comment
There was a problem hiding this comment.
This is the right screen and it does close the hole I flagged on #15923 — good catch calling that out explicitly in the description rather than letting the two PRs quietly depend on each other.
One blocking issue: the retry route out of this step reproduces the same class of dead end one layer up. On the re-entry path there's no selection or preview to return to, and handleDeclinedBack sends the customer to 'preview' anyway. Detail inline.
Also answered your "one deviation to confirm" question inline — short version, keep the Back button.
I checked and dropped one concern that turned out to be unfounded: I thought checkoutDeclineReason could surface a raw client-side exception string under the "Stripe reasoning:" label, since setAuthenticationRetry writes error.message into errorMessage. It can't — handleFailure routes through updateOperationStatus(opId, 'failed', detail ?? defaultMessage) (billingOperationStore.ts:761), which overwrites errorMessage with the server-derived detail before status ever reaches 'failed'. Noting it so you don't have to re-derive it.
| function handleDeclinedBack() { | ||
| checkoutDeclineReason.value = null | ||
| const opId = activeCheckoutOperation.value?.opId | ||
| if (opId) billingOperationStore.clearOperation(opId) | ||
| checkoutStep.value = 'preview' |
There was a problem hiding this comment.
issue (blocking): 'preview' isn't always a step the customer can return to, and this routes there unconditionally.
The declined step has two entry paths:
- In-flow — customer picked a plan in this dialog session, so
selectedTierKeyandpreviewDataare populated. Returning to'preview'works exactly as described. - Re-entry — the dialog opened onto
'verifying'because a pending 3DS operation was recovered from the store (feat(billing): see and cancel a payment your bank is still verifying #15923, useSubscriptionCheckout.ts:156). The operation polls tofailed, the watcher sets'declined'. There is noselectedTierKeyandpreviewDatais stillnull— nothing was ever previewed in this session.
On path 2, handleDeclinedBack sets checkoutStep = 'preview' and previewVariant returns null (line 680: no selectedTeamCheckout, no previewData). Every v-if inside <template v-if="checkoutStep === 'preview'"> tests previewVariant, so all four are false and the dialog renders empty — the same blank-step failure this PR exists to fix, just moved one click later.
The sibling branch in that same watcher already handles this asymmetry:
if (status === 'succeeded') {
if (selectedTierKey.value || isTeamCheckout.value) {
checkoutStep.value = 'success'
} else {
emit('close', true) // nothing to show — don't strand them
}Could the declined back path take the same shape? Something like: return to 'preview' when there's a selection to return to, otherwise 'pricing' — which for a re-entry decline is arguably the more useful landing anyway, since the customer needs to re-pick a plan regardless. 'pricing' also renders correctly with no preview state, so it can't blank.
Same applies to handleUpdatePayment at line 938, since it delegates here.
There was a problem hiding this comment.
Fixed in f3600d4: back now routes to 'preview' only when previewData is preserved, otherwise to plan selection — a recovered decline has no quote to land on, so pricing is the only step that can host it. Composable tests pin both directions (in-flow → preview, re-entry → pricing), and clearing the operation now also nulls the active pointer so the dialog isn't blind to a later operation.
| variant="muted-textonly" | ||
| size="lg" | ||
| class="w-full rounded-lg" | ||
| @click="$emit('back')" |
There was a problem hiding this comment.
question → answered: you asked whether to keep this secondary Back or rely on the X plus a reopen. I'd keep it.
The X isn't equivalent here. With the declined step suppressing the dialog header, closing is the only other route, and on reopen the customer doesn't land back where they were — #15923's initializer reads subscriptionActionOperation, the failed operation no longer matches (the selector takes pending and reconciliation_needed only), so they land on 'pricing' and start over. That directly contradicts the design note you quoted — "Declined is not terminal: back returns to the confirm step with everything intact for a retry." The X gives them terminal-with-extra-steps.
So the deviation is the design being honored rather than departed from. Worth saying that in the Figma thread rather than dropping the button.
(One caveat: "everything intact" only holds on the in-flow path — see my comment on handleDeclinedBack. Once that's guarded, this reasoning is clean.)
There was a problem hiding this comment.
Agreed and keeping it — and your re-entry analysis is now doubly load-bearing, since Back's destination depends on exactly that distinction (see the routing fix above).
| isDeclinedStep) && | ||
| 'max-xl:w-[min(430px,92vw)]', | ||
| isEmbeddedPaymentStep && 'max-xl:h-[85vh]' | ||
| isEmbeddedPaymentStep && 'max-xl:h-[min(740px,85vh)]' |
There was a problem hiding this comment.
question: This changes the embedded payment step's mobile height (max-xl:h-[85vh] → max-xl:h-[min(740px,85vh)]), which is a different step from the one this PR adds and isn't mentioned in the description.
It caps the payment step at 740px on tall phones where 85vh previously exceeded that. Plausibly a deliberate alignment with the other embedded steps — they all use min(740px,...) — but I'd rather not infer it.
Is it intentional? If yes, could you add a line to the description so it isn't read as a stray edit during a bisect later. If it's incidental, dropping it keeps this PR to the declined step.
There was a problem hiding this comment.
Deliberate, and you're right it belonged in the description — added. It caps the payment step at 740px on tall phones to match the min(740px,…) treatment every other embedded step already uses; without it the payment step was the one screen that could grow past its siblings.
| // "Update payment method" lands on the same confirm step; the caller decides | ||
| // to collect a new method rather than reuse the one the bank refused, since | ||
| // that selection lives with the dialog. | ||
| function handleUpdatePayment() { |
There was a problem hiding this comment.
suggestion (non-blocking): handleUpdatePayment is currently an exact alias of handleDeclinedBack, and both are exported. The behavioral difference lives entirely in the dialog wrapper (handleDeclinedUpdatePayment → selectSavedPaymentMethod(null)), which the comment explains well.
Since the composable can't distinguish them, exporting two names invites a future caller to pick the wrong one and get silently different behavior depending on which host wires it. Either export one function and let the dialog own the method-collection difference, or give this one the selectSavedPaymentMethod(null) responsibility so the names mean different things.
Not blocking — just that two identical exported functions is a seam that tends to drift.
There was a problem hiding this comment.
Removed in f3600d4 — the composable exports only handleDeclinedBack, and the dialog wrapper composes the method-collection choice itself. The comment explaining why that choice lives with the dialog moved onto the wrapper.
…heckout-declined-outcome
…heckout-declined-outcome
dante01yoon
left a comment
There was a problem hiding this comment.
Re-reviewed at e2832200 (was 7c97ea69). Every finding from the previous round is resolved, and the fixes are the right ones rather than the minimal ones. Verified in code:
- Back routing (
useSubscriptionCheckout.ts:941) —checkoutStep.value = previewData.value ? 'preview' : 'pricing'. A recovered decline has no quote to land on and now goes to plan selection instead of a preview step where everyv-ifis false. Both directions pinned by tests:backs out of an in-flow decline to the preserved previewandbacks out of a recovered decline to plan selection, not a blank preview. - Stale pointer —
activeCheckoutOperationId.value = nullright afterclearOperation, matchingresetToPricingandhandleCancelPendingPayment. - Duplicate exports —
handleUpdatePaymentis gone entirely (0 references); the dialog wrapper owns the method-collection difference. The seam I was worried about no longer exists. - Out-of-credits stacking — now positively gated:
reason === 'out_of_credits' && (checkoutStep === 'pricing' || checkoutStep === 'preview'). That's the better fix; it also closes the pre-existing verifying/success case rather than just the one I happened to name. max-xl:h-[min(740px,85vh)]— confirmed deliberate and now in the description.- Decline reason label — "What your bank said" instead of attributing it to Stripe.
The door-and-room problem from #15923 is correctly resolved here: this PR now carries both the 'declined' transition and SubscriptionDeclinedWorkspace, so each PR in the stack renders every state it can enter. That was the right call over merging the two as a unit.
On the residual default (unknown failure code → declined): agreed it's the reasonable prior, and I'll pick up the processing-class split when I review #16571.
Approving. Nothing outstanding from my side.
…heckout-declined-outcome
dante01yoon
left a comment
There was a problem hiding this comment.
Following up on my approval — new CI evidence has landed since, so I want to flag it rather than leave the approval standing unqualified. No new code review here; everything I raised on Sep 2 is still resolved and the head is unchanged (08905b2a).
Unanchored
browser_tests/tests/dialogs/checkout3dsStates.spec.ts:167 › Checkout 3DS verifying re-entry › cancel returns to plan selection @cloud is failing on this head, and it fails all 3 retries — not a flake.
Timing is why I missed it: I approved at 21:05Z on Sep 2, and the run that caught this (33705704392) started 01:57Z on Sep 3, about five hours later. Same commit, later run.
What I could narrow down:
- The test doesn't exist on
main— this stack added it. - It fails here, on #16571, and on #16848 — the whole
checkout-3ds-cancellineage above #15923. - It does not fail on #16561, which sits on the other branch, so it isn't environmental.
- I couldn't clear #15923 either way: its latest head (
34861f99) hasn't had the e2e job run at all, so "no failures" there means "not measured", not "passing".
That leaves this PR as the first place in the lineage where the failure is actually observed, which makes it the most likely origin. The test drives re-entry → Cancel payment → expects the Choose a Plan heading, and this PR touched both the header guard (adding isDeclinedStep) and the step-routing around re-entry, so there's a plausible mechanism.
Could you take a look? If it turns out to originate in #15923, that's worth saying here so the stack above it stops inheriting a red suite.
(creditsTile.spec.ts:489 also fails, but it fails on both lineages including #16561, so that one reads as environmental.)
My approval stands on the code as reviewed; I'd just want this green before it merges.
## Summary
"Retry verification" was a no-op that reported itself as a success, so a
failed 3DS challenge put the customer in a loop; this removes the
affordance and restricts `handleNextAction` to the one state it is
correct for.
## Changes
- **What**: `stripe.handleNextAction()` resumes an *in-progress*
challenge. After a failed one the PaymentIntent is
`requires_payment_method` with `next_action: null`, so the call resolves
with no error and no effect — which `runPaymentIntentAction` read as
success, set `authenticationState: 'processing'`, and let the next poll
re-derive `failed_retryable`. The button came back and the customer
looped. A tester on `test-v2` hit exactly that.
Retry is a fresh attempt, not a re-confirmation of the existing intent,
so the fix is a removal:
- `retryPaymentAuthentication` now requires `authenticationState ===
'requires_action'`; `canRetryAuthentication` is derived for
`requires_action` alone. A failed challenge or a plain decline never
offers to resume.
- On the surviving path, an intent that resolves *without advancing*
past its pre-challenge status is reported as failed rather than
`processing` (`RESUMED_INTENT_STATUSES`). The intent can move between
poll and click, so the assertion is on the returned status, not on the
pre-call state.
- `setAuthenticationRetry` → `setAuthenticationFailed`; its `canRetry`
parameter is gone, since the answer is now always no.
- Preview components (`SubscriptionAddPaymentPreviewWorkspace.vue`,
`SubscriptionTransitionPreviewWorkspace.vue`) lose the retry button, the
`retryAuthentication` emit, and the `canRetryAuthentication` /
`isAuthenticating` props — `isAuthenticating` existed only to spin that
button. The failure alert stays.
- Both dialog hosts (`SubscriptionRequiredDialogContentUnified.vue`,
`SubscriptionRequiredDialogContentWorkspace.vue`) drop the corresponding
bindings, and `useSubscriptionCheckout` drops the now-unused
`canRetryAuthentication` / `isAuthenticating` /
`retryPaymentAuthentication` exports.
- `TopUpCreditsDialogContentWorkspace.vue` keeps the in-page resume,
because `requires_action` is the case it is correct for — relabelled
`completeVerification`, and `topupActionOperation` now selects on
`authenticationState` so a failed top-up still shows its error instead
of dropping out of the dialog.
- `billingOperation.retryVerification` and the now-unreachable
`billingOperation.authenticationManagerRequired` are removed from all 15
locale files. Non-en locales are generated, and `pnpm locale:check`
reports `0 prunable keys` against this diff — the manual removal matches
what `pnpm locale` would prune.
- **Breaking**: none for users; the removed affordance never worked.
## Review Focus
**A deliberately removed assertion.** `billingOperationStore.test.ts`
previously asserted retry was offered for `decline_reason:
'card_declined'` and that `retryPaymentAuthentication` resolved `true`
there. That is the incoherence this ticket dissolves — a decline is not
a resumable challenge, and `handleNextAction` can never satisfy one. The
test is kept and inverted: the decline detail is still surfaced, retry
resolves `false`, and Stripe is never called. Every other assertion
about the `failed_retryable` presentation (error text persists, polling
continues, Stripe is not relaunched automatically) is preserved.
**The test that would have caught this** is `reports a resume that
returns an unmoved intent as failed, not processing` in
`billingOperationStore.test.ts` — `handleNextAction` resolves `{
paymentIntent: { status: 'requires_payment_method' } }` with no error.
Every pre-existing test mocked either a clean success or an explicit
error, which is the gap the defect shipped through. Verified red before
the guard (`authenticationState: "processing"`), green after.
**`failed_retryable` still has no in-dialog next step on `main`.** The
design routes it to the declined step, which arrives with #15923 (which
sets `checkoutStep = 'declined'` on a failed charge) and #15944 (which
renders it). Neither exists here, so this PR stops at the removal rather
than inventing a step those branches own. `verificationRecoveryActive`
is left alone for the same reason.
**Overlaps in flight.** #15923 touches `billingOperationStore.ts`, both
preview components, `SubscriptionRequiredDialogContentUnified.vue`,
`useSubscriptionCheckout.ts` and `en/main.json`; #15944 touches the last
two; #15942 touches `SubscriptionAddPaymentPreviewWorkspace.vue`.
Whichever lands second will need a rebase.
The store field is still named `canRetryAuthentication` even though it
now means "the live challenge can be resumed in page". Renaming it would
touch the store, the top-up dialog and ~20 test assertions, and widen
the conflict surface with the three open branches, so it is left for a
follow-up.
## Follow-ups since the original description
- `TopUpCreditsDialogContentWorkspace.vue` gained a dedicated "Start
over" control for `failed_retryable` (`ddaf8761c5`,
`9966ba07`→`31b3547774`, `4700fe8a43`), addressing the
permanently-disabled/spinning verification button dante01yoon flagged in
review. `isAddingCredits` excludes `failed_retryable` so a fresh attempt
isn't locked out.
- `SubscriptionAddPaymentPreviewWorkspace.vue` /
`SubscriptionTransitionPreviewWorkspace.vue`'s "Complete verification"
button now also excludes `failed_retryable` (`ed0cfefea4`) — the
retry-removal simplification had dropped that exclusion, so a stale
`actionUrl` from an abandoned challenge could show the button next to
the failure alert.
- Fixed a `displayState` masking bug (`ff8d647278`): a genuinely new
server-issued challenge (fresh client secret) was being permanently
masked as `failed_retryable` once an operation had failed once, so the
one case where resume used to work stopped working. The mask now only
holds while the secret is unchanged.
- Fixed the topup verifying-step watcher not observing `canTopUp`
(`0ccad0db74`), and a naming cleanup dropping the `isPolling` alias for
`isAddingCredits` (`5a0ff6d33a`).
- **"Start over" no longer discards the operation client-side**
(`bdd50937ea`): `startOverTopup` now calls a new `dismissOperation`,
which sets a `dismissed` flag instead of deleting the operation. Polling
continues and a late success/failure still resolves normally;
`dismissed` only excludes the operation from the `topupActionOperation`
/ `isAddingCredits` selectors a dialog reads. A server-side cancel
(BE-10064/BE-11559) would let a dismissal actually end the operation;
noted in a code comment for when that lands.
- **`RESUMED_INTENT_STATUSES` inverted to `UNMOVED_INTENT_STATUSES`**
(`bdd50937ea`/`bf2632f764`): now a denylist of the three statuses that
mean the intent didn't move (`requires_payment_method`,
`requires_action`, `canceled`) instead of an allowlist of "advanced"
ones. An unlisted or future Stripe status — including the
previously-ambiguous `requires_confirmation` — now resolves
optimistically to `processing` and lets the next poll's server-derived
`authentication_state` correct it, rather than reporting a live payment
as failed.
**Regression coverage**: this fix is entirely covered at the Vitest
unit/component level (`billingOperationStore.test.ts`,
`TopUpCreditsDialogContentWorkspace.test.ts`, and the preview component
tests) rather than with a new Playwright spec. A 3DS challenge
round-trips through Stripe's own hosted UI, which isn't something this
repo's Playwright setup drives end-to-end today (no existing spec
exercises a real or mocked 3DS challenge); the unit-level coverage
exercises every branch of the actual state machine this PR changes
(`displayState` masking, `canRetryAuthentication` gating, the dialog's
step transitions) more precisely than an E2E spec could without a much
larger mocking investment. dante01yoon accepted this rationale.
**Screenshots — outstanding, explicit merge gate per dante01yoon**: I
can't produce the requested AS-IS/TO-BE captures myself — driving a real
3DS challenge needs a live Stripe test environment and cloud backend
connectivity this sandbox doesn't have. Per review, this PR should not
merge until someone with that access posts into this description:
- **TO BE (subscription previews)** — button gone, alert intact (a
rendered component state; doesn't need a real challenge).
- **TO BE (top-up `failed_retryable` + "Start over")** —
`TopUpCreditsDialogContentWorkspace.test.ts` already mounts exactly this
state (doesn't need a real challenge either).
- **AS IS (the loop on `main`)** — needs the live environment; this is
the one that shows the actual defect.
Summary
Implements 5b Outcome — Declined from Figma 5709-49062. Stacked on #15923.
The design pairs it with success: "Success is terminal (Close). Declined is not: back returns to the confirm step with everything intact for a retry; the Stripe reason shows when the API provides one." Success shipped; declined never did.
This also closes a hole in #15923. That branch's polling watcher already sets
checkoutStep = 'declined'and captures the reason on a failed charge, but nothing rendered for it — a refused payment landed on a blank step. This adds the screen that step needs.SubscriptionDeclinedWorkspace.vue— warning icon, "Payment declined", the design's body copy, the Stripe reason block (rendered only when the API supplies one; an empty box reads as a second failure), and "Update payment method".handleDeclinedBack/handleUpdatePaymenton the checkout composable — both return to the confirm step with the quote and selection intact and clear the resolved operation. "Update payment method" additionally opens method collection, which is dialog state rather than checkout state.One deviation to confirm
The design frame shows a single CTA. I added a secondary Back below it, because with the declined step suppressing the dialog header there is otherwise no route back to confirm — only the X, which closes the flow entirely, contradicting "declined is not terminal". Happy to drop it if the intended retry route is the X plus a reopen.
Verification
Review updates (Sep 2): Back/Update payment method route to the preserved preview only in-flow; a decline recovered on re-entry backs out to plan selection (no quote to land on). Clearing the operation nulls the active pointer. The reason box is labeled "What your bank said" — it carries our mapped rendering of the bank's decline code. The payment step's mobile height cap to min(740px, 85vh) is deliberate: it aligns the one unaligned step with its embedded siblings. The out-of-credits banner is gated to the plan-facing steps.
handleUpdatePaymentalias removed — the dialog wrapper owns the method-collection choice.