Skip to content

fix(billing): keep the mounted payment element across quote refreshes - #17312

Closed
comfydesigner wants to merge 15 commits into
mainfrom
comfydesigner/payment-element-keep
Closed

comfydesigner wants to merge 15 commits into
mainfrom
comfydesigner/payment-element-keep

Conversation

@comfydesigner

Copy link
Copy Markdown
Contributor

Closes FE-2148. Stacked on #15159 (sibling of #17311 — independent files, either order).

Entering card details and then applying a promo code wiped every payment field: the payment element was keyed on quote_id:quote_version, so the re-quote forced a full remount and Stripe's element lost its state. The customer re-typed their whole card to save money.

What changes

  • The element's :key tracks payment_method_configuration_id — the one input that genuinely requires a fresh element (a different configuration means a different method set). Amount and currency changes flow through the element's existing elements.update watcher, which was already built for exactly this and was being defeated by the key.
  • The mount gate (v-if="captureMode && quoteReady") is untouched — the premature-mount latch the old key comment worried about is still prevented by the gate, not the key.

Tests

  • The instance-count assertion is deliberately inverted: a refreshed quote (new id + version, new amount) keeps one instance with the new amount flowing through props; a changed payment-method configuration creates a second. The old assertion pinned the remount that caused the bug.
  • Also covers the stale-quote form-wipe from the QA results doc — same mechanism, same fix.

┆ Linear: FE-2148

huntcsg and others added 13 commits August 12, 2026 17:22
The confirm summary now reads like a receipt: a Subtotal row (the plan's
period price) above only the user-applied promotion discounts, so the
visible math closes — subtotal minus promo rows equals the total due.
Plan-commitment discounts leave the ledger and render instead as the
struck-through list price beside the headline monthly price, matching
the pricing table's presentation. Explanations move into the row label;
the value column carries only the amount.

An applied promo code now renders as a read-only chip with an inline
remove control instead of an editable field. Silently replacing an
applied code is no longer expressible: the only way to a new code is
removing the current one, and a helper line states the one-code rule.
The edit-while-applied handling (Apply/Remove flip) is deleted.
Typing in the promo field invalidates the quote so Pay can't submit
against an ambiguous intent, but clearing the field never restored it —
the only way back was applying an empty code. Both preview components
now remember when their own edit broke a current quote and restore it
the moment the field returns to its baseline; a quote invalidated for
any other reason stays invalid.
Renders the receipt ledger end to end — slashed list price, Subtotal,
promo row with the amount alone in the value column, renewal note, and
the applied-code chip with its helper line.
…faces

bg-secondary-background on a secondary-background parent renders
invisible — the chip takes the same interface-stroke border the promo
input carries, legible on both themes. The promo story also gets a
taller shell so its added rows fit the demo frame.
A solid tertiary fill reads on both themes without a stroke — the same
material the tertiary button beneath it uses — replacing the
interface-stroke border treatment.
The chip alone carries the rule — a single fixed code with one remove
control already communicates one-at-a-time; the caption restated it.
Applying a promo re-quoted, the quote-keyed element remounted, and
everything the customer had typed into the card form vanished. The
element already takes amount and currency changes through its update
watcher, so the remount never earned its cost — the key now tracks the
payment-method configuration, the one thing that genuinely requires a
fresh element. The instance-count assertion is deliberately inverted:
a refreshed quote keeps one instance, a configuration change makes two.
@coderabbitai

coderabbitai Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: c58b37f5-92ed-4443-a48b-cfc0a06beceb

📥 Commits

Reviewing files that changed from the base of the PR and between 8a1c68f and b0c3f59.

📒 Files selected for processing (2)
  • src/platform/workspace/components/SubscriptionAddPaymentPreviewWorkspace.test.ts
  • src/platform/workspace/components/SubscriptionAddPaymentPreviewWorkspace.vue

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The payment selector key now uses payment_method_configuration_id. Quote refreshes keep the existing selector instance, while a configuration change creates a new instance. Tests cover both behaviors.

Changes

Payment selector remount behavior

