Skip to content

fix(billing): render checkout credits from the server preview - #15900

Closed
MaanilVerma wants to merge 9 commits into
maanil/fe-1600-s2-subscribe-checkoutfrom
maanil/fe-1600-checkout-credits-from-preview
Closed

MaanilVerma wants to merge 9 commits into
maanil/fe-1600-s2-subscribe-checkoutfrom
maanil/fe-1600-checkout-credits-from-preview

Conversation

@MaanilVerma

@MaanilVerma MaanilVerma commented Aug 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The subscription confirm and success screens showed credits from a frontend tier constant while the plan the user picked showed the catalog's, so on cloud the two could disagree. This sources the credit figure from the server preview instead, on the same money surface the plan cards already render from the API.

Changes

  • What: SubscriptionAddPaymentPreviewWorkspace, SubscriptionTransitionPreviewWorkspace, and SubscriptionSuccessWorkspace render previewData.new_plan.credits_cents (the per-period grant the API returns) when a preview is present. Team stops keep the stop's own credits; the tier constant remains only for the preview-less fallback. On the success screen, price and credits now resolve from the same source (the selected stop, then the preview), so a team change carrying a preview cannot show a server price beside a client credit figure. Each screen gains a test proving a preview figure that differs from the constant is the one rendered.
  • Breaking: None. Cloud behavior changes only where the API figure and the constant already disagreed; numerically inert on today's catalog.

Review Focus

  • previewData.new_plan.credits_cents is the full billing-period grant (verified against the backend), so no x12 is applied for a yearly personal plan from the preview; the annual Plan already carries the year total. The team branch still multiplies the monthly stop grant by 12 for a yearly commitment.
  • These are shared cloud checkout screens — a cloud reviewer is worth having on the credit-source change even though today's numbers are unchanged.

Screenshots (if applicable)

Not applicable (no visual change on cloud; the figures were already displayed, only their source moved).

The confirm and success screens showed the tier constant's credits while the
card the user picked showed the catalog's. When a preview exists its
new_plan.credits_cents (the period grant, same convention as Plan.credits_cents)
is the figure shown; team stops keep the stop's credits and the constant remains
only for the preview-less fallback. Fixtures now carry the credits they assert.
@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Aug 25, 2026
@coderabbitai

coderabbitai Bot commented Aug 25, 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: 630239dd-4c7b-4a50-aca6-1e08977a7c14

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

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

@github-actions

github-actions Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright: ✅ 2017 passed, 0 failed · 1 flaky

