Files
t3code/apps
Theo BrowneandClaude Opus 5 85b8a38455 fix: end the restart window when its restart has been seen through
Two more review findings, plus a self-correction.

Stale wentAwayRef (Macroscope): the ref persists for the component's
lifetime, so an outage from before the click satisfied the resolve
predicate on the next render and re-enabled the button mid-update,
allowing a second dispatch. Reset both refs when an attempt is armed so
only outages during that attempt count.

Unrelated outage shown as a restart (Bugbot): making the window
write-once-and-expire last round traded one bug for another — any
disconnect within 90s was dressed up as an intentional restart. The
window now ends once the environment has gone away and come back, i.e.
the restart it was armed for has been seen through. That is the narrow
version of what an earlier revision got wrong by ending it on any healthy
connection; the difference is requiring the disconnect first.

The observation is used only for the banner. The update action's release
path stays independent of it — coupling those is what produced the
earlier family of bugs where each consumer invalidated the other's
evidence.

Also removed a test committed in the previous change that passed with and
without its fix, so it verified nothing.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
2026-07-24 17:23:35 -07:00
..