Layer / File(s) Summary
Selector key and remount tests
src/platform/workspace/components/SubscriptionAddPaymentPreviewWorkspace.vue, src/platform/workspace/components/SubscriptionAddPaymentPreviewWorkspace.test.ts
The selector remount trigger now uses payment_method_configuration_id instead of quote ID and version. Tests verify that refreshed quotes keep one selector instance and that a changed configuration creates a second instance.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to b0c3f

The payment selector remount behavior is covered for both quote refreshes and payment-method configuration changes, with no established merge-blocking risk.


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore (reviewers only)

❌ Failed checks (1 error)

Check name Status Explanation Resolution
End-To-End Regression Coverage For Fixes ❌ Error The PR title uses the bug-fix signal fix(billing). The changed files are under src/ and no changed file is under browser_tests/. The PR description explains the component-level test changes, but… Add or update a Playwright regression test under browser_tests/. If an end-to-end test is not practical, add a concrete explanation in the PR description that states why.
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the billing fix and the intended behavior: preserve the mounted payment element across quote refreshes.
Description check ✅ Passed The description explains the bug, root cause, implementation, mount-gate behavior, tests, and linked issue. It does not use every template heading, but it provides the required information and is most…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Website End-To-End Regression Coverage ✅ Passed No changed file is under apps/website/src/ or apps/website/public/. The listed changes are under src/platform/workspace/components/, so this website-specific check does not apply.
Adr Compliance For Entity/Litegraph Changes ✅ Passed PASS. The changed-file list contains only src/platform/workspace/components/SubscriptionAddPaymentPreviewWorkspace.vue and its test. No changed file is under src/lib/litegraph/, src/ecs/, or an …
Full details: End-To-End Regression Coverage For Fixes

Explanation

The PR title uses the bug-fix signal fix(billing). The changed files are under src/ and no changed file is under browser_tests/. The PR description explains the component-level test changes, but it does not give a concrete reason why an end-to-end regression test was not added.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright: ✅ 1794 passed, 0 failed · 7 flaky

📊 Browser Reports
  • chromium: View Report (✅ 1773 / ❌ 0 / ⚠️ 7 / ⏭️ 5)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 18 / ❌ 0 / ⚠️ 0 / ⏭️ 0)

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 09/10/2026, 12:18:30 AM UTC

Links

📦 Bundle Size

⏳ Size data collection in progress…

⚡ Performance Report

canvas-idle: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 67.2 MB heap
canvas-mouse-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 55.2 MB heap
canvas-zoom-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 69.8 MB heap
dom-widget-clipping: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 50.7 MB heap
large-graph-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 61.3 MB heap
large-graph-pan: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 69.1 MB heap
large-graph-zoom: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 66.9 MB heap
minimap-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 65.1 MB heap
subgraph-dom-widget-clipping: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 51.2 MB heap
subgraph-idle: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 55.5 MB heap
subgraph-mouse-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 45.3 MB heap
subgraph-transition-enter: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 82ms TBT · 95.7 MB heap
viewport-pan-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 76.4 MB heap
vue-large-graph-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 163.0 MB heap
vue-large-graph-pan: · 57.1 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 158.3 MB heap
workflow-execution: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 65.5 MB heap

ℹ️ No baseline found — significance unavailable.

