Skip to content

feat(billing): saved-method confirm and confirm-screen convergence - #14449

Closed
comfydesigner wants to merge 3 commits into
comfydesigner/payment-element-visual-passfrom
comfydesigner/saved-method-confirm
Closed

comfydesigner wants to merge 3 commits into
comfydesigner/payment-element-visual-passfrom
comfydesigner/saved-method-confirm

Conversation

@comfydesigner

Copy link
Copy Markdown
Contributor

Stacked on comfydesigner/payment-element-visual-pass. Two things: the saved-payment-method confirm, and convergence of every confirm screen onto the design update.

Saved-method confirm

Team decision: the embedded Stripe form is for initial capture only; customers with a saved method get a narrow summary confirm instead.

  • savedMethodsForConfirm plumbing in the unified dialog — null until the backend supplies it, so this ships dark. When populated, the capture split is skipped and the confirm renders at the success step's 512px dark frame
  • SavedPaymentMethod is typed (card | alipay | bank): cards/banks display brand + last4, Alipay is a linked account with neither
  • One method: a 40px row with a Change affordance; two or more: a SingleSelect picker whose last option ("Add new payment method") expands back into the capture layout via the existing width animation
  • Backend contract needed: preview response should carry saved methods [{ type, brand?, last4?, id, isDefault }] pre-confirm; subscribe should accept the chosen method id. Also confirm whether the current flow shows the capture form to customers who already have a saved method (forced card re-entry)

Confirm-screen convergence

  • Plan-change previews (SubscriptionTransitionPreviewWorkspace) join the narrow dark 512px frame: single self-provided title with inline back arrow, 24px price, tabular + grouped numerals, inverted CTA (demoting to tertiary while a 3DS verification is pending)
  • Content order per Figma 5344-35724: credits lead; proration addends join the total as one sum under one divider
  • Promo extracted to SubscriptionPromoCodeField and added to immediate plan changes — the change-preview endpoint does not accept promotion_code yet, so the value has nowhere to go (marked in a template comment)
  • Narrow steps pin to min(740px, 85vh) below xl so the CTA anchors at one height across all states; content enters with a motion-safe fade-and-rise, which carries the transition on mobile where the frame no longer resizes
  • One stationary corner close button, positioned on the header row's line, identical across pricing/confirm/success

Known follow-ups: promo validation/requote endpoints (subscribe + change), saved-method list contract, promo-applied success data. The legacy per-member team dialog renders the restyled change screens on its old shell (double title survives there only).

Saved payment methods (contract pending):
- savedMethodsForConfirm plumbing in the unified dialog; the capture form
  is skipped when methods exist and the confirm renders as a narrow
  summary. SavedPaymentMethod is typed (card | alipay | bank) with
  per-type display: cards/banks show brand + last4, Alipay is a linked
  account with neither
- One method: 40px row with a Change affordance; two or more: a
  SingleSelect picker whose last option (Add new payment method) expands
  back into the capture layout, animated by the existing width
  transition. Selection is display-only until the backend exposes
  method ids

Confirm-screen convergence:
- Plan-change previews join the narrow dark 512px frame with the width
  animation from pricing; single self-provided title with inline back
  arrow, 24px price, tabular and grouped numerals throughout
- Content order per Figma 5344-35724: credits lead, proration addends
  join the total under one divider
- Promo code extracted to SubscriptionPromoCodeField (trigger ->
  auto-focused input -> collapse on empty blur) and added to immediate
  plan changes; the change-preview endpoint does not accept a code yet
- Complete verification is inverted and first when a 3DS action is
  pending; the confirm demotes to tertiary

Frame and rhythm:
- Narrow steps pin to min(740px,85vh) below xl (90vh cap at xl) so the
  CTA anchors at one height across states; content enters with a
  motion-safe fade-and-rise, which carries the transition on mobile
  where the frame no longer resizes
- One stationary corner close button (top-6) aligned to the header row
  line at every step; footer and promo spacing unified to the
  compressed rhythm
- Totals grouped (,560.00) with the numeric path to Stripe's
  amountCents kept separate from display formatting
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jul 31, 2026
@coderabbitai

coderabbitai Bot commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 81488903-b7e3-486b-bbc2-57ee835394ae

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@dosubot

dosubot Bot commented Jul 31, 2026

Copy link
Copy Markdown

📄 Knowledge review

