Repository navigation
Conversation
Amp-Thread-ID: https://ampcode.com/threads/T-019fae6e-58a1-722e-9d31-abc75c02125e Co-authored-by: Amp <amp@ampcode.com>
📝 WalkthroughWalkthroughBilling context now coordinates account and checkout status across concurrent and changing billing configurations. Failed subscription operations refresh status before completion. Workspace banners show payment-recovery actions and open the subscription dialog for failed initial subscriptions. ChangesBilling status recovery
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant BillingOperationStore
participant useBillingContext
participant BillingStatusBanner
participant SubscriptionDialog
BillingOperationStore->>useBillingContext: refresh billing status after subscription failure
useBillingContext-->>BillingStatusBanner: expose refreshed subscriptionStatus
BillingStatusBanner->>SubscriptionDialog: open with settings_billing_panel
Possibly related PRs
Suggested labels: Suggested reviewers: Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 inconclusive)
✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
📄 Knowledge reviewDosu skipped reviewing this PR because your organization has used its |
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 1768 passed, 0 failed · 3 flaky📊 Browser Reports
📦 Bundle: 8.19 MB gzip 🔴 +588 BDetailsSummary
Category Glance App Entry Points — 3.62 kB (baseline 3.62 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.29 MB (baseline 1.29 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed / 1 unchanged Views & Navigation — 111 kB (baseline 111 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 12 added / 12 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 — 28.7 kB (baseline 28.7 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 7 added / 7 removed / 3 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 — 70 kB (baseline 70 kB) • ⚪ 0 BReusable component library chunks
Status: 6 added / 6 removed / 9 unchanged Data & Services — 3.44 MB (baseline 3.44 MB) • 🔴 +1.33 kBStores, 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: 19 added / 19 removed / 17 unchanged Vendor & Third-Party — 15.7 MB (baseline 15.7 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 16 unchanged Other — 12.7 MB (baseline 12.7 MB) • 🔴 +810 BBundles that do not match a named category
Status: 78 added / 78 removed / 202 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-07-31T08:34:35.917Z",
"gitSha": "2b211f1ded10f1fe746606218d7aea8cd0968502",
"branch": "hunter/be-5054-payment-recovery-ui",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2120.3769999999904,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.313,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 528.811,
"heapDeltaBytes": 4868608,
"heapUsedBytes": 72751152,
"domNodes": 18,
"jsHeapTotalBytes": 20049920,
"scriptDurationMs": 22.896,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2084.137999999996,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.415000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 496.16200000000003,
"heapDeltaBytes": 4427284,
"heapUsedBytes": 72362856,
"domNodes": 20,
"jsHeapTotalBytes": 20574208,
"scriptDurationMs": 18.427999999999997,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2076.5740000000224,
"styleRecalcs": 79,
"styleRecalcDurationMs": 45.775999999999996,
"layouts": 12,
"layoutDurationMs": 4.017,
"taskDurationMs": 1046.113,
"heapDeltaBytes": -14292276,
"heapUsedBytes": 53407964,
"domNodes": -281,
"jsHeapTotalBytes": 20963328,
"scriptDurationMs": 129.11899999999997,
"eventListeners": -146,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1901.9599999999741,
"styleRecalcs": 75,
"styleRecalcDurationMs": 39.551,
"layouts": 12,
"layoutDurationMs": 3.5229999999999997,
"taskDurationMs": 932.896,
"heapDeltaBytes": -15422576,
"heapUsedBytes": 52410520,
"domNodes": -281,
"jsHeapTotalBytes": 21225472,
"scriptDurationMs": 121.684,
"eventListeners": -148,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1740.08299999997,
"styleRecalcs": 31,
"styleRecalcDurationMs": 17.779999999999998,
"layouts": 6,
"layoutDurationMs": 0.6040000000000002,
"taskDurationMs": 400.246,
"heapDeltaBytes": 7884592,
"heapUsedBytes": 75787296,
"domNodes": 78,
"jsHeapTotalBytes": 20836352,
"scriptDurationMs": 22.809,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1724.3099999999458,
"styleRecalcs": 31,
"styleRecalcDurationMs": 15.650999999999998,
"layouts": 6,
"layoutDurationMs": 0.678,
"taskDurationMs": 363.456,
"heapDeltaBytes": 7803028,
"heapUsedBytes": 75738768,
"domNodes": 77,
"jsHeapTotalBytes": 20574208,
"scriptDurationMs": 17.681,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 582.3109999999758,
"styleRecalcs": 9,
"styleRecalcDurationMs": 5.841000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 380.566,
"heapDeltaBytes": -12066056,
"heapUsedBytes": 55726336,
"domNodes": 14,
"jsHeapTotalBytes": 21622784,
"scriptDurationMs": 57.465,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 588.984000000039,
"styleRecalcs": 11,
"styleRecalcDurationMs": 7.363000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 372.67799999999994,
"heapDeltaBytes": -12314028,
"heapUsedBytes": 55585572,
"domNodes": 18,
"jsHeapTotalBytes": 21884928,
"scriptDurationMs": 56.733000000000004,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2034.370000000024,
"styleRecalcs": 10,
"styleRecalcDurationMs": 10.134999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 718.6410000000001,
"heapDeltaBytes": 7347280,
"heapUsedBytes": 66377684,
"domNodes": -281,
"jsHeapTotalBytes": 5304320,
"scriptDurationMs": 111.19199999999998,
"eventListeners": -144,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2063.175000000001,
"styleRecalcs": 10,
"styleRecalcDurationMs": 11.771,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 700.896,
"heapDeltaBytes": 8047460,
"heapUsedBytes": 67361660,
"domNodes": -280,
"jsHeapTotalBytes": 5566464,
"scriptDurationMs": 97.117,
"eventListeners": -144,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2168.986000000018,
"styleRecalcs": 69,
"styleRecalcDurationMs": 15.244,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1248.243,
"heapDeltaBytes": 6088124,
"heapUsedBytes": 65951048,
"domNodes": -283,
"jsHeapTotalBytes": 4743168,
"scriptDurationMs": 408.908,
"eventListeners": -142,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2161.108000000013,
"styleRecalcs": 69,
"styleRecalcDurationMs": 14.134999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1299.6619999999998,
"heapDeltaBytes": 7252640,
"heapUsedBytes": 67532544,
"domNodes": -284,
"jsHeapTotalBytes": 5005312,
"scriptDurationMs": 462.294,
"eventListeners": -144,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3230.068000000017,
"styleRecalcs": 65,
"styleRecalcDurationMs": 15.92,
"layouts": 60,
"layoutDurationMs": 8.187,
"taskDurationMs": 1557.941,
"heapDeltaBytes": 189424,
"heapUsedBytes": 61662992,
"domNodes": -286,
"jsHeapTotalBytes": 7663616,
"scriptDurationMs": 533.967,
"eventListeners": -148,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3136.7890000000216,
"styleRecalcs": 67,
"styleRecalcDurationMs": 17.333000000000002,
"layouts": 60,
"layoutDurationMs": 7.804,
"taskDurationMs": 1487.0010000000002,
"heapDeltaBytes": -4410008,
"heapUsedBytes": 56751544,
"domNodes": -282,
"jsHeapTotalBytes": 7663616,
"scriptDurationMs": 521.5079999999999,
"eventListeners": -148,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2043.1470000000331,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.405000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 727.4990000000001,
"heapDeltaBytes": 8634196,
"heapUsedBytes": 69303348,
"domNodes": -285,
"jsHeapTotalBytes": 4780032,
"scriptDurationMs": 119.51700000000001,
"eventListeners": -146,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2023.7210000000232,
"styleRecalcs": 8,
"styleRecalcDurationMs": 6.472000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 657.7789999999999,
"heapDeltaBytes": 7516128,
"heapUsedBytes": 68186620,
"domNodes": -283,
"jsHeapTotalBytes": 4517888,
"scriptDurationMs": 92.36399999999999,
"eventListeners": -142,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 593.3570000000259,
"styleRecalcs": 47,
"styleRecalcDurationMs": 11.960999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 412.941,
"heapDeltaBytes": -11362592,
"heapUsedBytes": 56488840,
"domNodes": 20,
"jsHeapTotalBytes": 22409216,
"scriptDurationMs": 124.509,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 571.6240000000425,
"styleRecalcs": 46,
"styleRecalcDurationMs": 9.661000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 392.429,
"heapDeltaBytes": -11828852,
"heapUsedBytes": 55907700,
"domNodes": 18,
"jsHeapTotalBytes": 22409216,
"scriptDurationMs": 119.43499999999999,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 1989.071000000024,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.845999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 472.597,
"heapDeltaBytes": 4301628,
"heapUsedBytes": 72263868,
"domNodes": 20,
"jsHeapTotalBytes": 20574208,
"scriptDurationMs": 15.885000000000003,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2024.1629999999304,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.171000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 507.22599999999994,
"heapDeltaBytes": -20640016,
"heapUsedBytes": 47245920,
"domNodes": -278,
"jsHeapTotalBytes": 20701184,
"scriptDurationMs": 14.631000000000002,
"eventListeners": -148,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1679.6970000000329,
"styleRecalcs": 75,
"styleRecalcDurationMs": 37.677,
"layouts": 16,
"layoutDurationMs": 4.174,
"taskDurationMs": 746.51,
"heapDeltaBytes": -4703376,
"heapUsedBytes": 63061408,
"domNodes": 63,
"jsHeapTotalBytes": 21622784,
"scriptDurationMs": 90.52099999999999,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1730.0229999999601,
"styleRecalcs": 74,
"styleRecalcDurationMs": 38.161,
"layouts": 16,
"layoutDurationMs": 5.128000000000001,
"taskDurationMs": 819.868,
"heapDeltaBytes": -19774484,
"heapUsedBytes": 48193396,
"domNodes": -282,
"jsHeapTotalBytes": 19914752,
"scriptDurationMs": 96.48899999999999,
"eventListeners": -148,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 1368.3170000000473,
"styleRecalcs": 17,
"styleRecalcDurationMs": 28.65999999999999,
"layouts": 13,
"layoutDurationMs": 11.01,
"taskDurationMs": 936.628,
"heapDeltaBytes": 8917152,
"heapUsedBytes": 100730944,
"domNodes": 13673,
"jsHeapTotalBytes": 10485760,
"scriptDurationMs": 32.379000000000005,
"eventListeners": 2371,
"totalBlockingTimeMs": 117,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8280.161000000022,
"styleRecalcs": 249,
"styleRecalcDurationMs": 40.684,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4572.467000000001,
"heapDeltaBytes": 10782888,
"heapUsedBytes": 73307104,
"domNodes": -283,
"jsHeapTotalBytes": 6807552,
"scriptDurationMs": 1355.92,
"eventListeners": -128,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8231.333999999948,
"styleRecalcs": 250,
"styleRecalcDurationMs": 40.296,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4236.1449999999995,
"heapDeltaBytes": 11843956,
"heapUsedBytes": 70401172,
"domNodes": -281,
"jsHeapTotalBytes": 7364608,
"scriptDurationMs": 1287.21,
"eventListeners": -128,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "vue-large-graph-idle",
"durationMs": 17758.816000000024,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17709.139,
"heapDeltaBytes": -54777876,
"heapUsedBytes": 167309812,
"domNodes": -8312,
"jsHeapTotalBytes": -14360576,
"scriptDurationMs": 561.743,
"eventListeners": -16385,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 17572.42699999995,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17526.983,
"heapDeltaBytes": -34272012,
"heapUsedBytes": 177247308,
"domNodes": -8316,
"jsHeapTotalBytes": -13312000,
"scriptDurationMs": 572.811,
"eventListeners": -16385,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666763,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 21693.764999999985,
"styleRecalcs": 147,
"styleRecalcDurationMs": 19.94100000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 21652.049,
"heapDeltaBytes": -32693964,
"heapUsedBytes": 177170108,
"domNodes": -8312,
"jsHeapTotalBytes": -14430208,
"scriptDurationMs": 851.1220000000001,
"eventListeners": -16381,
"totalBlockingTimeMs": 290,
"frameDurationMs": 18.890000000000025,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 21536.976999999977,
"styleRecalcs": 146,
"styleRecalcDurationMs": 19.125000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 21486.469,
"heapDeltaBytes": -50810904,
"heapUsedBytes": 167238420,
"domNodes": -8312,
"jsHeapTotalBytes": -15409152,
"scriptDurationMs": 882.847,
"eventListeners": -16385,
"totalBlockingTimeMs": 286,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 489.02100000003657,
"styleRecalcs": 17,
"styleRecalcDurationMs": 20.735000000000003,
"layouts": 3,
"layoutDurationMs": 1.431,
"taskDurationMs": 127.36599999999999,
"heapDeltaBytes": -15706772,
"heapUsedBytes": 51069888,
"domNodes": 153,
"jsHeapTotalBytes": 7991296,
"scriptDurationMs": 9.725000000000001,
"eventListeners": 67,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 459.19500000002245,
"styleRecalcs": 12,
"styleRecalcDurationMs": 17.674000000000003,
"layouts": 3,
"layoutDurationMs": 0.6420000000000002,
"taskDurationMs": 107.15200000000002,
"heapDeltaBytes": -16044100,
"heapUsedBytes": 50951488,
"domNodes": 117,
"jsHeapTotalBytes": 6680576,
"scriptDurationMs": 8.741,
"eventListeners": 65,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
}
]
} |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #14268 +/- ##
==========================================
- Coverage 79.32% 79.07% -0.25%
==========================================
Files 1754 1767 +13
Lines 117525 115499 -2026
Branches 40117 38431 -1686
==========================================
- Hits 93221 91335 -1886
+ Misses 23727 23605 -122
+ Partials 577 559 -18
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 218 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Amp-Thread-ID: https://ampcode.com/threads/T-019fb50f-7143-776a-b564-fec473a0f137 Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019fb50f-7143-776a-b564-fec473a0f137 Co-authored-by: Amp <amp@ampcode.com>
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/platform/workspace/stores/billingOperationStore.test.ts`:
- Line 392: Update the payment-recovery test around the terminal operation
promise and mockFetchStatus to use a deferred promise; assert the operation
remains pending after fetchStatus starts, then resolve the deferred refresh and
verify the operation completes. Keep assertions behavioral by checking promise
resolution timing rather than only fetchStatus invocation.
In `@src/platform/workspace/stores/billingOperationStore.ts`:
- Around line 274-277: Replace the side-effect ternary assigning
billingStatusRefresh with an explicit if/else in the operation handling flow:
call useBillingContext().fetchStatus() for subscription operations and assign
Promise.resolve() otherwise. Preserve the existing billingStatusRefresh behavior
while removing the ternary around the asynchronous action.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 6528039f-2082-4a3c-9ce8-6bdd62aac65a
📒 Files selected for processing (9)
src/composables/billing/useBillingContext.test.tssrc/composables/billing/useBillingContext.tssrc/locales/en/main.jsonsrc/platform/workspace/components/dialogs/settings/BillingStatusBanner.test.tssrc/platform/workspace/components/dialogs/settings/BillingStatusBanner.vuesrc/platform/workspace/composables/deriveBillingBanner.test.tssrc/platform/workspace/composables/useBillingBanner.tssrc/platform/workspace/stores/billingOperationStore.test.tssrc/platform/workspace/stores/billingOperationStore.ts
| payment_intent_source: undefined, | ||
| failure_category: 'unknown' | ||
| }) | ||
| expect(mockFetchStatus).toHaveBeenCalledOnce() |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Test terminal resolution after the status refresh settles.
This assertion confirms that fetchStatus() starts. It does not confirm that the terminal operation promise waits for the refresh. A regression that does not await the refresh will pass this test.
Use a deferred mockFetchStatus promise. Assert that the operation remains pending until the deferred refresh settles.
As per path instructions, write behavioral tests for payment-recovery refresh timing and avoid implementation-only checks.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/platform/workspace/stores/billingOperationStore.test.ts` at line 392,
Update the payment-recovery test around the terminal operation promise and
mockFetchStatus to use a deferred promise; assert the operation remains pending
after fetchStatus starts, then resolve the deferred refresh and verify the
operation completes. Keep assertions behavioral by checking promise resolution
timing rather than only fetchStatus invocation.
Sources: Coding guidelines, Path instructions
| const billingStatusRefresh = | ||
| operation.type === 'subscription' | ||
| ? useBillingContext().fetchStatus() | ||
| : Promise.resolve() |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
Replace the side-effect ternary.
fetchStatus() starts an asynchronous action in the subscription branch. Use an if statement for this action.
Proposed refactor
- const billingStatusRefresh =
- operation.type === 'subscription'
- ? useBillingContext().fetchStatus()
- : Promise.resolve()
+ let billingStatusRefresh: Promise<void>
+ if (operation.type === 'subscription') {
+ billingStatusRefresh = useBillingContext().fetchStatus()
+ } else {
+ billingStatusRefresh = Promise.resolve()
+ }Based on learnings, prefer if/else statements over ternary operators when performing side effects.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const billingStatusRefresh = | |
| operation.type === 'subscription' | |
| ? useBillingContext().fetchStatus() | |
| : Promise.resolve() | |
| let billingStatusRefresh: Promise<void> | |
| if (operation.type === 'subscription') { | |
| billingStatusRefresh = useBillingContext().fetchStatus() | |
| } else { | |
| billingStatusRefresh = Promise.resolve() | |
| } |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/platform/workspace/stores/billingOperationStore.ts` around lines 274 -
277, Replace the side-effect ternary assigning billingStatusRefresh with an
explicit if/else in the operation handling flow: call
useBillingContext().fetchStatus() for subscription operations and assign
Promise.resolve() otherwise. Preserve the existing billingStatusRefresh behavior
while removing the ternary around the asynchronous action.
Source: Learnings
|
Pausing the cross-repo UI follow-up so BE-5054 has only one active PR. Backend work continues in Comfy-Org/cloud#5731. The UI change can be recreated from head c1727e9 after the backend lands. |
Description
Adds the owner-facing recovery path for a failed initial subscription:
This PR is independently reviewable, but must not be deployed before the backend sequence is deployed: cloud #5731 first, then cloud #5732. Older backend behavior can silently reuse the declined default.
Linear: https://linear.app/comfyorg/issue/BE-5054/let-users-replace-a-failed-payment-method-and-successfully-retry
How has this been tested?
pnpm test:unit src/platform/workspace/components/dialogs/settings/BillingStatusBanner.test.ts(14 tests)pnpm typecheckpnpm format:checkScreenshots or screen capture
Not included; this reuses the existing billing status banner and subscription dialog.