Absolute values
Metric Value
canvas-idle: avg frame time 17ms
canvas-idle: p95 frame time 17ms
canvas-idle: layout duration 0ms
canvas-idle: style recalc duration 5ms
canvas-idle: layout count 0
canvas-idle: style recalc count 11
canvas-idle: task duration 347ms
canvas-idle: script duration 12ms
canvas-idle: TBT 0ms
canvas-idle: heap used 67.2 MB
canvas-idle: DOM nodes 21
canvas-idle: event listeners 6
canvas-mouse-sweep: avg frame time 17ms
canvas-mouse-sweep: p95 frame time 17ms
canvas-mouse-sweep: layout duration 2ms
canvas-mouse-sweep: style recalc duration 22ms
canvas-mouse-sweep: layout count 12
canvas-mouse-sweep: style recalc count 73
canvas-mouse-sweep: task duration 584ms
canvas-mouse-sweep: script duration 73ms
canvas-mouse-sweep: TBT 0ms
canvas-mouse-sweep: heap used 55.2 MB
canvas-mouse-sweep: DOM nodes -112
canvas-mouse-sweep: event listeners -74
canvas-zoom-sweep: avg frame time 17ms
canvas-zoom-sweep: p95 frame time 17ms
canvas-zoom-sweep: layout duration 0ms
canvas-zoom-sweep: style recalc duration 11ms
canvas-zoom-sweep: layout count 6
canvas-zoom-sweep: style recalc count 31
canvas-zoom-sweep: task duration 269ms
canvas-zoom-sweep: script duration 14ms
canvas-zoom-sweep: TBT 0ms
canvas-zoom-sweep: heap used 69.8 MB
canvas-zoom-sweep: DOM nodes 79
canvas-zoom-sweep: event listeners 19
dom-widget-clipping: avg frame time 17ms
dom-widget-clipping: p95 frame time 17ms
dom-widget-clipping: layout duration 0ms
dom-widget-clipping: style recalc duration 5ms
dom-widget-clipping: layout count 0
dom-widget-clipping: style recalc count 12
dom-widget-clipping: task duration 266ms
dom-widget-clipping: script duration 38ms
dom-widget-clipping: TBT 0ms
dom-widget-clipping: heap used 50.7 MB
dom-widget-clipping: DOM nodes 20
dom-widget-clipping: event listeners 2
large-graph-idle: avg frame time 17ms
large-graph-idle: p95 frame time 17ms
large-graph-idle: layout duration 0ms
large-graph-idle: style recalc duration 5ms
large-graph-idle: layout count 0
large-graph-idle: style recalc count 9
large-graph-idle: task duration 491ms
large-graph-idle: script duration 60ms
large-graph-idle: TBT 0ms
large-graph-idle: heap used 61.3 MB
large-graph-idle: DOM nodes -281
large-graph-idle: event listeners -178
large-graph-pan: avg frame time 17ms
large-graph-pan: p95 frame time 17ms
large-graph-pan: layout duration 0ms
large-graph-pan: style recalc duration 11ms
large-graph-pan: layout count 0
large-graph-pan: style recalc count 69
large-graph-pan: task duration 853ms
large-graph-pan: script duration 263ms
large-graph-pan: TBT 0ms
large-graph-pan: heap used 69.1 MB
large-graph-pan: DOM nodes -282
large-graph-pan: event listeners -163
large-graph-zoom: avg frame time 17ms
large-graph-zoom: p95 frame time 17ms
large-graph-zoom: layout duration 7ms
large-graph-zoom: style recalc duration 14ms
large-graph-zoom: layout count 60
large-graph-zoom: style recalc count 67
large-graph-zoom: task duration 1030ms
large-graph-zoom: script duration 326ms
large-graph-zoom: TBT 0ms
large-graph-zoom: heap used 66.9 MB
large-graph-zoom: DOM nodes 18
large-graph-zoom: event listeners -85
minimap-idle: avg frame time 17ms
minimap-idle: p95 frame time 17ms
minimap-idle: layout duration 0ms
minimap-idle: style recalc duration 5ms
minimap-idle: layout count 0
minimap-idle: style recalc count 9
minimap-idle: task duration 476ms
minimap-idle: script duration 60ms
minimap-idle: TBT 0ms
minimap-idle: heap used 65.1 MB
minimap-idle: DOM nodes -282
minimap-idle: event listeners -162
subgraph-dom-widget-clipping: avg frame time 17ms
subgraph-dom-widget-clipping: p95 frame time 17ms
subgraph-dom-widget-clipping: layout duration 0ms
subgraph-dom-widget-clipping: style recalc duration 7ms
subgraph-dom-widget-clipping: layout count 0
subgraph-dom-widget-clipping: style recalc count 48
subgraph-dom-widget-clipping: task duration 283ms
subgraph-dom-widget-clipping: script duration 77ms
subgraph-dom-widget-clipping: TBT 0ms
subgraph-dom-widget-clipping: heap used 51.2 MB
subgraph-dom-widget-clipping: DOM nodes 22
subgraph-dom-widget-clipping: event listeners 8
subgraph-idle: avg frame time 17ms
subgraph-idle: p95 frame time 17ms
subgraph-idle: layout duration 0ms
subgraph-idle: style recalc duration 5ms
subgraph-idle: layout count 0
subgraph-idle: style recalc count 12
subgraph-idle: task duration 340ms
subgraph-idle: script duration 10ms
subgraph-idle: TBT 0ms
subgraph-idle: heap used 55.5 MB
subgraph-idle: DOM nodes 11
subgraph-idle: event listeners 6
subgraph-mouse-sweep: avg frame time 17ms
subgraph-mouse-sweep: p95 frame time 17ms
subgraph-mouse-sweep: layout duration 3ms
subgraph-mouse-sweep: style recalc duration 23ms
subgraph-mouse-sweep: layout count 16
subgraph-mouse-sweep: style recalc count 77
subgraph-mouse-sweep: task duration 562ms
subgraph-mouse-sweep: script duration 56ms
subgraph-mouse-sweep: TBT 0ms
subgraph-mouse-sweep: heap used 45.3 MB
subgraph-mouse-sweep: DOM nodes -277
subgraph-mouse-sweep: event listeners -151
subgraph-transition-enter: avg frame time 17ms
subgraph-transition-enter: p95 frame time 17ms
subgraph-transition-enter: layout duration 8ms
subgraph-transition-enter: style recalc duration 21ms
subgraph-transition-enter: layout count 16
subgraph-transition-enter: style recalc count 20
subgraph-transition-enter: task duration 629ms
subgraph-transition-enter: script duration 19ms
subgraph-transition-enter: TBT 82ms
subgraph-transition-enter: heap used 95.7 MB
subgraph-transition-enter: DOM nodes 13673
subgraph-transition-enter: event listeners 2373
viewport-pan-sweep: avg frame time 17ms
viewport-pan-sweep: p95 frame time 17ms
viewport-pan-sweep: layout duration 0ms
viewport-pan-sweep: style recalc duration 34ms
viewport-pan-sweep: layout count 0
viewport-pan-sweep: style recalc count 250
viewport-pan-sweep: task duration 3157ms
viewport-pan-sweep: script duration 933ms
viewport-pan-sweep: TBT 0ms
viewport-pan-sweep: heap used 76.4 MB
viewport-pan-sweep: DOM nodes -279
viewport-pan-sweep: event listeners -147
vue-large-graph-idle: avg frame time 17ms
vue-large-graph-idle: p95 frame time 17ms
vue-large-graph-idle: layout duration 0ms
vue-large-graph-idle: style recalc duration 0ms
vue-large-graph-idle: layout count 0
vue-large-graph-idle: style recalc count 0
vue-large-graph-idle: task duration 10858ms
vue-large-graph-idle: script duration 382ms
vue-large-graph-idle: TBT 0ms
vue-large-graph-idle: heap used 163.0 MB
vue-large-graph-idle: DOM nodes -8312
vue-large-graph-idle: event listeners -16391
vue-large-graph-pan: avg frame time 17ms
vue-large-graph-pan: p95 frame time 17ms
vue-large-graph-pan: layout duration 0ms
vue-large-graph-pan: style recalc duration 14ms
vue-large-graph-pan: layout count 0
vue-large-graph-pan: style recalc count 66
vue-large-graph-pan: task duration 13460ms
vue-large-graph-pan: script duration 670ms
vue-large-graph-pan: TBT 0ms
vue-large-graph-pan: heap used 158.3 MB
vue-large-graph-pan: DOM nodes -8312
vue-large-graph-pan: event listeners -16388
workflow-execution: avg frame time 17ms
workflow-execution: p95 frame time 17ms
workflow-execution: layout duration 1ms
workflow-execution: style recalc duration 13ms
workflow-execution: layout count 3
workflow-execution: style recalc count 15
workflow-execution: task duration 80ms
workflow-execution: script duration 7ms
workflow-execution: TBT 0ms
workflow-execution: heap used 65.5 MB
workflow-execution: DOM nodes 126
workflow-execution: event listeners 99
Raw data
{
  "timestamp": "2026-09-10T00:27:35.419Z",
  "gitSha": "9015f81e85335cb0ebdc02347f315ce26a097329",
  "branch": "comfydesigner/payment-element-keep",
  "measurements": [
    {
      "name": "canvas-idle",
      "durationMs": 2042.6109999999653,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 5.306,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 355.674,
      "heapDeltaBytes": 5846120,
      "heapUsedBytes": 70290512,
      "domNodes": 20,
      "jsHeapTotalBytes": 24379392,
      "scriptDurationMs": 11.709000000000001,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-idle",
      "durationMs": 2005.8810000000449,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 5.351999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 339.08099999999996,
      "heapDeltaBytes": 5987016,
      "heapUsedBytes": 70635176,
      "domNodes": 22,
      "jsHeapTotalBytes": 24641536,
      "scriptDurationMs": 11.537999999999998,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1694.5480000000543,
      "styleRecalcs": 72,
      "styleRecalcDurationMs": 20.88,
      "layouts": 12,
      "layoutDurationMs": 2.54,
      "taskDurationMs": 548.2080000000001,
      "heapDeltaBytes": 155172,
      "heapUsedBytes": 64649496,
      "domNodes": 54,
      "jsHeapTotalBytes": 25427968,
      "scriptDurationMs": 71.176,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1756.5159999999196,
      "styleRecalcs": 74,
      "styleRecalcDurationMs": 22.957,
      "layouts": 12,
      "layoutDurationMs": 2.3379999999999996,
      "taskDurationMs": 620.608,
      "heapDeltaBytes": -13474384,
      "heapUsedBytes": 51035296,
      "domNodes": -278,
      "jsHeapTotalBytes": 24088576,
      "scriptDurationMs": 74.298,
      "eventListeners": -151,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1684.8679999999376,
      "styleRecalcs": 30,
      "styleRecalcDurationMs": 11.252999999999998,
      "layouts": 6,
      "layoutDurationMs": 0.508,
      "taskDurationMs": 277.79299999999995,
      "heapDeltaBytes": 8751116,
      "heapUsedBytes": 73410508,
      "domNodes": 79,
      "jsHeapTotalBytes": 24379392,
      "scriptDurationMs": 14.848,
      "eventListeners": 19,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1709.4860000001972,
      "styleRecalcs": 32,
      "styleRecalcDurationMs": 10.757000000000001,
      "layouts": 6,
      "layoutDurationMs": 0.4860000000000001,
      "taskDurationMs": 260.692,
      "heapDeltaBytes": 8565088,
      "heapUsedBytes": 73041324,
      "domNodes": 78,
      "jsHeapTotalBytes": 24641536,
      "scriptDurationMs": 13.143999999999998,
      "eventListeners": 19,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 476.95599999997285,
      "styleRecalcs": 12,
      "styleRecalcDurationMs": 5.072,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 270.61899999999997,
      "heapDeltaBytes": -11059196,
      "heapUsedBytes": 53288580,
      "domNodes": 20,
      "jsHeapTotalBytes": 24641536,
      "scriptDurationMs": 39.708,
      "eventListeners": 2,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 460.72000000003754,
      "styleRecalcs": 12,
      "styleRecalcDurationMs": 5.234000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 262.316,
      "heapDeltaBytes": -11519100,
      "heapUsedBytes": 52961480,
      "domNodes": 20,
      "jsHeapTotalBytes": 25427968,
      "scriptDurationMs": 36.216,
      "eventListeners": 2,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000273
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2008.1989999999905,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 5.314999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 475.212,
      "heapDeltaBytes": 4204468,
      "heapUsedBytes": 64189524,
      "domNodes": -280,
      "jsHeapTotalBytes": 3244032,
      "scriptDurationMs": 59.451,
      "eventListeners": -179,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2009.539000000018,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 4.486000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 507.239,
      "heapDeltaBytes": 3283024,
      "heapUsedBytes": 64312896,
      "domNodes": -282,
      "jsHeapTotalBytes": 3768320,
      "scriptDurationMs": 61.14499999999999,
      "eventListeners": -177,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2071.631000000025,
      "styleRecalcs": 68,
      "styleRecalcDurationMs": 11.729000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 879.065,
      "heapDeltaBytes": 3016504,
      "heapUsedBytes": 63409184,
      "domNodes": -283,
      "jsHeapTotalBytes": 2650112,
      "scriptDurationMs": 275.68600000000004,
      "eventListeners": -147,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66999999999998,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2082.622000000015,
      "styleRecalcs": 70,
      "styleRecalcDurationMs": 10.603000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 827.592,
      "heapDeltaBytes": 18557752,
      "heapUsedBytes": 81549864,
      "domNodes": -280,
      "jsHeapTotalBytes": 4222976,
      "scriptDurationMs": 249.39299999999997,
      "eventListeners": -179,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3104.756000000066,
      "styleRecalcs": 66,
      "styleRecalcDurationMs": 14.836,
      "layouts": 60,
      "layoutDurationMs": 7.905,
      "taskDurationMs": 1068.998,
      "heapDeltaBytes": -8372608,
      "heapUsedBytes": 54000732,
      "domNodes": 16,
      "jsHeapTotalBytes": 5603328,
      "scriptDurationMs": 333.727,
      "eventListeners": -178,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3004.742999999962,
      "styleRecalcs": 67,
      "styleRecalcDurationMs": 13.395999999999999,
      "layouts": 60,
      "layoutDurationMs": 6.616,
      "taskDurationMs": 990.0579999999999,
      "heapDeltaBytes": 21663008,
      "heapUsedBytes": 86242064,
      "domNodes": 20,
      "jsHeapTotalBytes": 7864320,
      "scriptDurationMs": 318.087,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "minimap-idle",
      "durationMs": 2039.3220000000838,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 5.4190000000000005,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 495.288,
      "heapDeltaBytes": 7186784,
      "heapUsedBytes": 68008640,
      "domNodes": -282,
      "jsHeapTotalBytes": 2719744,
      "scriptDurationMs": 64.765,
      "eventListeners": -177,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "minimap-idle",
      "durationMs": 2008.6859999998978,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 4.625000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 457.645,
      "heapDeltaBytes": 7793252,
      "heapUsedBytes": 68591996,
      "domNodes": -282,
      "jsHeapTotalBytes": 2981888,
      "scriptDurationMs": 54.96799999999999,
      "eventListeners": -147,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 449.55099999992854,
      "styleRecalcs": 47,
      "styleRecalcDurationMs": 6.957000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 275.94800000000004,
      "heapDeltaBytes": -11049044,
      "heapUsedBytes": 53474156,
      "domNodes": 20,
      "jsHeapTotalBytes": 25952256,
      "scriptDurationMs": 76.684,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000273
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 456.51199999997516,
      "styleRecalcs": 49,
      "styleRecalcDurationMs": 7.958000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 290.188,
      "heapDeltaBytes": -10769972,
      "heapUsedBytes": 53893872,
      "domNodes": 24,
      "jsHeapTotalBytes": 26476544,
      "scriptDurationMs": 78.166,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2001.0640000000421,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 5.535,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 363.926,
      "heapDeltaBytes": -18808368,
      "heapUsedBytes": 45737812,
      "domNodes": -3,
      "jsHeapTotalBytes": 23040000,
      "scriptDurationMs": 10.391,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2006.4530000000786,
      "styleRecalcs": 12,
      "styleRecalcDurationMs": 5.332,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 315.748,
      "heapDeltaBytes": 5928064,
      "heapUsedBytes": 70622964,
      "domNodes": 24,
      "jsHeapTotalBytes": 24641536,
      "scriptDurationMs": 10.086,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1717.7110000000084,
      "styleRecalcs": 77,
      "styleRecalcDurationMs": 23.988000000000003,
      "layouts": 16,
      "layoutDurationMs": 2.9290000000000003,
      "taskDurationMs": 577.299,
      "heapDeltaBytes": -17324260,
      "heapUsedBytes": 47251704,
      "domNodes": -278,
      "jsHeapTotalBytes": 23564288,
      "scriptDurationMs": 58.051,
      "eventListeners": -151,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1706.721000000016,
      "styleRecalcs": 76,
      "styleRecalcDurationMs": 21.565,
      "layouts": 16,
      "layoutDurationMs": 2.408,
      "taskDurationMs": 547.614,
      "heapDeltaBytes": -16653168,
      "heapUsedBytes": 47819700,
      "domNodes": -276,
      "jsHeapTotalBytes": 23564288,
      "scriptDurationMs": 54.13300000000001,
      "eventListeners": -151,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-transition-enter",
      "durationMs": 866.0099999999602,
      "styleRecalcs": 20,
      "styleRecalcDurationMs": 21.375000000000004,
      "layouts": 16,
      "layoutDurationMs": 7.818000000000002,
      "taskDurationMs": 629.4790000000002,
      "heapDeltaBytes": 8473428,
      "heapUsedBytes": 100320232,
      "domNodes": 13673,
      "jsHeapTotalBytes": 12582912,
      "scriptDurationMs": 18.598000000000003,
      "eventListeners": 2373,
      "totalBlockingTimeMs": 82,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 8136.661000000004,
      "styleRecalcs": 250,
      "styleRecalcDurationMs": 37.116,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 3289.252,
      "heapDeltaBytes": 10310968,
      "heapUsedBytes": 70205336,
      "domNodes": -278,
      "jsHeapTotalBytes": 5533696,
      "scriptDurationMs": 959.096,
      "eventListeners": -131,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 8084.359999999833,
      "styleRecalcs": 249,
      "styleRecalcDurationMs": 30.773999999999997,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 3023.8050000000003,
      "heapDeltaBytes": 30521688,
      "heapUsedBytes": 90120836,
      "domNodes": -280,
      "jsHeapTotalBytes": 6582272,
      "scriptDurationMs": 907.793,
      "eventListeners": -163,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 11482.844999999998,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 11446.137,
      "heapDeltaBytes": -43219360,
      "heapUsedBytes": 173465792,
      "domNodes": -8312,
      "jsHeapTotalBytes": -7278592,
      "scriptDurationMs": 427.111,
      "eventListeners": -16391,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333326,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 10339.897999999948,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 10270.845,
      "heapDeltaBytes": -42424484,
      "heapUsedBytes": 168297428,
      "domNodes": -8312,
      "jsHeapTotalBytes": -12521472,
      "scriptDurationMs": 336.053,
      "eventListeners": -16391,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 13721.432999999934,
      "styleRecalcs": 66,
      "styleRecalcDurationMs": 14.221999999999985,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 13672.900000000001,
      "heapDeltaBytes": -38760972,
      "heapUsedBytes": 173956564,
      "domNodes": -8312,
      "jsHeapTotalBytes": -13639680,
      "scriptDurationMs": 675.9269999999999,
      "eventListeners": -16389,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.779999999999927,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 13270.743999999922,
      "styleRecalcs": 66,
      "styleRecalcDurationMs": 13.69300000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 13246.435000000001,
      "heapDeltaBytes": -49007288,
      "heapUsedBytes": 158109952,
      "domNodes": -8312,
      "jsHeapTotalBytes": -15142912,
      "scriptDurationMs": 664.375,
      "eventListeners": -16387,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.219999999999953,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "workflow-execution",
      "durationMs": 430.7770000000346,
      "styleRecalcs": 16,
      "styleRecalcDurationMs": 15.360999999999999,
      "layouts": 3,
      "layoutDurationMs": 1.04,
      "taskDurationMs": 85.754,
      "heapDeltaBytes": 5082072,
      "heapUsedBytes": 68704184,
      "domNodes": 128,
      "jsHeapTotalBytes": 4980736,
      "scriptDurationMs": 6.851999999999999,
      "eventListeners": 99,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.669999999999998,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "workflow-execution",
      "durationMs": 428.0430000001161,
      "styleRecalcs": 13,
      "styleRecalcDurationMs": 11.562,
      "layouts": 3,
      "layoutDurationMs": 0.517,
      "taskDurationMs": 74.502,
      "heapDeltaBytes": 5038504,
      "heapUsedBytes": 68569248,
      "domNodes": 123,
      "jsHeapTotalBytes": 4718592,
      "scriptDurationMs": 6.585000000000001,
      "eventListeners": 99,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000273
    }
  ]
}