Dosu skipped reviewing this PR because your organization has used its 200 included credits for the month. Your usage will reset on 2026-08-01. To have Dosu review this PR before then, ask your organization admin to upgrade to a pro account.


Leave Feedback Ask Dosu about ComfyUI_frontend Add Dosu to your team

@github-actions

github-actions Bot commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright: ❌ 1761 passed, 5 failed

❌ Failed Tests

📊 Browser Reports

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 08/01/2026, 01:47:52 AM UTC

Links

📦 Bundle Size

⏳ Size data collection in progress…

⚡ Performance Report

canvas-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 73.6 MB heap
canvas-mouse-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 68.2 MB heap
canvas-zoom-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 63.6 MB heap
dom-widget-clipping: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 57.1 MB heap
large-graph-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 64.0 MB heap
large-graph-pan: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 58.9 MB heap
large-graph-zoom: · 59.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 78.2 MB heap
minimap-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 67.4 MB heap
subgraph-dom-widget-clipping: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 57.9 MB heap
subgraph-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 72.9 MB heap
subgraph-mouse-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 64.5 MB heap
subgraph-transition-enter: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 128ms TBT · 97.9 MB heap
viewport-pan-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 75.1 MB heap
vue-large-graph-idle: · 56.3 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 170.5 MB heap
vue-large-graph-pan: · 56.3 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 795ms TBT · 155.1 MB heap
workflow-execution: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 52.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 8ms
canvas-idle: layout count 0
canvas-idle: style recalc count 9
canvas-idle: task duration 672ms
canvas-idle: script duration 25ms
canvas-idle: TBT 0ms
canvas-idle: heap used 73.6 MB
canvas-idle: DOM nodes 17
canvas-idle: event listeners 6
canvas-mouse-sweep: avg frame time 17ms
canvas-mouse-sweep: p95 frame time 17ms
canvas-mouse-sweep: layout duration 4ms
canvas-mouse-sweep: style recalc duration 41ms
canvas-mouse-sweep: layout count 12
canvas-mouse-sweep: style recalc count 76
canvas-mouse-sweep: task duration 972ms
canvas-mouse-sweep: script duration 130ms
canvas-mouse-sweep: TBT 0ms
canvas-mouse-sweep: heap used 68.2 MB
canvas-mouse-sweep: DOM nodes 59
canvas-mouse-sweep: event listeners 7
canvas-zoom-sweep: avg frame time 17ms
canvas-zoom-sweep: p95 frame time 17ms
canvas-zoom-sweep: layout duration 1ms
canvas-zoom-sweep: style recalc duration 18ms
canvas-zoom-sweep: layout count 6
canvas-zoom-sweep: style recalc count 30
canvas-zoom-sweep: task duration 480ms
canvas-zoom-sweep: script duration 24ms
canvas-zoom-sweep: TBT 0ms
canvas-zoom-sweep: heap used 63.6 MB
canvas-zoom-sweep: DOM nodes 75
canvas-zoom-sweep: event listeners 22
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 9ms
dom-widget-clipping: layout count 0
dom-widget-clipping: style recalc count 12
dom-widget-clipping: task duration 432ms
dom-widget-clipping: script duration 60ms
dom-widget-clipping: TBT 0ms
dom-widget-clipping: heap used 57.1 MB
dom-widget-clipping: DOM nodes 20
dom-widget-clipping: event listeners 5
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 9ms
large-graph-idle: layout count 0
large-graph-idle: style recalc count 9
large-graph-idle: task duration 881ms
large-graph-idle: script duration 120ms
large-graph-idle: TBT 0ms
large-graph-idle: heap used 64.0 MB
large-graph-idle: DOM nodes -290
large-graph-idle: event listeners -161
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 14ms
large-graph-pan: layout count 0
large-graph-pan: style recalc count 68
large-graph-pan: task duration 1434ms
large-graph-pan: script duration 442ms
large-graph-pan: TBT 0ms
large-graph-pan: heap used 58.9 MB
large-graph-pan: DOM nodes -296
large-graph-pan: event listeners -147
large-graph-zoom: avg frame time 17ms
large-graph-zoom: p95 frame time 17ms
large-graph-zoom: layout duration 9ms
large-graph-zoom: style recalc duration 16ms
large-graph-zoom: layout count 60
large-graph-zoom: style recalc count 65
large-graph-zoom: task duration 1690ms
large-graph-zoom: script duration 574ms
large-graph-zoom: TBT 0ms
large-graph-zoom: heap used 78.2 MB
large-graph-zoom: DOM nodes -141
large-graph-zoom: event listeners -71
minimap-idle: avg frame time 17ms
minimap-idle: p95 frame time 17ms
minimap-idle: layout duration 0ms
minimap-idle: style recalc duration 6ms
minimap-idle: layout count 0
minimap-idle: style recalc count 7
minimap-idle: task duration 831ms
minimap-idle: script duration 117ms
minimap-idle: TBT 0ms
minimap-idle: heap used 67.4 MB
minimap-idle: DOM nodes -294
minimap-idle: event listeners -147
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 12ms
subgraph-dom-widget-clipping: layout count 0
subgraph-dom-widget-clipping: style recalc count 46
subgraph-dom-widget-clipping: task duration 464ms
subgraph-dom-widget-clipping: script duration 127ms
subgraph-dom-widget-clipping: TBT 0ms
subgraph-dom-widget-clipping: heap used 57.9 MB
subgraph-dom-widget-clipping: DOM nodes 18
subgraph-dom-widget-clipping: event listeners 10
subgraph-idle: avg frame time 17ms
subgraph-idle: p95 frame time 17ms
subgraph-idle: layout duration 0ms
subgraph-idle: style recalc duration 9ms
subgraph-idle: layout count 0
subgraph-idle: style recalc count 10
subgraph-idle: task duration 603ms
subgraph-idle: script duration 19ms
subgraph-idle: TBT 0ms
subgraph-idle: heap used 72.9 MB
subgraph-idle: DOM nodes 19
subgraph-idle: event listeners 5
subgraph-mouse-sweep: avg frame time 17ms
subgraph-mouse-sweep: p95 frame time 17ms
subgraph-mouse-sweep: layout duration 5ms
subgraph-mouse-sweep: style recalc duration 40ms
subgraph-mouse-sweep: layout count 16
subgraph-mouse-sweep: style recalc count 76
subgraph-mouse-sweep: task duration 887ms
subgraph-mouse-sweep: script duration 100ms
subgraph-mouse-sweep: TBT 0ms
subgraph-mouse-sweep: heap used 64.5 MB
subgraph-mouse-sweep: DOM nodes 63
subgraph-mouse-sweep: event listeners 6
subgraph-transition-enter: avg frame time 17ms
subgraph-transition-enter: p95 frame time 17ms
subgraph-transition-enter: layout duration 11ms
subgraph-transition-enter: style recalc duration 30ms
subgraph-transition-enter: layout count 15
subgraph-transition-enter: style recalc count 19
subgraph-transition-enter: task duration 994ms
subgraph-transition-enter: script duration 35ms
subgraph-transition-enter: TBT 128ms
subgraph-transition-enter: heap used 97.9 MB
subgraph-transition-enter: DOM nodes 13673
subgraph-transition-enter: event listeners 2371
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 42ms
viewport-pan-sweep: layout count 0
viewport-pan-sweep: style recalc count 250
viewport-pan-sweep: task duration 4978ms
viewport-pan-sweep: script duration 1426ms
viewport-pan-sweep: TBT 0ms
viewport-pan-sweep: heap used 75.1 MB
viewport-pan-sweep: DOM nodes -291
viewport-pan-sweep: event listeners -144
vue-large-graph-idle: avg frame time 18ms
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 18279ms
vue-large-graph-idle: script duration 618ms
vue-large-graph-idle: TBT 0ms
vue-large-graph-idle: heap used 170.5 MB
vue-large-graph-idle: DOM nodes -8314
vue-large-graph-idle: event listeners -16388
vue-large-graph-pan: avg frame time 18ms
vue-large-graph-pan: p95 frame time 17ms
vue-large-graph-pan: layout duration 0ms
vue-large-graph-pan: style recalc duration 27ms
vue-large-graph-pan: layout count 0
vue-large-graph-pan: style recalc count 176
vue-large-graph-pan: task duration 22994ms
vue-large-graph-pan: script duration 997ms
vue-large-graph-pan: TBT 795ms
vue-large-graph-pan: heap used 155.1 MB
vue-large-graph-pan: DOM nodes -8314
vue-large-graph-pan: event listeners -16383
workflow-execution: avg frame time 17ms
workflow-execution: p95 frame time 17ms
workflow-execution: layout duration 1ms
workflow-execution: style recalc duration 23ms
workflow-execution: layout count 3
workflow-execution: style recalc count 16
workflow-execution: task duration 132ms
workflow-execution: script duration 13ms
workflow-execution: TBT 0ms
workflow-execution: heap used 52.5 MB
workflow-execution: DOM nodes 135
workflow-execution: event listeners 68
Raw data
{
  "timestamp": "2026-08-01T01:58:25.248Z",
  "gitSha": "bf4f9b4e3a846c28372f8b3e8e8cb8e0d90680fd",
  "branch": "comfydesigner/saved-method-confirm",
  "measurements": [
    {
      "name": "canvas-idle",
      "durationMs": 2131.508999999994,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 8.014999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 765.348,
      "heapDeltaBytes": 5359404,
      "heapUsedBytes": 77214004,
      "domNodes": 18,
      "jsHeapTotalBytes": 18997248,
      "scriptDurationMs": 29.12,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-idle",
      "durationMs": 2068.356000000051,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 7.505,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 578.0419999999999,
      "heapDeltaBytes": 5296584,
      "heapUsedBytes": 77031556,
      "domNodes": 16,
      "jsHeapTotalBytes": 19521536,
      "scriptDurationMs": 20.419,
      "eventListeners": 5,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1908.7539999999876,
      "styleRecalcs": 77,
      "styleRecalcDurationMs": 44.18900000000001,
      "layouts": 12,
      "layoutDurationMs": 3.5779999999999994,
      "taskDurationMs": 1029.0190000000002,
      "heapDeltaBytes": -248244,
      "heapUsedBytes": 71373264,
      "domNodes": 60,
      "jsHeapTotalBytes": 20307968,
      "scriptDurationMs": 134.575,
      "eventListeners": 7,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1839.6079999999984,
      "styleRecalcs": 74,
      "styleRecalcDurationMs": 37.799,
      "layouts": 12,
      "layoutDurationMs": 3.8520000000000003,
      "taskDurationMs": 915.4740000000002,
      "heapDeltaBytes": -30320,
      "heapUsedBytes": 71591904,
      "domNodes": 57,
      "jsHeapTotalBytes": 19783680,
      "scriptDurationMs": 125.14599999999999,
      "eventListeners": 7,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1751.1019999999462,
      "styleRecalcs": 30,
      "styleRecalcDurationMs": 18.513,
      "layouts": 6,
      "layoutDurationMs": 0.7550000000000002,
      "taskDurationMs": 492.24300000000005,
      "heapDeltaBytes": 8347496,
      "heapUsedBytes": 80008836,
      "domNodes": 75,
      "jsHeapTotalBytes": 19259392,
      "scriptDurationMs": 25.099,
      "eventListeners": 21,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1734.5819999999321,
      "styleRecalcs": 30,
      "styleRecalcDurationMs": 17.46,
      "layouts": 6,
      "layoutDurationMs": 0.6430000000000001,
      "taskDurationMs": 467.781,
      "heapDeltaBytes": -18165156,
      "heapUsedBytes": 53442596,
      "domNodes": 75,
      "jsHeapTotalBytes": 18735104,
      "scriptDurationMs": 22.742,
      "eventListeners": 22,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 672.8779999999688,
      "styleRecalcs": 13,
      "styleRecalcDurationMs": 9.185,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 440.829,
      "heapDeltaBytes": -11589456,
      "heapUsedBytes": 59804504,
      "domNodes": 22,
      "jsHeapTotalBytes": 20307968,
      "scriptDurationMs": 59.958000000000006,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 622.0270000000028,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 8.050999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 423.181,
      "heapDeltaBytes": -11832520,
      "heapUsedBytes": 59933236,
      "domNodes": 18,
      "jsHeapTotalBytes": 20570112,
      "scriptDurationMs": 59.18799999999999,
      "eventListeners": 5,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2036.6450000000214,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 9.134,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 956.318,
      "heapDeltaBytes": 1427312,
      "heapUsedBytes": 63321224,
      "domNodes": -292,
      "jsHeapTotalBytes": 4775936,
      "scriptDurationMs": 126.67200000000001,
      "eventListeners": -176,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2043.0359999999155,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 7.877999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 805.5009999999999,
      "heapDeltaBytes": 8446520,
      "heapUsedBytes": 70854384,
      "domNodes": -288,
      "jsHeapTotalBytes": 4251648,
      "scriptDurationMs": 113.902,
      "eventListeners": -146,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66999999999998,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2206.2630000000354,
      "styleRecalcs": 69,
      "styleRecalcDurationMs": 15.313000000000004,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1432.686,
      "heapDeltaBytes": 1992204,
      "heapUsedBytes": 65255352,
      "domNodes": -294,
      "jsHeapTotalBytes": 5505024,
      "scriptDurationMs": 436.607,
      "eventListeners": -146,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2290.277999999944,
      "styleRecalcs": 67,
      "styleRecalcDurationMs": 13.376000000000003,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1434.993,
      "heapDeltaBytes": -5362184,
      "heapUsedBytes": 58205516,
      "domNodes": -297,
      "jsHeapTotalBytes": 5038080,
      "scriptDurationMs": 448.033,
      "eventListeners": -148,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3425.7819999999697,
      "styleRecalcs": 65,
      "styleRecalcDurationMs": 16.550999999999995,
      "layouts": 60,
      "layoutDurationMs": 9.128,
      "taskDurationMs": 1768.67,
      "heapDeltaBytes": 8333476,
      "heapUsedBytes": 72955732,
      "domNodes": -294,
      "jsHeapTotalBytes": 7397376,
      "scriptDurationMs": 596.719,
      "eventListeners": -150,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3265.0090000000773,
      "styleRecalcs": 64,
      "styleRecalcDurationMs": 14.973,
      "layouts": 60,
      "layoutDurationMs": 8.383999999999999,
      "taskDurationMs": 1611.6670000000001,
      "heapDeltaBytes": 26283552,
      "heapUsedBytes": 91017288,
      "domNodes": 13,
      "jsHeapTotalBytes": 8388608,
      "scriptDurationMs": 551.86,
      "eventListeners": 9,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.220000000000013,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "minimap-idle",
      "durationMs": 2044.7829999999954,
      "styleRecalcs": 7,
      "styleRecalcDurationMs": 6.467999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 834.5889999999999,
      "heapDeltaBytes": 8155208,
      "heapUsedBytes": 72400544,
      "domNodes": -294,
      "jsHeapTotalBytes": 4775936,
      "scriptDurationMs": 116.399,
      "eventListeners": -148,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "minimap-idle",
      "durationMs": 2042.8120000000263,
      "styleRecalcs": 6,
      "styleRecalcDurationMs": 5.591000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 828.222,
      "heapDeltaBytes": 4289232,
      "heapUsedBytes": 68987044,
      "domNodes": -293,
      "jsHeapTotalBytes": 4775936,
      "scriptDurationMs": 118.453,
      "eventListeners": -146,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 722.4349999999617,
      "styleRecalcs": 46,
      "styleRecalcDurationMs": 13.886000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 481.53399999999993,
      "heapDeltaBytes": -11072068,
      "heapUsedBytes": 60679332,
      "domNodes": 18,
      "jsHeapTotalBytes": 20832256,
      "scriptDurationMs": 128.203,
      "eventListeners": 10,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 653.5560000000942,
      "styleRecalcs": 46,
      "styleRecalcDurationMs": 10.211000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 446.503,
      "heapDeltaBytes": -10760872,
      "heapUsedBytes": 60849024,
      "domNodes": 18,
      "jsHeapTotalBytes": 20307968,
      "scriptDurationMs": 124.881,
      "eventListeners": 10,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66999999999998,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2018.4570000000122,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 8.716999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 644.89,
      "heapDeltaBytes": 4779420,
      "heapUsedBytes": 76371628,
      "domNodes": 18,
      "jsHeapTotalBytes": 19521536,
      "scriptDurationMs": 20.750999999999998,
      "eventListeners": 5,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2020.7520000000159,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 8.658,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 561.028,
      "heapDeltaBytes": 4709820,
      "heapUsedBytes": 76436248,
      "domNodes": 20,
      "jsHeapTotalBytes": 19521536,
      "scriptDurationMs": 16.732999999999997,
      "eventListeners": 5,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1739.2759999999612,
      "styleRecalcs": 76,
      "styleRecalcDurationMs": 39.834,
      "layouts": 16,
      "layoutDurationMs": 4.475,
      "taskDurationMs": 905.2199999999999,
      "heapDeltaBytes": -3713900,
      "heapUsedBytes": 67665056,
      "domNodes": 64,
      "jsHeapTotalBytes": 20307968,
      "scriptDurationMs": 99.14500000000001,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1724.7350000000097,
      "styleRecalcs": 75,
      "styleRecalcDurationMs": 39.285000000000004,
      "layouts": 16,
      "layoutDurationMs": 4.708,
      "taskDurationMs": 868.923,
      "heapDeltaBytes": -3997276,
      "heapUsedBytes": 67625448,
      "domNodes": 62,
      "jsHeapTotalBytes": 20307968,
      "scriptDurationMs": 100.715,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-transition-enter",
      "durationMs": 1427.3099999999772,
      "styleRecalcs": 19,
      "styleRecalcDurationMs": 29.933,
      "layouts": 15,
      "layoutDurationMs": 11.443000000000001,
      "taskDurationMs": 994.4949999999999,
      "heapDeltaBytes": 30015640,
      "heapUsedBytes": 102675008,
      "domNodes": 13673,
      "jsHeapTotalBytes": 16252928,
      "scriptDurationMs": 35.43600000000001,
      "eventListeners": 2371,
      "totalBlockingTimeMs": 128,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 8513.671999999986,
      "styleRecalcs": 250,
      "styleRecalcDurationMs": 42.452,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 5022.407,
      "heapDeltaBytes": 24374256,
      "heapUsedBytes": 86461348,
      "domNodes": -291,
      "jsHeapTotalBytes": 6524928,
      "scriptDurationMs": 1445.6039999999998,
      "eventListeners": -159,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 8482.70100000002,
      "styleRecalcs": 249,
      "styleRecalcDurationMs": 41.135,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 4932.934,
      "heapDeltaBytes": 8860784,
      "heapUsedBytes": 70942036,
      "domNodes": -290,
      "jsHeapTotalBytes": 6524928,
      "scriptDurationMs": 1405.479,
      "eventListeners": -129,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 18715.49299999998,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 18347.295,
      "heapDeltaBytes": -44524908,
      "heapUsedBytes": 171132244,
      "domNodes": -8315,
      "jsHeapTotalBytes": -8560640,
      "scriptDurationMs": 611.071,
      "eventListeners": -16388,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.776666666666642,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 18573.620000000006,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 18210.933999999997,
      "heapDeltaBytes": -42135536,
      "heapUsedBytes": 186360092,
      "domNodes": -8312,
      "jsHeapTotalBytes": -8847360,
      "scriptDurationMs": 624.35,
      "eventListeners": -16387,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.776666666666642,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 23044.51599999999,
      "styleRecalcs": 176,
      "styleRecalcDurationMs": 26.33599999999997,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 22791.685,
      "heapDeltaBytes": -58519712,
      "heapUsedBytes": 156970568,
      "domNodes": -8315,
      "jsHeapTotalBytes": -9084928,
      "scriptDurationMs": 1019.6540000000001,
      "eventListeners": -16382,
      "totalBlockingTimeMs": 786,
      "frameDurationMs": 17.77333333333336,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 23419.878999999924,
      "styleRecalcs": 175,
      "styleRecalcDurationMs": 26.783999999999974,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 23196.16,
      "heapDeltaBytes": -54404756,
      "heapUsedBytes": 168388460,
      "domNodes": -8312,
      "jsHeapTotalBytes": -13828096,
      "scriptDurationMs": 974.2050000000002,
      "eventListeners": -16383,
      "totalBlockingTimeMs": 804,
      "frameDurationMs": 17.776666666666642,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "workflow-execution",
      "durationMs": 494.39299999994546,
      "styleRecalcs": 20,
      "styleRecalcDurationMs": 24.238999999999997,
      "layouts": 3,
      "layoutDurationMs": 1.3390000000000002,
      "taskDurationMs": 137.858,
      "heapDeltaBytes": -15516092,
      "heapUsedBytes": 55262040,
      "domNodes": 154,
      "jsHeapTotalBytes": 6676480,
      "scriptDurationMs": 13.620000000000001,
      "eventListeners": 68,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "workflow-execution",
      "durationMs": 472.6020000000517,
      "styleRecalcs": 12,
      "styleRecalcDurationMs": 21.053,
      "layouts": 3,
      "layoutDurationMs": 0.738,
      "taskDurationMs": 126.20799999999998,
      "heapDeltaBytes": -15960048,
      "heapUsedBytes": 54792996,
      "domNodes": 115,
      "jsHeapTotalBytes": 6414336,
      "scriptDurationMs": 12.095999999999998,
      "eventListeners": 67,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    }
  ]
}

