Repository navigation
revert(mobile): hold the relay reconnect path and cache-first reconnect for a separate mobile pass - #19265
Conversation
|
📝 WalkthroughWalkthroughThe mobile session UI no longer persists or renders cached tab-strip previews. It renders live tabs directly and uses the standard loading state during reconnects. Relay sessions now publish Merge Risk: 🟡 Moderate · up to Some reconnecting sessions can appear blank instead of showing loading feedback, and rejected direct probes can duplicate disconnect processing. Resolve these before merge to avoid confusing reconnect behavior and transport side effects. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description explains the revert scope and rationale, but it does not use the required template sections or provide the required linked issue, visual proof statement, testing details, checklist status, and review notes. Resolution Complete the required template sections: ELI5, What Changed, Why, Linked Issue with a valid Fixes # reference, Visual Proof or N/A with a reason, Testing with manual and automated test details, AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist. Preserve the existing explanation of the reverted PRs and separate mobile review scope.
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: 855390fa-9859-4209-8a0f-18264b48b33f
📒 Files selected for processing (32)
mobile/src/cache/session-tab-strip-cache.test.tsmobile/src/cache/session-tab-strip-cache.tsmobile/src/session/MobileSessionActiveContent.tsxmobile/src/session/MobileSessionHeader.tsxmobile/src/session/mobile-session-frame-styles.tsmobile/src/session/mobile-session-reconnect-view-state.test.tsmobile/src/session/mobile-session-reconnect-view-state.tsmobile/src/session/mobile-session-route-parity.test.tsmobile/src/session/mobile-session-route-source-family.test-support.tsmobile/src/session/mobile-session-tab-strip-entries.tsmobile/src/session/use-mobile-session-controller.tsmobile/src/session/use-mobile-session-presentation.tsmobile/src/session/use-mobile-session-tab-strip-cache.tsmobile/src/transport/host-removal-lifecycle.test.tsmobile/src/transport/host-removal-lifecycle.tsmobile/src/transport/mobile-direct-return-probe.tsmobile/src/transport/mobile-endpoint-lifecycle.tsmobile/src/transport/mobile-endpoint-supervisor-contract.tsmobile/src/transport/mobile-endpoint-supervisor-direct-probe.test.tsmobile/src/transport/mobile-endpoint-supervisor-test-fakes.tsmobile/src/transport/mobile-endpoint-supervisor.test.tsmobile/src/transport/mobile-endpoint-supervisor.tsmobile/src/transport/mobile-relay-credential-rotation.tsmobile/src/transport/mobile-relay-rpc-session-liveness.test.tsmobile/src/transport/mobile-relay-rpc-session.test.tsmobile/src/transport/mobile-relay-rpc-session.tsmobile/src/transport/mobile-relay-runtime-failover.test.tsmobile/src/transport/mobile-relay-session-establisher.tsmobile/src/transport/relay-recovery-intent-queue.tsmobile/src/transport/rpc-session-liveness-watchdog.tsmobile/src/transport/unpaired-host-credential-deletion.test.tsmobile/src/transport/unpaired-host-credential-deletion.ts
💤 Files with no reviewable changes (18)
- mobile/src/transport/relay-recovery-intent-queue.ts
- mobile/src/transport/host-removal-lifecycle.ts
- mobile/src/session/mobile-session-frame-styles.ts
- mobile/src/transport/unpaired-host-credential-deletion.test.ts
- mobile/src/transport/mobile-relay-credential-rotation.ts
- mobile/src/transport/unpaired-host-credential-deletion.ts
- mobile/src/transport/mobile-endpoint-supervisor-test-fakes.ts
- mobile/src/transport/mobile-endpoint-supervisor.test.ts
- mobile/src/session/use-mobile-session-tab-strip-cache.ts
- mobile/src/session/mobile-session-reconnect-view-state.ts
- mobile/src/session/mobile-session-route-source-family.test-support.ts
- mobile/src/transport/mobile-endpoint-supervisor-direct-probe.test.ts
- mobile/src/cache/session-tab-strip-cache.ts
- mobile/src/transport/host-removal-lifecycle.test.ts
- mobile/src/cache/session-tab-strip-cache.test.ts
- mobile/src/session/mobile-session-reconnect-view-state.test.ts
- mobile/src/session/mobile-session-tab-strip-entries.ts
- mobile/src/transport/mobile-relay-runtime-failover.test.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review.
| <Text style={styles.emptyText}>{reconnectViewState.label}</Text> | ||
| </View> | ||
| ) : showLoadingState ? ( | ||
| return showLoadingState ? ( |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🤖 get_repo_knowledge executed:
get_repo_knowledge stablyai/orca /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/learnings /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/conventions
Length of output: 15546
🏁 Script executed:
#!/bin/bash
set -e
printf '%s\n' '--- changed file diff ---'
git diff -- mobile/src/session/MobileSessionActiveContent.tsx
printf '%s\n' '--- component ---'
cat -n mobile/src/session/MobileSessionActiveContent.tsx
printf '%s\n' '--- related symbols ---'
rg -n -S "MobileSessionActiveContent|showLoadingState|connState|reconnect|visibleTabs|tabsLoaded" mobile/src mobile --glob '*.{ts,tsx}' | head -250Repository: stablyai/orca
Length of output: 39426
🏁 Script executed:
#!/bin/bash
set -e
printf '%s\n' '--- session files ---'
fd -t f . mobile/src/session | sort
printf '%s\n' '--- controller state definitions and return ---'
rg -n -C 12 -S "showLoadingState|showEmptyState|activePendingTerminalTab|isPendingTerminalRecoveryParked|connState" mobile/src/session --glob '*.{ts,tsx}'
printf '%s\n' '--- connection state contract and client state transitions ---'
rg -n -C 8 -S "type ConnectionState|ConnectionState|reconnecting|handshaking|connecting|disconnected" mobile/src/transport mobile/src --glob '*.{ts,tsx}' | head -260Repository: stablyai/orca
Length of output: 50370
🏁 Script executed:
#!/bin/bash
set -e
printf '%s\n' '--- files defining the presentation flags ---'
rg -l -S "showLoadingState|showEmptyState" mobile/src/session --glob '*.{ts,tsx}' | sort
printf '%s\n' '--- exact flag definitions ---'
rg -n -B 20 -A 30 -S "showLoadingState|showEmptyState" mobile/src/session --glob '*.{ts,tsx}' | head -180
printf '%s\n' '--- connection type ---'
rg -n -B 5 -A 12 -S "export type ConnectionState|type ConnectionState" mobile/src/transport mobile/src --glob '*.ts' | head -80
printf '%s\n' '--- session controller composition ---'
rg -n -B 8 -A 16 -S "useMobileSessionController|MobileSessionController" mobile/src/session --glob '*.{ts,tsx}' | head -180Repository: stablyai/orca
Length of output: 34943
🏁 Script executed:
#!/bin/bash
set -e
printf '%s\n' '--- current and parent presentation component ---'
git show HEAD:mobile/src/session/MobileSessionActiveContent.tsx | sed -n '70,115p'
git show HEAD~1:mobile/src/session/MobileSessionActiveContent.tsx | sed -n '70,125p'
printf '%s\n' '--- presentation inputs and active-tab derivation ---'
rg -n -B 12 -A 35 -S "activeMarkdownTab|activeFileTab|activeBrowserTab|activePendingTerminalTab|visibleTabs|terminalsLoaded" mobile/src/session/use-mobile-session-screen-state.ts mobile/src/session/use-mobile-session-foundation.ts mobile/src/session --glob '*.{ts,tsx}' | head -260
printf '%s\n' '--- reconnect lifecycle around session tabs ---'
rg -n -B 12 -A 22 -S "connState !== 'connected'|connState === 'connected'|fetchSessionTabs|applySessionTabs|lastKnown|cached" mobile/src/session/use-mobile-session-tabs-reconciliation.ts mobile/src/session/use-mobile-session-tab-reconciliation.ts mobile/src/session/use-mobile-session-screen-state.ts mobile/src/session --glob '*.{ts,tsx}' | head -260Repository: stablyai/orca
Length of output: 50369
🏁 Script executed:
#!/bin/bash
set -e
printf '%s\n' '--- exact visible-tab and active-tab definitions ---'
rg -n -l -S "const visibleTabs|const activeMarkdownTab|activePendingTerminalTab|activeBrowserTab" mobile/src/session --glob '*.{ts,tsx}' | sort
for f in $(rg -l -S "const visibleTabs|const activeMarkdownTab|activePendingTerminalTab|activeBrowserTab" mobile/src/session --glob '*.{ts,tsx}' | sort); do
echo "--- $f"
rg -n -B 18 -A 28 -S "const visibleTabs|const activeMarkdownTab|activePendingTerminalTab|activeBrowserTab|activeFileTab" "$f"
done
printf '%s\n' '--- terminal frame fallback semantics ---'
sed -n '168,245p' mobile/src/session/MobileSessionActiveContent.tsxRepository: stablyai/orca
Length of output: 19837
Restore loading feedback during reconnect.
When connState is 'reconnecting' and no active tab or terminal exists, both showLoadingState and showEmptyState are false. The component then renders an empty terminalFrame with no loading indicator. Include the reconnecting, no-tabs case in the loading branch.
| // Both early returns leave the candidate to the finally, which owns it until | ||
| // migration takes over — closing here too would double-close it. | ||
| if (!this.hooks.hysteresis.recordDirectSuccess(this.deps.now())) { | ||
| successful.client.close() |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
Avoid the redundant close() call.
When hysteresis rejects a direct candidate, successful.client.close() runs before finally. The finally block calls close() again. DirectRpcClient.close() still publishes disconnected and rejects pending requests on the second call. Clear successful after the first call.
if (!this.hooks.hysteresis.recordDirectSuccess(this.deps.now())) {
successful.client.close()
+ successful = null
return
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| successful.client.close() | |
| successful.client.close() | |
| successful = null |
…ct for a separate mobile pass (stablyai#19265) * Revert "feat(mobile): draw the last known tab strip while a session reconnects (stablyai#19258)" This reverts commit 0ba7f8d. * Revert "perf(mobile): cut the relay reconnect critical path and admit dead sockets faster (stablyai#19236)" This reverts commit 23df74d.

Reverts #19258 and #19236. Both were merged as part of the relay connect-speed work; the owner wants mobile and desktop changes reviewed in a separate pass, and neither is a pure fix (#19236 is a reconnect-path perf change, #19258 is a cache-first reconnect feature).
The cloud-side changes (#19232, #19241) stay: they are additive and do not depend on either mobile change.
The original branches remain open for the mobile pass:
mobile/relay-connect-critical-pathandmobile/cache-first-reconnect.