Support multiple simultaneous KVM connections on iPad#36
Merged
Conversation
Mirror the macOS multi-window model on iPad: a Connections scene plus a value-parameterized Viewer WindowGroup keyed on Device.ID, so devices run side-by-side under Stage Manager. A backgrounded viewer pauses its stream (disconnect) and auto-resumes (reconnect) on return, driven by the pure, unit-tested ScenePhasePausePolicy; .inactive is ignored so true side-by-side windows keep streaming. Also fix PhysicalKeyboardObserver to compile under Swift 6.3's stricter nonisolated-deinit rule. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Brings the macOS multi-window model to iPad: a Connections scene plus a value-parameterized Viewer
WindowGroupkeyed onDevice.ID, so two devices can run side-by-side under Stage Manager (UIApplicationSupportsMultipleScenes). A backgrounded viewer pauses its stream (disconnect) and auto-resumes (reconnect) on return, driven by the pure, unit-testedScenePhasePausePolicy;.inactiveis deliberately ignored so genuinely side-by-side windows keep streaming, and only sessions we paused are auto-resumed. No KVMCore changes were needed — the networking/session/video layers were already per-connection concurrency-safe. Also fixes a pre-existing compile error inPhysicalKeyboardObserver(nonisolated(unsafe)) so the iPad target builds under Swift 6.3's stricter nonisolated-deinit rule, and updatesCLAUDE.mdto document the new multi-window behavior.Verified: KVMCore 166, iPad 14 (incl. 5 new policy tests), macOS 8 — all passing.