The SingleSelect trigger renders the selected method's per-type icon
(card/alipay/bank) via the icon slot, matching the single-method row. Also
repairs two stale tests asserting the pre-redesign UI: the yearly total is
grouped, and the removed back-to-plans link no longer has a pending-state
test to satisfy.
A subscribe or plan-change charge that failed during polling stranded the
dialog on the confirm step with only the store's toast. The checkout
composable now routes the operation's failed terminal state to a declined
step (same guards as success: operation id and workspace), carrying the
error message. New SubscriptionPaymentDeclinedWorkspace renders the
Figma 4198-20207 state on the narrow dark frame: header back arrow to the
confirm screen, declined copy, reason tile, portal-routed Update payment
method. Capture-step declines keep Stripe's inline handling.
@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Aug 1, 2026
pull Bot pushed a commit to Penguinjanator/ComfyUI_frontend that referenced this pull request Aug 25, 2026
## Summary

Consolidates the complete embedded subscription checkout frontend onto
current `main` as the single review tip, including the design stack,
safety gates, exact quote contract UI, saved methods, and 3DS recovery.

## Changes

- **What**: Replays and reconciles the frontend work from Comfy-Org#14447,
Comfy-Org#14449, Comfy-Org#14476, and Comfy-Org#14482 without modifying those provenance PRs or
branches.
- **Dependencies**: Requires the combined backend environment for
end-to-end preview validation.

