Skip to content

remote: reconnect desktop sessions after transport loss - #7338

Draft
lukasa1993 wants to merge 31 commits into
simplex-chat:masterfrom
lukasa1993:ios-desktop-background-ios27
Draft

remote: reconnect desktop sessions after transport loss#7338
lukasa1993 wants to merge 31 commits into
simplex-chat:masterfrom
lukasa1993:ios-desktop-background-ios27

Conversation

@lukasa1993

@lukasa1993 lukasa1993 commented Aug 3, 2026

Copy link
Copy Markdown

Summary

  • keep the verified desktop listener and signed XRCP invitation active across transport loss
  • reconnect iOS with the exact saved invitation on Wi-Fi or Ethernet, without multicast discovery, reconstructed addresses, or fallback endpoints
  • correlate reconnect attempts and lifecycle events by session sequence, serialize macOS host selection, and synchronize explicit stop in both directions
  • show honest reconnecting state in the iOS sheet and Live Activity, and block macOS interaction with a full-window reconnect view and Disconnect action

Why

A temporary Wi-Fi or Airplane Mode interruption currently makes the remote desktop session terminal. iOS loses the active transport, macOS can retain stale UI state, and recovery requires another QR scan and manual verification.

The reconnect must reuse the verified pairing, reject stale events, and remain active until the user explicitly stops it.

Impact

The existing remote desktop session now recovers automatically during the same desktop process lifetime. Each restored connection uses fresh TLS and session keys. Desktop invitation private keys are not persisted across a desktop restart.

This branch also includes the background-session and iOS 27 compatibility work from #7234 and #7266.

Validation

  • git diff --check upstream/master...HEAD
  • remote tests without multicast discovery: 67 examples, 0 failures
  • full remote-filtered run passed the reconnect tests; the existing multicast-discovery case failed on the local certificate/discovery path
  • iPhone Debug build with rebuild-ios.sh --build-only
  • macOS distributable build and signature verification with rebuild-macos.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant