CluPilotCloud/app/Livewire
nexxo 903ebdd2b2 Give the operator one line to copy and three steps around it
The console could describe a takeover it had no way to start. This is the
vertical slice that closes that: a one-time code, the archive the rescue system
fetches, and the page that says what to do with both.

The command carries EVERYTHING the script needs before the tunnel exists,
because there is nothing to fetch — that is the whole point of spec §5. Which
means CluPilot generates the WireGuard keypair and admits the peer at the hub
before the machine has ever booted, and hands the private half over in the line.
It is worthless within minutes: task 9 of the script replaces it with one
generated on the machine.

Shown exactly once. The database holds only the code's hash and never the
private key, so leaving the page does not bring it back — it mints a new code,
which invalidates the old one. That is deliberate: a glance at somebody's screen
should be worth nothing an hour later.

Which is also why save() no longer redirects. Sending the operator to the host
detail page sends them away from the only value they need, and an existing test
asserted that redirect — it now asserts the opposite, with the reason written
next to it.

SHA-256 rather than bcrypt for the code, and the reason is not speed. Both
endpoints have to FIND the host by the code; with bcrypt that means trying every
row. The code is 32 characters of CSPRNG output, so it has the entropy that
stretching exists to manufacture.

resolve() and claim() are separate because progress reports arrive BEFORE
registration. If reporting consumed the code, a host could never register after
its first message.

The archive URL is always the public hostname. The console runs under admin.…,
but this line executes on a machine that must not reach the admin area — it is
locked down for exactly that reason — so route() from the console would emit a
hostname that 404s on a server only reachable through the provider's console.

The page warns about missing tunnel settings BEFORE the host is created, not
after. An empty hub key produces a line that looks clean, copies fine, runs, and
ends in a tunnel that never handshakes — discovered on the machine, after
somebody has already paid for it.

The three steps lead with the rescue system, because that is the one nobody
knows by heart, and it says enabling is not the same as booting into it — the
script refuses a running production machine, which is what a half-done switch
looks like from the inside.

1986 tests pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-30 20:40:19 +02:00
..
Admin Give the operator one line to copy and three steps around it 2026-07-30 20:40:19 +02:00
Auth Discard an unconfirmed registration, and sweep the abandoned ones 2026-07-30 14:08:02 +02:00
Concerns Close the domain page to packages that may not have one 2026-07-29 16:20:21 +02:00
Backups.php Show times on the operator's clock, keep storing them in UTC 2026-07-27 17:32:21 +02:00
Billing.php Merge main into the operating-mode branch 2026-07-30 17:53:20 +02:00
Checkout.php Give the order a checkout page, and stop hiding what a year costs 2026-07-30 16:00:08 +02:00
Cloud.php Deliver the storage a customer actually buys 2026-07-29 19:13:10 +02:00
ConfirmBookStorage.php Deliver the storage a customer actually buys 2026-07-29 19:13:10 +02:00
ConfirmCancelAddon.php Ask whether they are a consumer, and let one change their mind 2026-07-29 21:06:06 +02:00
ConfirmCancelPackage.php Take the address by field, fix the customer type, ask why they leave 2026-07-30 16:41:32 +02:00
ConfirmCloseAccount.php fix(portal): no silent no-ops without a customer; maintenance visible per instance; maintenance form redesign 2026-07-25 19:10:44 +02:00
ConfirmDeleteOwnAccount.php Discard an unconfirmed registration, and sweep the abandoned ones 2026-07-30 14:08:02 +02:00
ConfirmDisableTwoFactor.php Replace native confirm() dialogs with the app's own modal pattern 2026-07-28 19:34:27 +02:00
ConfirmEndOtherSessions.php Show where an account is signed in, and let it sign the other places out 2026-07-28 23:38:17 +02:00
ConfirmRemoveOrder.php Book a downgrade for a date that cannot move, and sell a module once 2026-07-29 17:51:37 +02:00
ConfirmRestartCloud.php Restart a machine, enforce the quota that was sold, end a route that ended 2026-07-29 18:28:28 +02:00
ConfirmRevokeSeat.php Replace native confirm() dialogs with the app's own modal pattern 2026-07-28 19:34:27 +02:00
ConfirmWithdraw.php Charge the price the website shows, and hand a withdrawal back in full 2026-07-29 22:42:02 +02:00
CustomDomain.php Serve the custom domain, not just announce it 2026-07-29 16:44:52 +02:00
CustomerProvisioning.php Take the order, park it, and say when it will be delivered 2026-07-29 18:50:46 +02:00
Dashboard.php Prove a custom domain before serving it, and keep proving it 2026-07-29 14:47:51 +02:00
EditMailbox.php Merge credentials and infrastructure into one Integrations page 2026-07-29 01:49:39 +02:00
EditSeat.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.php Say the same thing to the customer, the register and the bank 2026-07-30 01:30:24 +02:00
NewSupportRequest.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
Order.php Sell the year as well as the month, and say what it saves 2026-07-30 15:44:35 +02:00
Sessions.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.php Deliver the processing agreement, and hold the proof it was accepted 2026-07-30 16:56:57 +02:00
Support.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.php Replace native confirm() dialogs with the app's own modal pattern 2026-07-28 19:34:27 +02:00