🔬 E2E Coverage

⚠️ Coverage collection failed. Check the CI workflow logs.

@codecov

codecov Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@                          Coverage Diff                           @@
##             comfydesigner/checkout-promo-polish   #17312   +/-   ##
======================================================================
  Coverage                                       ?   81.17%           
======================================================================
  Files                                          ?     1886           
  Lines                                          ?   126032           
  Branches                                       ?    39844           
======================================================================
  Hits                                           ?   102305           
  Misses                                         ?    23141           
  Partials                                       ?      586           
Flag Coverage Δ
unit 72.63% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ponents/SubscriptionAddPaymentPreviewWorkspace.vue 93.39% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

dante01yoon
dante01yoon previously approved these changes Sep 10, 2026

@dante01yoon dante01yoon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified that quote id/version refreshes now preserve the mounted Stripe element while payment method configuration changes still force re-initialization. The existing Elements watcher updates amount and currency, and the focused instance-count coverage exercises both lifecycle paths. The failing cloud E2E is in the unrelated checkout timeout/Back-button scenario outside this diff.

@comfydesigner
comfydesigner changed the base branch from comfydesigner/checkout-promo-polish to main September 17, 2026 22:48
@comfydesigner
comfydesigner dismissed dante01yoon’s stale review September 17, 2026 22:48

