- Reduce ping detection window from ~45s to ~15s (pingTimeout 5s, pingInterval 10s) - Listen to window offline/online events for instant UI feedback on network drop - Force immediate reconnect on online event instead of waiting for backoff - Fix stuck-reconnecting bug when network returns within ping timeout window - Wrap on/off/emit in useCallback to prevent listener re-registration every second - Expose reconnectCount to trigger revalidator.revalidate() after each reconnect - Reset hasConnectedOnce ref per socket instance to avoid spurious revalidations - Remove stale socket ref from hook return value; add emit helper instead Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| useDraftNotifications.ts | ||
| useDraftSocket.ts | ||
| useMediaQuery.ts | ||