fix(mobile): harden reconnect verification edges

This commit is contained in:
Brennan Benson
2026-07-31 12:40:40 -07:00
parent 911e938025
commit 6637c8d179
22 changed files with 149 additions and 35 deletions
@@ -5,6 +5,7 @@ import { colors, radii, spacing, typography } from '../theme/mobile-theme'
import type { ConnectionState, RpcSuccess } from '../transport/types'
import type { RpcClient } from '../transport/rpc-client'
import { useForceReconnect } from '../transport/client-context'
import { showForceReconnectError } from '../transport/force-reconnect-feedback'
import {
fetchMobileGitHistory,
mapMobileCommitRows,
@@ -89,7 +90,7 @@ export const MobileGitHistoryList = memo(function MobileGitHistoryList({
// MobileSourceControlPanel / issue #5049). The load effect re-runs via
// connState once the fresh client connects.
if (connState !== 'connected' && hostId) {
void forceReconnect(hostId)
void forceReconnect(hostId).catch(showForceReconnectError)
return
}
setReloadNonce((n) => n + 1)
@@ -16,6 +16,7 @@ import type { SourceControlHubTab } from './mobile-source-control-hub-tab'
import { buildMobilePrChipSummary, countUnresolvedReviewThreads } from './mobile-pr-chip-summary'
import { isMobileConflictAborting } from './mobile-source-control-conflict-abort'
import { useMobilePrSidebarController } from '../session/use-mobile-pr-sidebar-controller'
import { showForceReconnectError } from '../transport/force-reconnect-feedback'
import { prSidebarDetailsNeedFetch } from '../session/mobile-pr-sidebar-state'
import { MobilePrViewPanelBody } from '../components/pr-sidebar/MobilePrViewPanel'
import { openMobilePrUrl } from '../components/MobilePrComposeSheet'
@@ -254,7 +255,7 @@ export function MobileSourceControlPanel({
onPress={() => {
// Why: a parked reconnect loop makes retry useless — revive the connection instead (issue #5049); loadStatus re-runs on reconnect.
if (connState !== 'connected' && hostId) {
void forceReconnect(hostId)
void forceReconnect(hostId).catch(showForceReconnectError)
return
}
void loadStatus()