An independent gpt-5.6-sol review found that the restart overlay never
actually engaged in the normal flow — the feature was inert.
ChatView cleared the expectation on any render where the connection was
"connected". But the window is armed while the old server is still
connected (that is the point: the acknowledgement races its own
disconnect), so the store update triggered a render that destroyed the
window within milliseconds, long before the server went away. Both
re-arm points had the same problem. The user therefore still got the
outage banner and escalating backoff.
The window now tracks whether the restart's disconnect was actually
observed. A connected environment only ends the window once that has
happened; before it, "connected" just means the restart has not started
yet. Re-arming preserves an already-observed disconnect.
Also fixes the follow-on the same review found: because a rejected
restart can no longer be reported through the acknowledged RPC, the
update action could stay disabled for the full 12-minute safety window
with the mismatch unresolved. A settled restart window (disconnect seen,
window closed) now releases it so the user can retry immediately.
The restarting/settled decisions are pure exported predicates, since the
component test harness stubs useEffect and cannot exercise
effect-driven behavior. Both are tested, and both tests were confirmed
to fail against the old logic.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
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