📊 Browser Reports
  • chromium: View Report (✅ 1996 / ❌ 0 / ⚠️ 1 / ⏭️ 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: 08/26/2026, 02:50:39 PM 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 · 63.6 MB heap
canvas-mouse-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 68.6 MB heap
canvas-zoom-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 72.8 MB heap
dom-widget-clipping: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 74.9 MB heap
large-graph-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 73.2 MB heap
large-graph-pan: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 3ms TBT · 83.1 MB heap
large-graph-zoom: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 75.9 MB heap
legacy-node-drag: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 86.9 MB heap
minimap-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 73.3 MB heap
subgraph-dom-widget-clipping: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 61.7 MB heap
subgraph-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 57.7 MB heap
subgraph-mouse-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 64.1 MB heap
subgraph-transition-enter: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 126ms TBT · 86.8 MB heap
viewport-pan-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 64.8 MB heap
vue-large-graph-idle: · 56.3 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 168.0 MB heap
vue-large-graph-pan: · 56.2 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 22ms TBT · 164.5 MB heap
workflow-execution: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 70.7 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 6ms
canvas-idle: layout count 0
canvas-idle: style recalc count 8
canvas-idle: task duration 465ms
canvas-idle: script duration 9ms
canvas-idle: TBT 0ms
canvas-idle: heap used 63.6 MB
canvas-idle: DOM nodes -282
canvas-idle: event listeners -169
canvas-mouse-sweep: avg frame time 17ms
canvas-mouse-sweep: p95 frame time 17ms
canvas-mouse-sweep: layout duration 3ms
canvas-mouse-sweep: style recalc duration 38ms
canvas-mouse-sweep: layout count 12
canvas-mouse-sweep: style recalc count 81
canvas-mouse-sweep: task duration 1127ms
canvas-mouse-sweep: script duration 124ms
canvas-mouse-sweep: TBT 0ms
canvas-mouse-sweep: heap used 68.6 MB
canvas-mouse-sweep: DOM nodes -281
canvas-mouse-sweep: event listeners -170
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 15ms
canvas-zoom-sweep: layout count 6
canvas-zoom-sweep: style recalc count 32
canvas-zoom-sweep: task duration 344ms
canvas-zoom-sweep: script duration 11ms
canvas-zoom-sweep: TBT 0ms
canvas-zoom-sweep: heap used 72.8 MB
canvas-zoom-sweep: DOM nodes 78
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 6ms
dom-widget-clipping: layout count 0
dom-widget-clipping: style recalc count 13
dom-widget-clipping: task duration 597ms
dom-widget-clipping: script duration 126ms
dom-widget-clipping: TBT 0ms
dom-widget-clipping: heap used 74.9 MB
dom-widget-clipping: DOM nodes 17
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 5
large-graph-idle: task duration 517ms
large-graph-idle: script duration 34ms
large-graph-idle: TBT 0ms
large-graph-idle: heap used 73.2 MB
large-graph-idle: DOM nodes -270
large-graph-idle: event listeners -169
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 10ms
large-graph-pan: layout count 0
large-graph-pan: style recalc count 64
large-graph-pan: task duration 2217ms
large-graph-pan: script duration 775ms
large-graph-pan: TBT 3ms
large-graph-pan: heap used 83.1 MB
large-graph-pan: DOM nodes -126
large-graph-pan: event listeners -87
large-graph-zoom: avg frame time 17ms
large-graph-zoom: p95 frame time 17ms
large-graph-zoom: layout duration 8ms
large-graph-zoom: style recalc duration 12ms
large-graph-zoom: layout count 60
large-graph-zoom: style recalc count 66
large-graph-zoom: task duration 2167ms
large-graph-zoom: script duration 713ms
large-graph-zoom: TBT 0ms
large-graph-zoom: heap used 75.9 MB
large-graph-zoom: DOM nodes -115
large-graph-zoom: event listeners 10
legacy-node-drag: avg frame time 17ms
legacy-node-drag: p95 frame time 17ms
legacy-node-drag: layout duration 0ms
legacy-node-drag: style recalc duration 5ms
legacy-node-drag: layout count 0
legacy-node-drag: style recalc count 40
legacy-node-drag: task duration 3046ms
legacy-node-drag: script duration 822ms
legacy-node-drag: TBT 0ms
legacy-node-drag: heap used 86.9 MB
legacy-node-drag: DOM nodes 0
legacy-node-drag: event listeners 190
minimap-idle: avg frame time 17ms
minimap-idle: p95 frame time 17ms
minimap-idle: layout duration 0ms
minimap-idle: style recalc duration 3ms
minimap-idle: layout count 0
minimap-idle: style recalc count 2
minimap-idle: task duration 495ms
minimap-idle: script duration 34ms
minimap-idle: TBT 0ms
minimap-idle: heap used 73.3 MB
minimap-idle: DOM nodes -139
minimap-idle: event listeners -89
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 8ms
subgraph-dom-widget-clipping: layout count 0
subgraph-dom-widget-clipping: style recalc count 47
subgraph-dom-widget-clipping: task duration 449ms
subgraph-dom-widget-clipping: script duration 115ms
subgraph-dom-widget-clipping: TBT 0ms
subgraph-dom-widget-clipping: heap used 61.7 MB
subgraph-dom-widget-clipping: DOM nodes 19
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 7ms
subgraph-idle: layout count 0
subgraph-idle: style recalc count 10
subgraph-idle: task duration 458ms
subgraph-idle: script duration 8ms
subgraph-idle: TBT 0ms
subgraph-idle: heap used 57.7 MB
subgraph-idle: DOM nodes -294
subgraph-idle: event listeners -199
subgraph-mouse-sweep: avg frame time 17ms
subgraph-mouse-sweep: p95 frame time 17ms
subgraph-mouse-sweep: layout duration 4ms
subgraph-mouse-sweep: style recalc duration 30ms
subgraph-mouse-sweep: layout count 16
subgraph-mouse-sweep: style recalc count 75
subgraph-mouse-sweep: task duration 963ms
subgraph-mouse-sweep: script duration 85ms
subgraph-mouse-sweep: TBT 0ms
subgraph-mouse-sweep: heap used 64.1 MB
subgraph-mouse-sweep: DOM nodes -297
subgraph-mouse-sweep: event listeners -216
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 28ms
subgraph-transition-enter: layout count 15
subgraph-transition-enter: style recalc count 20
subgraph-transition-enter: task duration 815ms
subgraph-transition-enter: script duration 28ms
subgraph-transition-enter: TBT 126ms
subgraph-transition-enter: heap used 86.8 MB
subgraph-transition-enter: DOM nodes 13671
subgraph-transition-enter: event listeners 2383
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 38ms
viewport-pan-sweep: layout count 0
viewport-pan-sweep: style recalc count 246
viewport-pan-sweep: task duration 7562ms
viewport-pan-sweep: script duration 2443ms
viewport-pan-sweep: TBT 0ms
viewport-pan-sweep: heap used 64.8 MB
viewport-pan-sweep: DOM nodes -271
viewport-pan-sweep: event listeners -156
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 13915ms
vue-large-graph-idle: script duration 265ms
vue-large-graph-idle: TBT 0ms
vue-large-graph-idle: heap used 168.0 MB
vue-large-graph-idle: DOM nodes -6550
vue-large-graph-idle: event listeners -7475
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 18ms
vue-large-graph-pan: layout count 0
vue-large-graph-pan: style recalc count 154
vue-large-graph-pan: task duration 17470ms
vue-large-graph-pan: script duration 852ms
vue-large-graph-pan: TBT 22ms
vue-large-graph-pan: heap used 164.5 MB
vue-large-graph-pan: DOM nodes -6548
vue-large-graph-pan: event listeners -7472
workflow-execution: avg frame time 17ms
workflow-execution: p95 frame time 17ms
workflow-execution: layout duration 1ms
workflow-execution: style recalc duration 22ms
workflow-execution: layout count 3
workflow-execution: style recalc count 19
workflow-execution: task duration 120ms
workflow-execution: script duration 7ms
workflow-execution: TBT 0ms
workflow-execution: heap used 70.7 MB
workflow-execution: DOM nodes 139
workflow-execution: event listeners 99
Raw data
{
  "timestamp": "2026-08-26T12:58:40.404Z",
  "gitSha": "9a66ad6b16aa1a71dc9625d18d1f399476bcceeb",
  "branch": "maanil/fe-1600-checkout-credits-from-preview",
  "measurements": [
    {
      "name": "canvas-idle",
      "durationMs": 2048.8389999999868,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 5.804,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 462.44800000000004,
      "heapDeltaBytes": 3024792,
      "heapUsedBytes": 74344632,
      "domNodes": -283,
      "jsHeapTotalBytes": 5758976,
      "scriptDurationMs": 8.767000000000003,
      "eventListeners": -185,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-idle",
      "durationMs": 2017.329000000018,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 5.823000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 468.50800000000004,
      "heapDeltaBytes": -13256048,
      "heapUsedBytes": 58989736,
      "domNodes": -281,
      "jsHeapTotalBytes": 4972544,
      "scriptDurationMs": 8.764,
      "eventListeners": -153,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 2296.7780000000175,
      "styleRecalcs": 81,
      "styleRecalcDurationMs": 39.956,
      "layouts": 12,
      "layoutDurationMs": 3.4539999999999997,
      "taskDurationMs": 1218.473,
      "heapDeltaBytes": 1895908,
      "heapUsedBytes": 73208060,
      "domNodes": -281,
      "jsHeapTotalBytes": 5496832,
      "scriptDurationMs": 132.33199999999997,
      "eventListeners": -155,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 2042.0639999999821,
      "styleRecalcs": 80,
      "styleRecalcDurationMs": 36.553999999999995,
      "layouts": 12,
      "layoutDurationMs": 3.445,
      "taskDurationMs": 1035.282,
      "heapDeltaBytes": -519872,
      "heapUsedBytes": 70613876,
      "domNodes": -280,
      "jsHeapTotalBytes": 5758976,
      "scriptDurationMs": 115.64399999999998,
      "eventListeners": -185,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1737.9940000000147,
      "styleRecalcs": 32,
      "styleRecalcDurationMs": 14.448,
      "layouts": 6,
      "layoutDurationMs": 0.597,
      "taskDurationMs": 349.70599999999996,
      "heapDeltaBytes": 4243848,
      "heapUsedBytes": 76329460,
      "domNodes": 78,
      "jsHeapTotalBytes": 4980736,
      "scriptDurationMs": 10.659000000000002,
      "eventListeners": 19,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1732.407999999964,
      "styleRecalcs": 32,
      "styleRecalcDurationMs": 15.173,
      "layouts": 6,
      "layoutDurationMs": 0.7240000000000001,
      "taskDurationMs": 337.53,
      "heapDeltaBytes": 4154564,
      "heapUsedBytes": 76334184,
      "domNodes": 77,
      "jsHeapTotalBytes": 4980736,
      "scriptDurationMs": 10.914,
      "eventListeners": 19,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66999999999998,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 874.0950000000112,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 4.864,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 588.93,
      "heapDeltaBytes": 6772280,
      "heapUsedBytes": 78162680,
      "domNodes": 14,
      "jsHeapTotalBytes": 6291456,
      "scriptDurationMs": 123.91600000000001,
      "eventListeners": 2,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 881.2060000000201,
      "styleRecalcs": 14,
      "styleRecalcDurationMs": 6.596000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 604.4430000000001,
      "heapDeltaBytes": 7414116,
      "heapUsedBytes": 78959052,
      "domNodes": 20,
      "jsHeapTotalBytes": 6291456,
      "scriptDurationMs": 127.747,
      "eventListeners": 2,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2007.9650000000129,
      "styleRecalcs": 4,
      "styleRecalcDurationMs": 2.9239999999999995,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 499.11400000000003,
      "heapDeltaBytes": -1613440,
      "heapUsedBytes": 77282492,
      "domNodes": -270,
      "jsHeapTotalBytes": -1355776,
      "scriptDurationMs": 34.884,
      "eventListeners": -153,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2040.691000000038,
      "styleRecalcs": 6,
      "styleRecalcDurationMs": 6.94,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 534.6929999999999,
      "heapDeltaBytes": -3105300,
      "heapUsedBytes": 76185464,
      "domNodes": -270,
      "jsHeapTotalBytes": -2142208,
      "scriptDurationMs": 33.839,
      "eventListeners": -185,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-pan",
      "durationMs": 3208.0569999999966,
      "styleRecalcs": 66,
      "styleRecalcDurationMs": 11.806000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 2238.009,
      "heapDeltaBytes": 460452,
      "heapUsedBytes": 79653244,
      "domNodes": -251,
      "jsHeapTotalBytes": 2015232,
      "scriptDurationMs": 785.967,
      "eventListeners": -181,
      "totalBlockingTimeMs": 5,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-pan",
      "durationMs": 3152.107000000001,
      "styleRecalcs": 62,
      "styleRecalcDurationMs": 8.980000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 2195.3639999999996,
      "heapDeltaBytes": 29159464,
      "heapUsedBytes": 94578984,
      "domNodes": 0,
      "jsHeapTotalBytes": 3371008,
      "scriptDurationMs": 763.779,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 4119.046000000026,
      "styleRecalcs": 66,
      "styleRecalcDurationMs": 12.158000000000001,
      "layouts": 60,
      "layoutDurationMs": 8.344000000000001,
      "taskDurationMs": 2197.166,
      "heapDeltaBytes": -2592948,
      "heapUsedBytes": 67917700,
      "domNodes": 24,
      "jsHeapTotalBytes": 2097152,
      "scriptDurationMs": 728.154,
      "eventListeners": 10,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 4119.0350000000535,
      "styleRecalcs": 66,
      "styleRecalcDurationMs": 12.283999999999999,
      "layouts": 60,
      "layoutDurationMs": 8.198,
      "taskDurationMs": 2136.737,
      "heapDeltaBytes": 24415708,
      "heapUsedBytes": 91323412,
      "domNodes": -254,
      "jsHeapTotalBytes": 3407872,
      "scriptDurationMs": 698.222,
      "eventListeners": 10,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 4168.655999999999,
      "styleRecalcs": 40,
      "styleRecalcDurationMs": 4.979000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 2990.138,
      "heapDeltaBytes": 23566164,
      "heapUsedBytes": 91360996,
      "domNodes": 0,
      "jsHeapTotalBytes": 3301376,
      "scriptDurationMs": 803.624,
      "eventListeners": 190,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.669999999999952,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 4438.138999999978,
      "styleRecalcs": 40,
      "styleRecalcDurationMs": 4.796000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 3101.6119999999996,
      "heapDeltaBytes": 19277788,
      "heapUsedBytes": 90787248,
      "domNodes": 0,
      "jsHeapTotalBytes": 1204224,
      "scriptDurationMs": 839.4970000000001,
      "eventListeners": 190,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333338,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "minimap-idle",
      "durationMs": 2044.2580000000135,
      "styleRecalcs": 4,
      "styleRecalcDurationMs": 6.0249999999999995,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 541.452,
      "heapDeltaBytes": -5694740,
      "heapUsedBytes": 75036808,
      "domNodes": -277,
      "jsHeapTotalBytes": -831488,
      "scriptDurationMs": 34.293000000000006,
      "eventListeners": -181,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "minimap-idle",
      "durationMs": 2011.5369999999757,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 447.6859999999999,
      "heapDeltaBytes": 13019944,
      "heapUsedBytes": 78629900,
      "domNodes": 0,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 32.967000000000006,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 645.9470000000351,
      "styleRecalcs": 47,
      "styleRecalcDurationMs": 8.019,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 449.41299999999995,
      "heapDeltaBytes": -7925472,
      "heapUsedBytes": 64782128,
      "domNodes": 20,
      "jsHeapTotalBytes": 5767168,
      "scriptDurationMs": 116.648,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 648.6499999999751,
      "styleRecalcs": 46,
      "styleRecalcDurationMs": 7.906,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 447.92800000000005,
      "heapDeltaBytes": -7945164,
      "heapUsedBytes": 64623632,
      "domNodes": 18,
      "jsHeapTotalBytes": 6029312,
      "scriptDurationMs": 113.71300000000001,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2045.0040000000058,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 6.893999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 456.613,
      "heapDeltaBytes": -11506100,
      "heapUsedBytes": 60898636,
      "domNodes": -291,
      "jsHeapTotalBytes": 4710400,
      "scriptDurationMs": 8.048,
      "eventListeners": -199,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2024.9079999999822,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 6.286999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 458.543,
      "heapDeltaBytes": -11600464,
      "heapUsedBytes": 60184696,
      "domNodes": -296,
      "jsHeapTotalBytes": 4448256,
      "scriptDurationMs": 7.512000000000001,
      "eventListeners": -199,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1758.564999999976,
      "styleRecalcs": 76,
      "styleRecalcDurationMs": 30.374,
      "layouts": 16,
      "layoutDurationMs": 4.135,
      "taskDurationMs": 976.227,
      "heapDeltaBytes": -6230956,
      "heapUsedBytes": 66603228,
      "domNodes": -297,
      "jsHeapTotalBytes": 6021120,
      "scriptDurationMs": 86.009,
      "eventListeners": -201,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1705.5710000000772,
      "styleRecalcs": 74,
      "styleRecalcDurationMs": 29.609999999999996,
      "layouts": 16,
      "layoutDurationMs": 3.952,
      "taskDurationMs": 950.462,
      "heapDeltaBytes": -4693900,
      "heapUsedBytes": 67757580,
      "domNodes": -296,
      "jsHeapTotalBytes": 6021120,
      "scriptDurationMs": 84.69,
      "eventListeners": -231,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-transition-enter",
      "durationMs": 1232.6899999999341,
      "styleRecalcs": 20,
      "styleRecalcDurationMs": 28.115000000000002,
      "layouts": 15,
      "layoutDurationMs": 10.822,
      "taskDurationMs": 814.7740000000001,
      "heapDeltaBytes": -3802504,
      "heapUsedBytes": 91022152,
      "domNodes": 13671,
      "jsHeapTotalBytes": 10223616,
      "scriptDurationMs": 27.823,
      "eventListeners": 2383,
      "totalBlockingTimeMs": 126,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 12159.67999999998,
      "styleRecalcs": 246,
      "styleRecalcDurationMs": 38.54299999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 7479.284,
      "heapDeltaBytes": -11854196,
      "heapUsedBytes": 66958620,
      "domNodes": -271,
      "jsHeapTotalBytes": 479232,
      "scriptDurationMs": 2407.784,
      "eventListeners": -155,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666607,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 12201.557999999977,
      "styleRecalcs": 246,
      "styleRecalcDurationMs": 37.242999999999995,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 7645.103,
      "heapDeltaBytes": -10205456,
      "heapUsedBytes": 68843332,
      "domNodes": -270,
      "jsHeapTotalBytes": 2314240,
      "scriptDurationMs": 2479.143,
      "eventListeners": -157,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333326,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 14646.240000000034,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 13945.821,
      "heapDeltaBytes": -33728312,
      "heapUsedBytes": 175861584,
      "domNodes": -6548,
      "jsHeapTotalBytes": -12288,
      "scriptDurationMs": 265.29999999999995,
      "eventListeners": -7475,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.776666666666642,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 14603.025000000001,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 13883.767,
      "heapDeltaBytes": -21627876,
      "heapUsedBytes": 176414884,
      "domNodes": -6552,
      "jsHeapTotalBytes": -7102464,
      "scriptDurationMs": 264.363,
      "eventListeners": -7475,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.776666666666763,
      "p95FrameDurationMs": 16.80000000000291
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 17592.22599999998,
      "styleRecalcs": 148,
      "styleRecalcDurationMs": 17.774999999999984,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 17277.264,
      "heapDeltaBytes": -29465556,
      "heapUsedBytes": 177189476,
      "domNodes": -6548,
      "jsHeapTotalBytes": 2387968,
      "scriptDurationMs": 846.835,
      "eventListeners": -7471,
      "totalBlockingTimeMs": 29,
      "frameDurationMs": 17.223333333333358,
      "p95FrameDurationMs": 16.80000000000291
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 18011.45900000006,
      "styleRecalcs": 159,
      "styleRecalcDurationMs": 18.946999999999992,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 17661.778000000002,
      "heapDeltaBytes": -56971272,
      "heapUsedBytes": 167704248,
      "domNodes": -6548,
      "jsHeapTotalBytes": -3227648,
      "scriptDurationMs": 856.6029999999998,
      "eventListeners": -7473,
      "totalBlockingTimeMs": 14,
      "frameDurationMs": 18.333333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "workflow-execution",
      "durationMs": 469.03599999996004,
      "styleRecalcs": 22,
      "styleRecalcDurationMs": 25.39,
      "layouts": 3,
      "layoutDurationMs": 1.424,
      "taskDurationMs": 132.625,
      "heapDeltaBytes": 5836716,
      "heapUsedBytes": 73943948,
      "domNodes": 152,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 7.052999999999998,
      "eventListeners": 99,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "workflow-execution",
      "durationMs": 432.4459999999135,
      "styleRecalcs": 15,
      "styleRecalcDurationMs": 18.761,
      "layouts": 3,
      "layoutDurationMs": 0.636,
      "taskDurationMs": 108.022,
      "heapDeltaBytes": 5685852,
      "heapUsedBytes": 74251260,
      "domNodes": 125,
      "jsHeapTotalBytes": 524288,
      "scriptDurationMs": 6.104999999999998,
      "eventListeners": 99,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    }
  ]
}

@github-actions github-actions Bot added the risk:R3 PR risk grade (advisory shadow check; grader-owned) label Aug 25, 2026
@codecov

codecov Bot commented Aug 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@                           Coverage Diff                            @@
##           maanil/fe-1600-s2-subscribe-checkout   #15900      +/-   ##
========================================================================
+ Coverage                                 82.64%   82.65%   +0.01%     
========================================================================
  Files                                      1944     1944              
  Lines                                    112042   112044       +2     
  Branches                                  33006    32188     -818     
========================================================================
+ Hits                                      92600    92615      +15     
+ Misses                                    19096    19092       -4     
+ Partials                                    346      337       -9     
Flag Coverage Δ
e2e 66.50% <ø> (+0.03%) ⬆️
unit 74.89% <100.00%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
...ponents/SubscriptionAddPaymentPreviewWorkspace.vue 90.75% <100.00%> (+0.16%) ⬆️
...kspace/components/SubscriptionSuccessWorkspace.vue 93.82% <100.00%> (+2.36%) ⬆️
...ponents/SubscriptionTransitionPreviewWorkspace.vue 91.09% <100.00%> (ø)

... and 15 files with indirect coverage changes

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

@MaanilVerma

MaanilVerma commented Aug 25, 2026 •

Copy link
Copy Markdown
Collaborator Author

QA — checkout confirm/success screens show credits from the server preview

The credits figure on the three reused checkout screens comes from the server preview (previewData.new_plan.credits_cents, per-period) instead of a frontend tier constant. The proof is unit-level: each screen has a "differs from constant" test that feeds a preview credit value not equal to the tier constant and asserts the screen shows the preview value. These are the same confirm/upgrade/success screens; only the number's source moves, not the layout.

Important

This changes three shared cloud money screens and is worth a cloud reviewer's eyes. The change is numerically neutral for today's catalog — credits_cents is the period grant (annual = 12x monthly) and PreviewPlanInfo.CreditsCents is resolved at minimum seats, so it is not seat-multiplied — but "neutral today" depends on catalog facts.

What it checks Proof
The add-payment/confirm screen shows the preview's credits, not the tier constant unit SubscriptionAddPaymentPreviewWorkspace → renders the refill credits from the preview, not the tier constant (preview 9,900 shown; constant 7,400 absent)
The transition/upgrade preview screen shows the preview's credits, not the constant unit SubscriptionTransitionPreviewWorkspace → renders the refill credits from the preview, not the tier constant
The success screen shows the preview's credits, not the constant unit SubscriptionSuccessWorkspace → shows the credits from the preview, not the tier constant
Preview credits are used per-period (not re-multiplied ×12 for yearly) unit — the yearly fixtures (88,800) render unchanged; a spurious ×12 would surface
Preview-less fallback still uses the tier constant (add-payment/success only) unit divides the yearly price by twelve in the fallback path (add-payment), falls back to the tier constant for the credits when there is no preview (success)
Success price and credits resolve from the same object when a team stop and a preview disagree unit SubscriptionSuccessWorkspace → takes both the price and the credits from the selected stop when a team preview disagrees (stop $7,560 / 1,772,400 shown; preview $7,580 / 88,800 both absent)
With no team stop, both success figures come from the preview unit SubscriptionSuccessWorkspace → takes both the price and the credits from the preview when there is no team stop ($7,580 + 88,800)
The deep-link annual preview fixtures are internally consistent pricingTableDeepLink.spec.ts 15/15 green against a real DISTRIBUTION=cloud build; spec assertions unchanged

On the success screen, displayPrice and displayCredits now both resolve teamPlan before previewData, matching the rule the add-payment and transition screens already follow, so a team change carrying a preview cannot show a server price beside a client credit figure. The deep-link fixtures' annual credits_today_cents / credits_next_period_cents were corrected from the monthly 7,400 to the annual grants; no assertion reads those fields, so what the spec asserts is unchanged.

Gates

vitest src/platform/workspace/components src/platform/cloud/subscription 60 files / 773 tests green · typecheck · lint · eslint on the deep-link spec · knip · oxfmt --check — all clean. The @cloud deep-link spec was run locally on a DISTRIBUTION=cloud build: 15/15 passed.

Not covered here: team-stop credits on add-payment and transition are unchanged by this PR and covered by code-read only; a visual shot with a differing-preview fixture is a nice-to-have follow-up. The transition screen requires a preview and the non-embedded team-change path could mount it without one — that crash is fixed in the plan-change PR, not here.

…otal

The confirm and success screens now read credits_cents per billing period, so
an ANNUAL plan fixture must carry the year total, not the monthly figure the
old x12 render masked. Aligns the deep-link spec's annual credits with its
annual price.
…00-checkout-credits-from-preview

# Conflicts:
#	src/platform/workspace/components/SubscriptionTransitionPreviewWorkspace.vue
@datadog-official

This comment has been minimized.

…kout' into maanil/fe-1600-checkout-credits-from-preview
@MaanilVerma MaanilVerma assigned MaanilVerma and unassigned benjcooley and DrJKL Aug 26, 2026
The success screen read its price from the server preview but its credits
from the selected team stop, so a team plan change with a preview could
show a server price beside a client credit figure. Both now resolve the
team stop first, matching the AddPayment and Transition screens, and the
preview-less fallbacks are unchanged.

Also aligns the deep-link annual preview fixtures: their credits_today /
credits_next_period figures were still the monthly grant next to annual
prices, the same inconsistency the credits_cents fields just had fixed.
The success screen's getTierCredits branch was only exercised
indirectly, so a regression in it would not have shown up.
…kout' into maanil/fe-1600-checkout-credits-from-preview

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

First review of this PR, at head 71c0a30. The direction is right and matches the stack's contract: the confirm/success screens now render previewData.new_plan.credits_cents (the per-period grant, no x12 for annual - consistent with how #15427 treats the catalog's annual rows) with the tier constant kept only as the preview-less fallback, and each screen gained a test proving a preview figure that differs from the constant wins. The pricingTableDeepLink fixture correction to full-year annual grants also matches the real catalog shape.

