Repository navigation
fix(mobile): stop calling a host Disconnected while a dial is in progress - #36802
Merged
Merged
Conversation
nwparker
force-pushed
the
nwparker/mobile-compressed-frames
branch
from
October 31, 2026 23:57
e63caec to
8242c40
Compare
nwparker
force-pushed
the
nwparker/mobile-connecting-labels
branch
from
October 31, 2026 23:58
b1fda81 to
13ef95b
Compare
nwparker
changed the base branch from
nwparker/mobile-compressed-frames
to
nwparker/mobile-bridge-connection-snapshot
October 31, 2026 23:58
nwparker
force-pushed
the
nwparker/mobile-bridge-connection-snapshot
branch
from
November 1, 2026 00:29
f9bcebc to
e04caaf
Compare
nwparker
force-pushed
the
nwparker/mobile-connecting-labels
branch
from
November 1, 2026 00:29
13ef95b to
88feaf8
Compare
nwparker
force-pushed
the
nwparker/mobile-bridge-connection-snapshot
branch
from
November 1, 2026 00:54
e04caaf to
49524a4
Compare
nwparker
force-pushed
the
nwparker/mobile-connecting-labels
branch
from
November 1, 2026 00:54
88feaf8 to
3d41286
Compare
nwparker
force-pushed
the
nwparker/mobile-bridge-connection-snapshot
branch
from
November 1, 2026 01:20
49524a4 to
b09e382
Compare
nwparker
force-pushed
the
nwparker/mobile-connecting-labels
branch
from
November 1, 2026 01:20
3d41286 to
318ced7
Compare
nwparker
force-pushed
the
nwparker/mobile-bridge-connection-snapshot
branch
from
November 1, 2026 01:52
b09e382 to
1e16e1f
Compare
nwparker
force-pushed
the
nwparker/mobile-connecting-labels
branch
from
November 1, 2026 01:52
318ced7 to
0c469a5
Compare
nwparker
force-pushed
the
nwparker/mobile-bridge-connection-snapshot
branch
from
November 1, 2026 02:02
1e16e1f to
038a239
Compare
nwparker
force-pushed
the
nwparker/mobile-connecting-labels
branch
from
November 1, 2026 02:02
0c469a5 to
5c83410
Compare
nwparker
force-pushed
the
nwparker/mobile-bridge-connection-snapshot
branch
from
November 1, 2026 02:16
038a239 to
f2379da
Compare
nwparker
force-pushed
the
nwparker/mobile-connecting-labels
branch
from
November 1, 2026 02:16
5c83410 to
87a9156
Compare
This was referenced Nov 1, 2026
nwparker
force-pushed
the
nwparker/mobile-bridge-connection-snapshot
branch
from
November 1, 2026 02:23
f2379da to
71a9680
Compare
nwparker
force-pushed
the
nwparker/mobile-connecting-labels
branch
from
November 1, 2026 02:23
87a9156 to
6d346e7
Compare
nwparker
changed the base branch from
nwparker/mobile-bridge-connection-snapshot
to
main
November 1, 2026 02:29
nwparker
force-pushed
the
nwparker/mobile-connecting-labels
branch
from
November 1, 2026 02:29
6d346e7 to
b4eba1e
Compare
…ress Two paths showed Disconnected while the phone was still connecting: - A relay dial started from idle (after a background suspend, or when no session was live) left the client disconnected until the relay hello, because the replacement session starts in connecting without announcing it. The migration now forwards the replacement's initial dial state. - The host screen page never learned which path the shell was dialing, so a direct dial that failed over to relay read as Reconnecting, then Can't connect and the unreachable empty list, while relay was still working. Bridge connection snapshots now carry the active and pending paths and the relay verdict, and the shell sends a connectionPath frame when only those change, so the page shows Connecting via Relay like the native screens. Path frames fire path listeners, never state listeners, so nothing on the page mistakes them for a reconnect. Mixed versions: the snapshot fields are optional, so older shells omit them and the page keeps its previous defaults. Pages announce connectionPathFrames in ready; older pages never receive the new frame.
nwparker
force-pushed
the
nwparker/mobile-connecting-labels
branch
from
November 1, 2026 02:31
b4eba1e to
f26add3
Compare
Contributor
Finishing Touches
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. |
10 of 11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
When you tap a desktop, the phone often tries a direct connection, then falls back to the relay. During that fallback the host screen said "Disconnected" (and eventually "Can't connect") even though it was still connecting. Now it says "Connecting via Relay…", like the native screens.
What Changed
disconnecteduntil the relay hello, which can be 12 s or more on a slow link. The relay session starts inconnectingwithout announcing it.forwardMigrationDialStatenow forwards the replacement's initial dial state. It's still a no-op while the logical client is connected or reconnecting.activePath,pendingPathandrelayHostReachability.connectionPathframe when only those change.subscribeHostStateandsubscribeAllHostsre-notify on path changes, as native host state does.Why
On a remote network the direct LAN dial times out (12 s connect deadline) and leaves the client
reconnectingwhile relay is still dialing. Native screens already label that "Connecting via Relay…", but the page couldn't see the pending path.Compatibility:
connectionPathFramesinready, so older pages never receive the new frame type.readyfield.Effect of the forwarder change on listeners
The new
connecting→ … →disconnectedsequence for a failed relay dial from idle (before, it silently stayeddisconnected) has no side effects:connected.Linked Issue
N/A (internal).
Visual Proof
Not captured for the relay case: reproducing it needs Orca Cloud relay with an unreachable direct endpoint. The label logic itself (
classifyConnectionfor a pending relay path) is unchanged; this PR only feeds it the inputs the page was missing.Testing
stable-logical-rpc-client.test.ts: a replacement that never announcesconnectingstill showsconnecting, and a failed narrated dial restoresdisconnected.bridge-host-init.test.ts: a page that reads path frames gets one on a path change, and an older page gets none.bridge-rpc-client-frames.test.ts:readydeclares the frame, and a path frame updates the getters without firing state listeners.Mobile
src/mobile-web-shell,src/transportand the bridge recording suites pass; the full mobile suite passes; mobiletypecheckandtypecheck:testspass.The bridge changes were exercised in the real iOS app against a desktop built from this stack. Pairing, the host screen, the session screen and terminal streaming all ran through the new bridge code without regressions.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Stack 5/5. Base: #36818 (pure module move).