Follow-ups from the #5049 audit plus CodeRabbit review:
- connection-revival-triggers.ts (new, via expo-network): nudge clients
on network restoration and Wi-Fi -> cellular handoffs, not just app
foregrounding; AppState wiring moved here from client-context.
- files/source-control screens: Retry now revives the parked transport
(forceReconnect) when disconnected instead of re-sending the request.
getWorktreeLabel deduped into src/session/worktree-label.ts.
- session header (review): accessibility role/label only while the
retry affordance is active.
- live harness (review): OS-assigned port instead of hardcoded 6799.
Co-authored-by: Orca <help@stably.ai>
The mobile rpc-client permanently stops retrying after 12 failed
attempts (~6.5 min of backoff) and nothing watched AppState, so after
Android backgrounding killed the link long enough the session sat in
'reconnecting' forever — the only recovery was reopening the app.
- rpc-client: add notifyForeground(); when connected, probe the link
immediately (half-open sockets reaped in <=8s instead of ~28s); when
reconnecting, clear any pending backoff, reset the attempt budget and
reconnect at once.
- client-context: nudge every live client on AppState 'active'; fix
useHostClient keeping a stale closed client after forceReconnect.
- session screen: make the status row tappable ("... — tap to retry")
once classifyConnection escalates, wired to forceReconnect.
- tests: deterministic fake-timer repro of the parked loop plus
regression coverage; opt-in live harness (real sockets, real E2EE)
via ORCA_MOBILE_LIVE_REPRO[_FULL].
Co-authored-by: Orca <help@stably.ai>
Fix Android terminal text overflow and stale foldable viewport handling.
- Pin terminal WebView textZoom so Android system font scale cannot inflate xterm glyphs past measured cells.
- Refit mobile terminal viewport on window dimension changes for fold/unfold, rotation, and split-screen.
- Harden viewport refit fallback handling for stale async runs and updateViewport responses.
Fixes#4579
Adds a focused React Doctor oxlint gate for high-signal state/effect rules, disables the noisy js-combine-iterations React Doctor rule, and refactors the mobile new-worktree modal away from prop-change state reset effects.
Bounds the mobile terminal WebView pre-ready write backlog, avoids Array.shift() in the embedded xterm write drain, disposes old xterm observers, and clears successful fallback timers.
Removed duplicate 'openclaude' entry at index 3 of MOBILE_TUI_AGENT_AUTO_PICK_ORDER so mobile pickers no longer render two OpenClaude rows or emit duplicate-key warnings.
Co-authored-by: orca-bug-scan-bot <orca-bug-scan-bot@stably.ai>
Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
* Move mobile browser refs out of effects
* Use layout effect for mobile browser ref mirrors
Co-authored-by: Orca <help@stably.ai>
---------
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>