## Review Focus

Review exact quote freshness, reactivation safeguards, saved-method
confirmation, and retryable/reconciliation 3DS states together.

Checks run locally: typecheck, browser fixture typecheck, format,
lint/oxlint, knip, 231 billing-focused Vitest tests, and cloud
Playwright test discovery.

## Screenshots (if applicable)

AS IS / TO BE screenshots and preview will be attached after the
combined environment exists.

---------

Co-authored-by: Amp <amp@ampcode.com>

@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.

The confirm-screen convergence work reads well and I appreciate how explicitly the description marks what's waiting on the backend — that made this much faster to review.

One blocking item, and it's good news: the contract you're waiting for already exists.

The description says the saved-method list is "null until the backend supplies it, so this ships dark" and lists "Backend contract needed: preview response should carry saved methods [{ type, brand?, last4?, id, isDefault }]". But @comfyorg/ingest-types already exports both the endpoint and the type:

// packages/ingest-types/src/types.gen.ts
export type SavedPaymentMethod = {
  brand?: string   // Card brand. Present only for card payment methods.
  id: string
  is_default: boolean   // Exactly one item is the default when the list is non-empty.
  last4?: string
  type: string
}

plus ListSavedPaymentMethodsData / ListSavedPaymentMethodsResponse for /api/billing/payment-methods (the path is in the spec at L6733). That is exactly the shape the description asks for, is_default included.

