fix: dismiss offline screen after connection recovery - #34508
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
The hook is only imported by Risk assessment:
SmokeWalletPlatform is selected as it covers core wallet platform features and exercises the main navigation component where this hook is used. This provides a reasonable smoke test to verify the navigation behavior hasn't been broken. No other tags are needed as the change is isolated to connectivity/offline handling and doesn't touch transaction, account, swap, or other specialized flows. Performance Test Selection: |
|



Description
Automatically dismisses
OfflineModeViewwhen connectivity returns, but only when this hook previously presented that screen after the sustained-offline timeout.Stacked on #34507 because it was reproduced during the Android lifecycle proof. The two-file fix is generic and can be retargeted/cherry-picked independently.
Why
The app correctly navigated to
OfflineModeViewafter three seconds offline. On network restoration it trackedCONNECTION_RESTOREDbut never removed the screen, so the recovered Wallet Home and Perps order remained obscured until manual retry/navigation.Test scenarios
Validation
useConnectionHandler.test.ts: 7/7 pass.android-offline-mode-auto-recovery-before-v1failed the absent assertion; screenshot/video show the stale offline screen after network restoration.android-offline-mode-auto-recovery-after-v3passed 9/9; screenshot/video show Wallet Home automatically restored.Risk
The ref is set only after the hook's delayed navigation executes, so short outages and unrelated screens are never popped.