Three defects found by Macroscope and Cursor Bugbot:
- The restart window was armed only at click time, but an npm install can
consume most of the 10-minute request window, so a slow-but-successful
update restarted after the window had lapsed and was presented as an
outage. Re-arm from the acknowledgement and from the interrupt path,
matching what keepPendingForRestart already does for the button expiry.
- Effect.catch on the detached restart fiber only sees typed failures, so
an unexpected defect skipped the inFlight reset and left a live process
refusing every further update until restarted by other means. Release
the guard from Effect.onExit, outside the typed handler. Success still
deliberately keeps it set: systemd is about to stop the process and a
second update would race the handoff.
- "A server update is already in progress" is a typed failure, so it
cleared a restart overlay that the earlier still-pending update needed,
restoring the harsh reconnect UI mid-restart. That reason now lives in
contracts as SERVER_SELF_UPDATE_ALREADY_RUNNING_REASON with an
isAlreadyRunning helper, so the client can distinguish it structurally
instead of matching prose.
Each fix has a regression test; the defect-path test was confirmed to
fail without the onExit change.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Clicking "Update server" on a relay-connected server showed a spinner,
then a disconnected banner with a raw transport error, then hung until
the page was refreshed. Three separate causes:
1. The boot-service (systemd) update path ran `systemctl --user restart`
synchronously inside the RPC handler, so the process died before the
acknowledgement flushed. Every successful update reached the client as
an interrupt, which ServerUpdateAction released quietly — no success
toast, and nothing told the connection layer a restart was coming.
The restart is now deferred like the respawn path. Rollback and the
in-flight reset move onto the detached fiber and log instead of
failing the (already-acknowledged) RPC.
2. Reconnect backoff escalates to 16s, so the client was frequently
asleep exactly when the server came back; refreshing reset the
failure count, which is why refreshing "fixed" it. A restart-expected
overlay is now armed before dispatch and retries on a flat 2s cadence
while it is active, and only while the supervisor is sleeping in
backoff so a live attempt is never interrupted. It expires on its own
after 90s and is withdrawn on an explicit RPC failure, which proves
the server stayed up.
3. Two consecutive websocket-ticket failures evicted the cached DPoP
token, forcing a full relay bootstrap and token exchange during
reconnect. Eviction is now limited to failures suggesting a stale
endpoint; plain unreachability (network/timeout) — the shape of a
restart — keeps the token.
Also stops piping raw transport messages (which embed internal endpoint
URLs) into the composer banner: presentation maps each failure reason to
a stable summary and carries the reason for callers, while the raw
message remains on the supervisor state for diagnostics.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
- Restore light-mode glass, dialog, dropdown, and composer colors
- Refine provider wizard, changed-file cards, sidebar controls, and buttons
- Update wizard step tests for the new list structure