So rather than a change request against your design, this is: the plumbing can be wired to the real endpoint and the generated type, and this doesn't have to ship dark at all.

The blocking part is the hand-declared copy — same class of bug as #14771, and coincidentally the same type name. Details inline.

Unanchored

Still genuinely open. These aren't resolved by the above and remain real gaps:

  • promotion_code on the change-preview endpoint — I confirmed it isn't in the spec, so the template comment is accurate.
  • Whether subscribe accepts a chosen method id.
  • Your question about whether the current flow shows the capture form to customers who already have a saved method — worth getting answered before this lands, since captureMode (L323) now encodes an assumed answer.

Type placement. SavedPaymentMethod is exported from a .vue file and imported across components (SubscriptionRequiredDialogContentUnified.vue L181). Even for genuinely FE-only types that's a fragile home; once this switches to the generated export the import should come from @comfyorg/ingest-types directly and the cross-component .vue type import can go away.

import SubscriptionTermsNote from './SubscriptionTermsNote.vue'
import UnifiedStripePaymentSelector from './UnifiedStripePaymentSelector.vue'

export interface SavedPaymentMethod {

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.

issue: This re-declares a server response type that already exists in the generated package, and the copy has drifted from it before the feature has even shipped.

Generated (@comfyorg/ingest-types):

export type SavedPaymentMethod = {
  brand?: string
  id: string            // required
  is_default: boolean   // required
  last4?: string
  type: string
}

This PR:

export interface SavedPaymentMethod {
  type: 'card' | 'alipay' | 'bank'
  brand?: string
  last4?: string
}

Three divergences, each with a concrete consequence:

