You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
Quavon-dev
committed
feat(monitors): pull-to-refresh revalidates the active Kuma connection
Pulling down on the Monitors tab now disconnects + reconnects the
Kuma socket and re-fetches the monitor list and heartbeats.
Implementation
- Wires the existing useKumaConnection() hook to a RefreshControl
on SafeScrollView (the wrapper already passes through ScrollView
props).
- handleRefresh() calls manager.revalidateActiveServer() — the same
method the background-fetch task uses — so the user-visible
behavior is identical: disconnect, reconnect, refetch monitor list
and heartbeats.
- Holds the spinner for a minimum 400 ms so it doesn't flash
imperceptibly fast on a LAN-connection Kuma instance.
- Re-entrancy guard: if a refresh is already in flight, subsequent
pull gestures are dropped instead of stacking.
- Errors are already surfaced by the existing connection-status
banner; the refresh handler swallows them silently.
iOS hint label
- RefreshControl's 'title' prop surfaces 'Pull to refresh' / 'Refreshing…'
under the spinner on iOS. Localized in all 5 locales.
i18n
- New keys: refresh.{title,refreshing} in en/de/fr/ja/es.
- Parity test still passes.
Quality gates
- npm run typecheck: 0 errors
- npm run lint: 0 errors (1 pre-existing warning, not from me)
- npm test: 283/283 passing
0 commit comments