Repository navigation
fix(billing): show enterprise guidance at top-up cap - #14815
dante01yoon wants to merge 2 commits into
Conversation
Amp-Thread-ID: https://ampcode.com/threads/T-019fd293-f206-7568-aac5-3534ddb7a042 Co-authored-by: Amp <amp@ampcode.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 1792 passed, 0 failed📊 Browser Reports
📦 Bundle Size
⚡ Performance Report
Absolute values
Raw data{
"timestamp": "2026-08-07T16:57:52.316Z",
"gitSha": "8e0e12fb8a9aa67fb45b27554747e028229b24f3",
"branch": "dante/topup-max-enterprise-warning",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2037.9279999999937,
"styleRecalcs": 10,
"styleRecalcDurationMs": 6.362000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 396.78499999999997,
"heapDeltaBytes": 5438288,
"heapUsedBytes": 69729616,
"domNodes": 20,
"jsHeapTotalBytes": 24903680,
"scriptDurationMs": 13.994000000000002,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 1993.4769999999844,
"styleRecalcs": 10,
"styleRecalcDurationMs": 7.44,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 407.78700000000003,
"heapDeltaBytes": 5502332,
"heapUsedBytes": 69822516,
"domNodes": 20,
"jsHeapTotalBytes": 24903680,
"scriptDurationMs": 16.72,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1777.2349999999904,
"styleRecalcs": 73,
"styleRecalcDurationMs": 28.132000000000005,
"layouts": 12,
"layoutDurationMs": 2.845,
"taskDurationMs": 738.74,
"heapDeltaBytes": -11936644,
"heapUsedBytes": 52208612,
"domNodes": -280,
"jsHeapTotalBytes": 24096768,
"scriptDurationMs": 93.068,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1708.4859999999935,
"styleRecalcs": 72,
"styleRecalcDurationMs": 29.526,
"layouts": 12,
"layoutDurationMs": 3.014,
"taskDurationMs": 701.826,
"heapDeltaBytes": -203516,
"heapUsedBytes": 63795004,
"domNodes": 54,
"jsHeapTotalBytes": 25690112,
"scriptDurationMs": 95.761,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1685.0880000000075,
"styleRecalcs": 31,
"styleRecalcDurationMs": 13.019999999999998,
"layouts": 6,
"layoutDurationMs": 0.5379999999999998,
"taskDurationMs": 295.887,
"heapDeltaBytes": 8181536,
"heapUsedBytes": 72101444,
"domNodes": 77,
"jsHeapTotalBytes": 25165824,
"scriptDurationMs": 15.506999999999998,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1676.4220000000023,
"styleRecalcs": 31,
"styleRecalcDurationMs": 13.998999999999999,
"layouts": 6,
"layoutDurationMs": 0.5109999999999999,
"taskDurationMs": 314.99100000000004,
"heapDeltaBytes": 8294760,
"heapUsedBytes": 72352632,
"domNodes": 77,
"jsHeapTotalBytes": 25165824,
"scriptDurationMs": 17.47,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 469.12500000001955,
"styleRecalcs": 12,
"styleRecalcDurationMs": 6.075999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 290.34700000000004,
"heapDeltaBytes": -11313704,
"heapUsedBytes": 52817068,
"domNodes": 20,
"jsHeapTotalBytes": 24903680,
"scriptDurationMs": 43.512,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-clipping",
"durationMs": 534.8749999999995,
"styleRecalcs": 12,
"styleRecalcDurationMs": 7.073000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 317.55400000000003,
"heapDeltaBytes": -11127560,
"heapUsedBytes": 52997096,
"domNodes": 20,
"jsHeapTotalBytes": 24379392,
"scriptDurationMs": 46.885999999999996,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "large-graph-idle",
"durationMs": 2013.8880000000086,
"styleRecalcs": 10,
"styleRecalcDurationMs": 6.9140000000000015,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 534.6189999999999,
"heapDeltaBytes": 5852812,
"heapUsedBytes": 67423192,
"domNodes": -280,
"jsHeapTotalBytes": 3514368,
"scriptDurationMs": 74.769,
"eventListeners": -179,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2015.7990000000154,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.024000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 583.332,
"heapDeltaBytes": 6743092,
"heapUsedBytes": 66082996,
"domNodes": -279,
"jsHeapTotalBytes": 2465792,
"scriptDurationMs": 87.623,
"eventListeners": -147,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2069.817999999998,
"styleRecalcs": 68,
"styleRecalcDurationMs": 13.563,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 960.166,
"heapDeltaBytes": 3179092,
"heapUsedBytes": 64009656,
"domNodes": -281,
"jsHeapTotalBytes": 3706880,
"scriptDurationMs": 313.67699999999996,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2095.249000000024,
"styleRecalcs": 68,
"styleRecalcDurationMs": 13.979999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1075.8190000000002,
"heapDeltaBytes": 782436,
"heapUsedBytes": 61137448,
"domNodes": -284,
"jsHeapTotalBytes": 3182592,
"scriptDurationMs": 346.368,
"eventListeners": -147,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3071.493999999973,
"styleRecalcs": 67,
"styleRecalcDurationMs": 14.290000000000001,
"layouts": 60,
"layoutDurationMs": 6.82,
"taskDurationMs": 1158.0980000000002,
"heapDeltaBytes": 22778656,
"heapUsedBytes": 85014460,
"domNodes": 16,
"jsHeapTotalBytes": 7602176,
"scriptDurationMs": 403.87,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3108.136000000002,
"styleRecalcs": 67,
"styleRecalcDurationMs": 15.328000000000001,
"layouts": 60,
"layoutDurationMs": 7.255,
"taskDurationMs": 1287.7269999999999,
"heapDeltaBytes": -7776492,
"heapUsedBytes": 53986220,
"domNodes": -284,
"jsHeapTotalBytes": 5349376,
"scriptDurationMs": 439.93499999999995,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 1999.3440000000078,
"styleRecalcs": 9,
"styleRecalcDurationMs": 6.586999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 575.326,
"heapDeltaBytes": 4990568,
"heapUsedBytes": 68015640,
"domNodes": -282,
"jsHeapTotalBytes": 3252224,
"scriptDurationMs": 85.49900000000001,
"eventListeners": -179,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "minimap-idle",
"durationMs": 2009.3010000000504,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.318999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 599.65,
"heapDeltaBytes": 6354260,
"heapUsedBytes": 66643984,
"domNodes": -281,
"jsHeapTotalBytes": 3514368,
"scriptDurationMs": 93.08,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 509.1960000000313,
"styleRecalcs": 49,
"styleRecalcDurationMs": 9.761000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 310.818,
"heapDeltaBytes": -10492152,
"heapUsedBytes": 53647680,
"domNodes": 24,
"jsHeapTotalBytes": 25427968,
"scriptDurationMs": 93.067,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.669999999999998,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 517.8850000000921,
"styleRecalcs": 48,
"styleRecalcDurationMs": 10.060999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 329.47800000000007,
"heapDeltaBytes": -10480912,
"heapUsedBytes": 53676540,
"domNodes": 22,
"jsHeapTotalBytes": 25427968,
"scriptDurationMs": 95.57000000000001,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-idle",
"durationMs": 2052.5840000000244,
"styleRecalcs": 12,
"styleRecalcDurationMs": 9.044,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 374.447,
"heapDeltaBytes": 5045432,
"heapUsedBytes": 69375892,
"domNodes": 24,
"jsHeapTotalBytes": 25427968,
"scriptDurationMs": 11.623999999999999,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 1995.9410000000162,
"styleRecalcs": 10,
"styleRecalcDurationMs": 6.687000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 394.28799999999995,
"heapDeltaBytes": 5159076,
"heapUsedBytes": 69330696,
"domNodes": 20,
"jsHeapTotalBytes": 24903680,
"scriptDurationMs": 13.732000000000001,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1685.1009999999746,
"styleRecalcs": 75,
"styleRecalcDurationMs": 26.723999999999997,
"layouts": 16,
"layoutDurationMs": 3.151,
"taskDurationMs": 625.516,
"heapDeltaBytes": -16517224,
"heapUsedBytes": 47607940,
"domNodes": -280,
"jsHeapTotalBytes": 23834624,
"scriptDurationMs": 72.50200000000001,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1700.6809999999746,
"styleRecalcs": 75,
"styleRecalcDurationMs": 30.520000000000003,
"layouts": 16,
"layoutDurationMs": 4.119000000000001,
"taskDurationMs": 631.098,
"heapDeltaBytes": -3983128,
"heapUsedBytes": 60209348,
"domNodes": 60,
"jsHeapTotalBytes": 25165824,
"scriptDurationMs": 79.62799999999999,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 1218.494000000021,
"styleRecalcs": 18,
"styleRecalcDurationMs": 24.818,
"layouts": 14,
"layoutDurationMs": 9.520000000000001,
"taskDurationMs": 787.361,
"heapDeltaBytes": 8447076,
"heapUsedBytes": 100416188,
"domNodes": 13673,
"jsHeapTotalBytes": 11272192,
"scriptDurationMs": 29.924000000000007,
"eventListeners": 2375,
"totalBlockingTimeMs": 84,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "viewport-pan-sweep",
"durationMs": 8106.919000000005,
"styleRecalcs": 249,
"styleRecalcDurationMs": 36.845,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3533.6569999999997,
"heapDeltaBytes": 9571524,
"heapUsedBytes": 71166772,
"domNodes": -279,
"jsHeapTotalBytes": 6328320,
"scriptDurationMs": 1093.338,
"eventListeners": -133,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8122.532000000036,
"styleRecalcs": 249,
"styleRecalcDurationMs": 37.519,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3660.4869999999996,
"heapDeltaBytes": 7495780,
"heapUsedBytes": 67071776,
"domNodes": -280,
"jsHeapTotalBytes": 4755456,
"scriptDurationMs": 1093.893,
"eventListeners": -131,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 14697.589999999991,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14681.225999999999,
"heapDeltaBytes": -37087140,
"heapUsedBytes": 167166164,
"domNodes": -8312,
"jsHeapTotalBytes": -9375744,
"scriptDurationMs": 457.36600000000004,
"eventListeners": -16389,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 14723.270999999953,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14713.244999999999,
"heapDeltaBytes": -40325008,
"heapUsedBytes": 159844812,
"domNodes": -8312,
"jsHeapTotalBytes": -9904128,
"scriptDurationMs": 445.90500000000003,
"eventListeners": -16391,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.220000000000073,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 16949.99999999999,
"styleRecalcs": 113,
"styleRecalcDurationMs": 14.209,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16922.772,
"heapDeltaBytes": -51109836,
"heapUsedBytes": 176640000,
"domNodes": -8312,
"jsHeapTotalBytes": -8138752,
"scriptDurationMs": 719.99,
"eventListeners": -16385,
"totalBlockingTimeMs": 3,
"frameDurationMs": 18.330000000000048,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 17175.506999999925,
"styleRecalcs": 118,
"styleRecalcDurationMs": 14.890999999999988,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17155.561999999998,
"heapDeltaBytes": -22127344,
"heapUsedBytes": 176614796,
"domNodes": -8312,
"jsHeapTotalBytes": -8400896,
"scriptDurationMs": 700.8100000000001,
"eventListeners": -16387,
"totalBlockingTimeMs": 38,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 452.7680000000487,
"styleRecalcs": 19,
"styleRecalcDurationMs": 18.058,
"layouts": 3,
"layoutDurationMs": 0.9850000000000002,
"taskDurationMs": 104.61999999999999,
"heapDeltaBytes": 5458084,
"heapUsedBytes": 68525836,
"domNodes": 159,
"jsHeapTotalBytes": 6029312,
"scriptDurationMs": 9.398,
"eventListeners": 97,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "workflow-execution",
"durationMs": 82.35600000000431,
"styleRecalcs": 6,
"styleRecalcDurationMs": 8.877999999999998,
"layouts": 1,
"layoutDurationMs": 0.289,
"taskDurationMs": 54.88599999999999,
"heapDeltaBytes": 3128652,
"heapUsedBytes": 66311404,
"domNodes": 106,
"jsHeapTotalBytes": 3407872,
"scriptDurationMs": 3.937999999999999,
"eventListeners": 49,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
}
]
} |
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## dante01yoon/test-billing-e2e-matrix #14815 +/- ##
====================================================================
Coverage 78.71% 78.71%
====================================================================
Files 1804 1804
Lines 107023 107023
Branches 30683 30683
====================================================================
Hits 84238 84238
Misses 22330 22330
Partials 455 455
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
## Summary Adds deterministic browser coverage for the current-main partner-node, top-up, and responsive billing-cycle workflows. This PR is stacked on the isolated maximum-warning prerequisite #14815, which is itself stacked on #14713 so the Cloud Team recovery-banner slice remains independently reviewable. ## Why this is needed These journeys span stateful API polling, exact currency payloads, workspace-scoped balances, partner-node recovery, permission boundaries, and responsive pricing interactions. Main and #14713 did not deterministically exercise them, leaving regressions dependent on live billing state and timing. The maximum top-up test also exposed a current frontend bug: manually entering an amount at or above $10,000 clamps the input correctly, but the enterprise guidance was unreachable because the warning only appeared for values strictly greater than the maximum. ## Changes - Adds a typed stateful billing API fixture for deterministic status, balance, plans, preview, top-up, subscription, cancellation, and operation polling responses. - Adds partner-node coverage for price presentation, prompt execution request, sufficient-credit balance deduction/refresh, insufficient-credit recovery after a failed billing refresh, and member privacy/permissions. - Adds top-up coverage for exact-cent personal preset/custom payloads, active Team workspace scoping, pending completion, HTTP failure/retry, failed operation feedback, and the current $10,000/enterprise contract. - Adds monthly-to-yearly Creator pricing interaction through the direct supported pricing route on Cloud desktop and mobile, guarded by nonempty interactive-plan assertions. - Depends on #14815, which isolates the `showCeilingWarning` production prerequisite. ## Root cause and fix ### AS IS `showCeilingWarning` used `value > MAX_AMOUNT`. Because the input is clamped to `MAX_AMOUNT`, the observable value could never remain above the cap, hiding the warning and Contact us link at $10,000. [AS IS screenshot](https://ampcode.com/user-content/artifacts/6f5bcdc4d255307bdaed598273b88977160cebe70cc89f89baa56c5330e79c0f-file.png) ### TO BE The warning uses `value >= MAX_AMOUNT`, preserving the cap while exposing enterprise billing guidance at the reachable maximum. [TO BE screenshot](https://ampcode.com/user-content/artifacts/4ef8548ce8b54dee264330d27bcef202cc5633667fecacd04c46d170a3a4b44b-file.png) ## Review focus - Stateful billing operation polling and mocked balance refresh/deduction behavior. - Team member permission/privacy expectations. - The one-line maximum-warning prerequisite is isolated in #14815. - #14526 is an active draft for a future saved-payment-method UI contract with component tests; these browser tests remain scoped to current-main behavior and do not mock provider metering. - Workspace Activity API wiring and browser coverage are isolated in #14811 and #14813 rather than duplicated here. ## Validation - `pnpm typecheck` and `pnpm typecheck:browser` - Focused Cloud partner-node/top-up/pricing Playwright - Pricing mobile-chrome repeated 3 times and Cloud once after the responsive route fix - ESLint, oxfmt, oxlint, knip, and `git diff --check` ## Stacking - Base: `dante/topup-max-enterprise-warning` (#14815) - #14815 is based on `dante01yoon/test-billing-e2e-matrix` (#14713) - Workspace Activity prerequisite/tests: #14811 → #14813 --------- Co-authored-by: Amp <amp@ampcode.com>
|
Working the pre-17600 backlog — this is the last item on it. Recommending revive: the bug is live on Your root-cause analysis checks out, and we traced the mechanism end to end rather than taking it.
and function handlePayAmountChange(value: number) {
payAmount.value = value
selectedPreset.value = null
showCeilingWarning.value = false // ← main
}The ordering is what makes it unreachable, and it is decided inside the stepper: // FormattedNumberStepper.vue:145-149
if (wasClamped) {
emit('max-reached') // sets showCeilingWarning = true
}
modelValue.value = clamped // emits update:model-value → handlePayAmountChange → sets it false
What that means for a customer: someone typing Your fix is order-independent rather than a reordering, which is the right call: showCeilingWarning.value = value >= MAX_AMOUNTIt also covers a case the original bug report does not: landing exactly on the cap by stepping, where The diff reads as +1555/−38, but the production change is one line in one file. Everything else is the E2E fixture and spec scaffolding for the follow-up coverage. Worth saying because the size makes it look like a much bigger revive than it is. Recommend rebasing and landing it. If the E2E half is the expensive part of the rebase, the one-line production fix stands alone and would be worth landing on its own. This was the last undispositioned item in the pre-17600 backlog. Everything in it now has a recommendation with evidence on the PR; none of it needs more review, all of it needs decisions. Summarised in christian-byrne/blocked-on-christian#778. |
Summary
Makes the existing maximum top-up guidance reachable when a custom amount is clamped to $10,000. This is the isolated production prerequisite for the deterministic maximum-contract coverage in the follow-up billing E2E PR.
Root cause
handlePayAmountChangealways clearedshowCeilingWarning. Since the number stepper clamps values toMAX_AMOUNT, the UI can never retain a value above $10,000, so the previous greater-than path could not expose the enterprise Contact us guidance.Change
Set the warning when the normalized custom value is equal to the maximum. Preset selection remains unchanged.
AS IS
A custom value at or above $10,000 is clamped but hides enterprise guidance.
AS IS screenshot
TO BE
The same clamped value shows the existing Maximum allowed and Contact us guidance.
TO BE screenshot
Validation
pnpm typecheckStacking