  1. id is missing. Your own description says subscribe needs to "accept the chosen method id" — but selectedMethodDetails (L342) resolves a method by array index (savedMethods?.[Number(selectedMethod.value)]), so there is no id to send. With the generated type the id is right there.
  2. is_default is missing. The contract guarantees "exactly one item is the default when the returned list is non-empty" — that's the natural initial selection, and right now the picker can't express it.
  3. type is narrowed to a closed union. The contract has type: string, deliberately open. A method type outside these three (Link, Cash App, us_bank_account) either fails to typecheck at the boundary or falls through methodLabel (L325) to whatever the fallback renders. This is precisely the refactor: derive workspaceApi types from @comfyorg/ingest-types #14771 failure — a value the server can send that the hand-declared type doesn't know about.

Could this import the generated SavedPaymentMethod instead? If the UI needs an FE-only addition, a thin intersection on top of the generated export is fine — it's the full local redeclaration that drifts.

// Default payment method for the confirming workspace. The backend does not
// expose this pre-confirm yet; once it does, populate from the preview
// response and the capture form becomes first-subscribe-only.
const savedMethodsForConfirm = ref<SavedPaymentMethod[] | null>(null)

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.

issue: savedMethodsForConfirm is a ref initialised to null and, as far as I can tell, never assigned from a server read — which is what makes this ship dark.

But /api/billing/payment-methods is in the contract with ListSavedPaymentMethodsResponse, so this can be a real fetch today rather than a placeholder waiting on backend work.

That matters beyond "it could work sooner", because the null placeholder is currently load-bearing for behavior: L213 and L227 gate the step layout on !savedMethodsForConfirm.value?.length, and L289 feeds it into a transition key. Every one of those paths is exercised only in the empty state right now, so the populated branches ship untested. A live fetch makes them reachable — and testable — instead of dead until a follow-up flips them on.

Relatedly, @change-payment-method="savedMethodsForConfirm = null" (L119, L134) discards the fetched list to re-enter capture mode. Once this is server-backed, nulling the source of truth to drive a UI mode will mean a refetch to get back. A separate useCaptureMode boolean would keep the server data and the view state independent.

])
const selectedMethod = ref('0')
const selectedSavedMethod = computed(
() => savedMethods?.[Number(selectedMethod.value)] ?? null

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.

question: Selection is stored as a stringified array index and resolved positionally:

() => savedMethods?.[Number(selectedMethod.value)] ?? null

If the list is refetched or reordered between selection and submit — a method added or removed in another tab, or the server's ordering not being stable — the index now points at a different card, and the customer is charged on a method they didn't pick.

The contract's id field is the stable key for this. Is there a reason the picker binds to the index rather than the id, beyond SingleSelect ergonomics?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Better news than the comment hoped: the contract isn't just available — main already consumes it. workspaceApi.ts imports SavedPaymentMethod from @comfyorg/ingest-types (re-exported at line 124), listSavedPaymentMethods() returns the generated type, and the shipped saved-method confirm selects by id through selectedSavedMethodId — the index-selection bug exists only on this branch, which is five weeks behind a surface that was rebuilt underneath it. The rest of this PR landed better elsewhere too: the declined step is #15944's SubscriptionDeclinedWorkspace, the promo entry is the inline row, the confirm-screen convergence happened in the consolidation. Unique residue here is the 'bank' method type and the picker-trigger glyph, neither of which is in the current designs. Proposing we close this as superseded (Alex to confirm) and extract the residue as tickets if wanted — reviewing it further would be reviewing a timeline that no longer exists.

@comfydesigner

Copy link
Copy Markdown
Contributor Author

Closing as superseded per the thread above: the flagged index-selection bug is already fixed on main (generated SavedPaymentMethod with id/is_default, id-based selection), the declined step landed as #15944's SubscriptionDeclinedWorkspace, and the confirm-screen convergence happened in the consolidation. The two pieces unique to this branch — the 'bank' method type and the picker-trigger glyph — aren't in the current designs; they can be ticketed if they return.

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

Labels

size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants