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]>