The base branch was changed.

@comfydesigner
comfydesigner requested a review from a team September 17, 2026 22:48
@comfydesigner

Copy link
Copy Markdown
Contributor Author

Re-anchored this on main — the consolidated checkout architecture landed there, so the stack on checkout-promo-polish was obsolete and showing phantom conflicts. Diff is back to the original two files: the stable payment_method_configuration_id key plus the no-remount regression test (22/22 passing on current main). Base branch changed, which dropped the earlier approval — re-requesting.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pre-merge checks failed. Please resolve the failing checks before merging.

@christian-byrne christian-byrne left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. Reviewing this as part of a sweep that had not been seeing it — our roster only queried PRs authored by one person until today, so a billing fix sitting on the review queue from anyone else was invisible. That is our gap, not yours, and it is fixed.

The premise checks out, and so does the thing that would have made the fix wrong.

The bug is real: keying the element on `${quote_id}:${quote_version}` means any re-quote destroys and recreates it, and a Stripe payment element loses its state on remount. Applying a promo code after typing a card is the exact sequence, and it is the worst one — the customer is doing the thing that saves money and is punished with re-entering a card number.

The risk in the fix is the mirror image: keying more narrowly could miss a change that genuinely needs a fresh element. We checked that rather than assuming, because it is the failure this change could introduce:

