- Manager listener leak: add socket.io.off() for reconnect_attempt and reconnect_failed in cleanup — socket.disconnect() only tears down the socket, not the Manager listeners, causing them to accumulate on re-mounts. - reconnect_failed dead code: add reconnectionAttempts: 10 to io() config so the handler is actually reachable after exhausting retries. - connectionError flicker: remove setConnectionError from connect_error — reconnect_attempt fires immediately after and clears it anyway, causing the error overlay to flash on every retry cycle. Error now only appears via reconnect_failed once all attempts are exhausted. connect_error instead ensures setIsReconnecting(true) so the reconnecting overlay shows instead of the initial "Connecting to Draft" spinner. - Add comment to on/off/emit noting they are no-ops if called before the effect runs (socketRef.current === null). https://claude.ai/code/session_016tCZVFjSeHdQsdKktbDHEt |
||
|---|---|---|
| .. | ||
| components | ||
| contexts | ||
| hooks | ||
| lib | ||
| models | ||
| routes | ||
| services | ||
| test | ||
| types | ||
| utils | ||
| welcome | ||
| app.css | ||
| root.tsx | ||
| routes.ts | ||