CluPilotCloud/resources/views/livewire
nexxo 34874adec3
tests / pest (push) Failing after 8m6s Details
tests / assets (push) Successful in 21s Details
tests / release (push) Has been skipped Details
Apply a bought plan change instead of only pricing it
PlanChange could say what a move would cost and whether it was allowed, and
that was all it could do. Billing::purchase() wrote an upgrade order and
nothing ever consumed it: same snapshot, same machine, same quota. A customer
could pay for a bigger package and receive nothing.

ApplyPlanChange is now the single place a change lands — it moves the contract
onto the target's current version, writes one register row, settles the custom
domain, and starts a run that resizes the machine. Applying the same order
twice is a no-op, enforced by a unique event key rather than by a check two
callers could both pass.

Two things a plan change must not do, and now does not. A disk is never shrunk
— Proxmox cannot, so the QUOTA shrinks instead, which is what was sold anyway.
And a live machine is never rebooted as a side effect: cores and RAM are
written, and where they need a restart the instance says so where an operator
and the customer can both see it.

The storage allowance also joins the build pipeline. ApplyStorageQuota was
written for plan changes and ran only there, so a brand-new customer still got
no quota at all — quota_gb reached the instance row and stopped, and every
package delivered the whole disk. The test guarding that pipeline only counted
its steps, which is how a list missing the one step that makes a package's
storage real stayed green for its whole life. It now names the step.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-29 17:18:55 +02:00
..
admin Apply a bought plan change instead of only pricing it 2026-07-29 17:18:55 +02:00
auth Give people a way back in, and put the URL in English 2026-07-29 16:50:29 +02:00
backups.blade.php Match the panel to the approved template, measured rather than assumed 2026-07-27 17:08:05 +02:00
billing.blade.php Decide who may have their own domain, and decide it in one place 2026-07-29 15:59:04 +02:00
cloud.blade.php Apply a bought plan change instead of only pricing it 2026-07-29 17:18:55 +02:00
confirm-cancel-package.blade.php One definition of the navigation, and the country instead of the building 2026-07-27 16:09:39 +02:00
confirm-close-account.blade.php One definition of the navigation, and the country instead of the building 2026-07-27 16:09:39 +02:00
confirm-disable-two-factor.blade.php Replace native confirm() dialogs with the app's own modal pattern 2026-07-28 19:34:27 +02:00
confirm-end-other-sessions.blade.php Show where an account is signed in, and let it sign the other places out 2026-07-28 23:38:17 +02:00
confirm-remove-order.blade.php feat(billing): a cart you can actually read and change 2026-07-26 05:26:49 +02:00
confirm-revoke-seat.blade.php Replace native confirm() dialogs with the app's own modal pattern 2026-07-28 19:34:27 +02:00
custom-domain.blade.php Serve the custom domain, not just announce it 2026-07-29 16:44:52 +02:00
customer-provisioning.blade.php One definition of the navigation, and the country instead of the building 2026-07-27 16:09:39 +02:00
dashboard.blade.php Stop mailing the initial admin password, hold it in the panel until noted 2026-07-28 23:19:20 +02:00
edit-mailbox.blade.php Let a mailbox send without a password when it never needed one 2026-07-28 05:54:21 +02:00
edit-seat.blade.php Editing in modals, an update button that is not gated on a stale reading, and a support page that is real 2026-07-27 17:55:49 +02:00
invoices.blade.php Match the panel to the approved template, measured rather than assumed 2026-07-27 17:08:05 +02:00
new-support-request.blade.php Editing in modals, an update button that is not gated on a stale reading, and a support page that is real 2026-07-27 17:55:49 +02:00
sessions.blade.php Show where an account is signed in, and let it sign the other places out 2026-07-28 23:38:17 +02:00
settings.blade.php Show where an account is signed in, and let it sign the other places out 2026-07-28 23:38:17 +02:00
support.blade.php Editing in modals, an update button that is not gated on a stale reading, and a support page that is real 2026-07-27 17:55:49 +02:00
users.blade.php Replace native confirm() dialogs with the app's own modal pattern 2026-07-28 19:34:27 +02:00