// UnifiedStripePaymentSelector.vue:291
watch([() => amountCents, () => currency], ([amount, nextCurrency]) => {
  if (!stripeElements.value || amount <= 0) return
  stripeElements.value.update({ amount, currency: nextCurrency.toLowerCase() })

The watcher covers amount and currency, not amount alone. So the two inputs that change on a re-quote both flow through elements.update, and your description is accurate that the key was defeating a mechanism already built for this. payment_method_configuration_id is left as the key because a different configuration means a different method set, which update cannot express — that is the one case that does need a remount, and it still gets one.

The ?? '' fallback is fine for the same reason: two quotes that both carry no configuration id resolve to the same key and correctly do not remount, since the account default did not change between them.

The blocker here is not your code. reviewDecision is CHANGES_REQUESTED from a CodeRabbit review on 2026-09-17 with zero unresolved threads — the threads were dealt with and the review state was never dismissed. That is the fifth time we have seen that exact shape in this wave (#16082, #17620, #17937, #18042 and now this), and each time the PR was merge-ready and read as blocked.

Nothing outstanding from us. CI clean, +17/−1 across two files, and the test added pins both halves — one quote refresh keeps the instance, a changed configuration replaces it.

Approved.

@comfydesigner

Copy link
Copy Markdown
Contributor Author

Closing: fixed on main another way. The shared account-ui StripePaymentForm now updates the mounted element in place on re-quote (elements.update), so card details survive a promo. FE-2148 canceled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants