Repository navigation
gterm: support iPhone Duo with size-class-driven layout - #45
Merged
Merged
Conversation
Pick the split-view workspace when the idiom is iPad or the window is regular in both size classes, which is the iPhone Duo's inner display; the outer display and Split View keep the phone tabs. Not regular width alone: Max-class iPhones are regular-width in landscape and must keep tabs. Clear the workspace utility sheet when folding so unfolding does not re-present it, and let only the surface's current host rebind its handlers while the layout swaps. Replace UIScreen.main with a displayScale helper that follows the display the view is on, and re-sync on display-scale trait changes. Tests: the UI runner takes --device-type and --only-testing; workspace tests skip on tab layouts and gate pointer events to iPad; new phone layout tests on an iPhone 17 Pro Max cover the regular-width landscape rule and, via a debug launch argument, the workspace branch on the phone idiom ahead of the iPhone Duo simulator. Document the rule and refresh the stale AGENTS.md testing notes. Claude-Session: https://claude.ai/code/session_011AGnzfZpK9Jvx13DcS97DZ
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.
Summary
Apple's iPhone Duo (ships Oct 23 with iOS 27.1) reports regular x regular size classes on its inner display while its idiom stays
.phone. gterm chose its layout purely by idiom, so an opened Duo would have shown the phone tab layout in a 669x951 pt window.RootView.usesWorkspace): split-view workspace when the idiom is.pador the window is regular in both size classes. NothorizontalSizeClass == .regularalone: Max-class iPhones are regular-width in landscape and must keep tabs. iPad behaviour is unchanged (the.padshort-circuit keeps narrow windows on the collapsing split view).onOpenURL/onKeyboardShortcutwhile the layout swaps.UIScreen.mainfallbacks withTerminalSurfaceView.displayScale(window scene screen, thentraitCollection.displayScale) and re-sync on display-scale trait changes.scripts/test-ipad-ui.pygains--device-typeand--only-testing; the workspace tests skip themselves on tab layouts and gate XCUITest pointer events to iPad; newPhoneLayoutTestsrun on an iPhone 17 Pro Max and cover the regular-width-landscape rule plus, via a DEBUG-only-gtermForceWorkspaceLayout YESlaunch argument, the workspace branch on the phone idiom (sidebar, sheet, SSH connect, Command-W).No
project.ymlchanges: orientations, device family, absentUIRequiresFullScreen, and the single scene are already right for the Duo.Verification
gtermTests: 107 tests, 0 failuresscripts/test-ipad-ui.py(iPad Pro 11-inch M5): 3 passed, 2 phone tests skippedscripts/test-ipad-ui.py --device-type "iPhone 17 Pro Max": 2 passed, 3 iPad tests skippedNot in this PR (needs Xcode 27.1, not yet released)
Building with the iOS 27.1 SDK for full edge-to-edge use of the inner display, verifying fold/unfold with a live session on the Duo simulator, and a fold XCUITest once the SDK exposes a fold control.
https://claude.ai/code/session_011AGnzfZpK9Jvx13DcS97DZ