One question, anchored inline, before I can approve: the success screen now prefers the client-derived team stop total over the server preview's price for team changes - the opposite of the previous priority - and I'd like the backend behavior confirmed before we entrench that. Since these are shared cloud screens, worth the cloud reviewer's eyes you asked for.

: teamPlan.discountedUsd
return String(usd)
}
if (previewData?.new_plan) {

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: Moving the preview branch below teamPlan flips the team-change success price from the server preview's figure to the client-derived discountedUsd * 12 (which round-trips through a rounded whole-percent discount - see my #15428 comment - so it can differ from the API's yearly.price_cents by a dollar at some price points, and your own test now asserts $7560 renders while the server said $7580). I understand the motive: price and credits should describe one plan, and for a per-credit team plan new_plan.price_cents may be the base plan row rather than the stop-adjusted amount, in which case the old priority showed a genuinely wrong price next to stop credits. Could you confirm what the backend actually returns in preview.new_plan.price_cents for a team per-credit preview? If it is stop-aware, the server figure should win for both price and credits; if it is not, keeping the stop as the single source is right, but then the stop's exact API yearly.price_cents should flow here (via the #15428 mapper fix) rather than the lossy percent reconstruction, so the success screen can never show a total the server never stated.

@MaanilVerma
MaanilVerma marked this pull request as draft August 26, 2026 19:16
@huang47 huang47 added the risk:xhigh PR risk grade (advisory shadow check; grader-owned) label Sep 2, 2026 — with ChatGPT Codex Connector
@huang47 huang47 removed the risk:R3 PR risk grade (advisory shadow check; grader-owned) label Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:xhigh PR risk grade (advisory shadow check; grader-owned) size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants