The opening effect's cancel guards were guarding nothing

Fixkamo-internal
Shipped
September 9, 2026 at 2:41 AM UTC
Author
Kamo
Commit
48df259

`cancelled` was declared, read seven times, and never assigned — the effect returned no cleanup — so every `if (!cancelled)` in the load that opens a window was dead. A fetch that resolved after the window closed applied anyway. Mostly that is wasted work on a component nobody can see. Two of the seven are not: `goToLobby` fires a SECOND request for a window that has gone, and the error path puts a message on a table the reader has already walked away from. Nothing warned about it. React 18 dropped the "state update on an unmounted component" warning, so the only tell was eslint asking why a variable that is never reassigned is not a `const` — which is how a concurrent session working next to it in the same file found it, having just fixed the identical shape in ChessTool. The refresh-on-focus effect below has the same class of in-flight write and is deliberately left alone: it removes its listeners correctly, its promises land in `applyTable`, which already refuses a frame older than the one on screen, and it re-runs often enough that a flag would need to be about superseding rather than about unmounting. Different problem, and not this one. Found by projects-f4.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing