Improve Core reconnect feedback
Summary
- replace floating reconnect indicator with graduated, layout-integrated Core status feedback
- distinguish confirmed network outages and preserve cached device metadata during reconnects
- add accessible recovery announcements, regression coverage, and translations for every supported locale
Summary by cubic
Integrates an in-layout ConnectionStatusBar that replaces the floating reconnect pill and provides timed, prioritized feedback for connects, reconnects, Core outages, and offline network. Previously a floating “Connecting…/Reconnecting…” pill was always shown; now sub‑second reconnects stay hidden, prolonged issues escalate, and Home/Settings rely on contextual cards.
-
Behavior and timing: reveal after 1s; escalate to “Core unavailable” after 10s; prioritize “No network connection”; announce “Connected to Core” for 3s only if a visible issue was shown before; clear the recovery notice if the connection drops again or pairing becomes required; suppress recovery for hidden quick reconnects.
-
State handling: track browser
navigator.onLineand native@capacitor/networkto setnetworkAvailable, start/clear timing viabeginConnectionIssue/clearConnectionIssue, and immediately reconnect when online; suppress generic status when pairing is required or the Core encryption version is unsupported. -
Data retention: keep cached Core version/platform and client capabilities during same‑device reconnect refresh failures; on device switch, clear prior‑device metadata if the refresh fails; keep inbox messages/modal open until a reconnect refresh replaces them.
-
Implementation: add
useConnectionPresentationto drive presentation; renderConnectionStatusBaraboveBottomNavwith safe‑area padding and a Settings link when unavailable; include a screen‑reader‑only live announcement on all routes and hide the visual bar on Home/Settings; update docs, tests, and translations to useconnection.connectingToCore,connection.reconnectingToCore,connection.coreUnavailable,connection.networkUnavailable, andconnection.restored. -
Migration
- Remove any usages of
ReconnectingIndicatorand rely onConnectionStatusBaror contextual cards. - Update string keys to the new
connection.*ToCoreand availability keys.
- Remove any usages of
Summary by CodeRabbit
-
New Features
- Added contextual connection status banners for connecting, reconnecting, service unavailability, network loss, and restored connectivity.
- Added a Settings link when connection issues require attention.
- Improved connection messaging across Home and Settings, with brief restored-status feedback.
- Added localized connection-status messages across supported languages.
-
Bug Fixes
- Improved reconnection behavior and network-state detection.
- Preserved available connection details during temporary refresh failures.
- Respect reduced-motion preferences for connection indicators.