Stand down when the portal revokes this instance

The connector treats close code 4410 from the hub as final: it stops
dialling, keeps cloud.json so a new claim code replaces it, and reports
revoked in /cloud/status, which Settings → Remote access shows as Removed
at the portal. Enrolling again, or a restart, brings the link back. An
older hub still answers 403 and the link keeps retrying as before.
This commit is contained in:
2026-10-15 10:30:38 +02:00
parent 21cfed7d39
commit dd50d7a16a
5 changed files with 112 additions and 11 deletions
@@ -36,6 +36,7 @@ type CloudStatus = {
instance_id: string | null
last_error: string | null
connected_since: number | null
revoked: boolean
}
/**
@@ -167,11 +168,20 @@ export function RemoteAccess() {
<div className="flex flex-col gap-4">
<dl className="grid gap-3 sm:grid-cols-2">
<Field label="Status">
{status.connected
? "Connected"
: status.last_error
? `Reconnecting — ${status.last_error}`
: "Reconnecting…"}
{status.connected ? (
"Connected"
) : status.revoked ? (
<>
Removed at the portal
<span className="mt-1 block text-xs text-muted-foreground">
Connect with a new code to restore remote access.
</span>
</>
) : status.last_error ? (
`Reconnecting — ${status.last_error}`
) : (
"Reconnecting…"
)}
</Field>
<Field label="Portal">{status.portal_url ?? "—"}</Field>
<Field label="Acting as">