brackt/app/hooks
Claude 2961c29374
Fix four issues from useDraftSocket code review
- 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
2026-02-25 17:34:12 +00:00
..
useDraftNotifications.ts Add browser push notifications toggle to draft page (#11) 2026-02-20 19:30:53 -08:00
useDraftSocket.ts Fix four issues from useDraftSocket code review 2026-02-25 17:34:12 +00:00
useMediaQuery.ts Make draft room fully usable on mobile (#30) 2026-02-22 22:36:12 -08:00