mirror of
https://github.com/stablyai/orca.git
synced 2026-10-23 08:03:39 +00:00
fix(mobile): harden reconnect verification edges
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user