-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
iOS: harden multi-Mac host switcher (session-drop, scoping, layering) #5545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
34b0fc0
8b9da81
fea2abc
bf35664
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,9 +61,13 @@ struct MobileHostPickerView: View { | |
| MobilePairingScannerSheet { code in | ||
| showingScanner = false | ||
| Task { | ||
| _ = await store.connectPairingURL(code) | ||
| await store.loadPairedMacs() | ||
| dismiss() | ||
| // Pair without dropping the current session on a bad scan: | ||
| // dismiss only when the new Mac actually connected. | ||
| if await store.pairAdditionalMac(code) { | ||
| dismiss() | ||
| } else { | ||
| await store.loadPairedMacs() | ||
| } | ||
| } | ||
| } | ||
|
Comment on lines
+61
to
+72
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Superseded pairing skips session reconnect
Medium Severity
A second “Pair Another Mac” attempt that supersedes an in-flight first scan can leave the user disconnected.
hadLiveConnectionis captured per call, so after the first attempt’s destructive connect clears the session the second may record no live session and skip reconnect on failure, while the superseded first attempt returns without running its.failedreconnect path.Additional Locations (1)
Packages/CmuxMobileShell/Sources/CmuxMobileShell/MobileShellComposite.swift#L698-L704Reviewed by Cursor Bugbot for commit bf35664. Configure here.