Repository navigation
#723 iPhone Duo support on iOS - #725
Merged
Merged
Conversation
Split by regular x regular size class and usable width instead of iPad idiom, so the opened iPhone Duo gets the split. The default divider sits in the fold, stays resizable with a fold detent, and locks to the fold in Book pose. OpenCodeTopBar draws Back and icon actions in the Duo trailing vertical bar like the system bar does. The open session and its view model carry across fold and unfold. Co-Authored-By: Claude Opus 5.5 <[email protected]>
CI builds with Xcode 26.6 (iOS 26.5 SDK). Gate the iOS 27.1 reserved-region and vertical-bar APIs behind canImport(SwiftUI, _version: 8.0.85), since #available alone does not compile against the older SDK, and keep the split gate property non-private so SettingsView keeps its memberwise initializer. Inset a horizontal leading control 20pt while the Duo vertical bar is active, as the system bar does, so it clears the inner display's rounded corner. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Collaborator
Author
|
@cursor review |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 138e749. Configure here.
Keep main's OverflowMenuPlacement API and add the iPhone Duo rail as a besideRailItem placement. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Leaving a chat now releases the screen's host lease instead of stopping the shared view model, so a fold/unfold hand-off cannot leave the other screen frozen. The vertical bar reads toolbarVerticalEdge from the environment synchronously instead of through an onAppear probe, so the rail is right on the first layout. The Duo 20pt leading inset now follows the vertical-bar context rather than the presence of rail items, so the empty-state toggle clears the corner too. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 18, 2026
Closed
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.

Implements most of #723. The iOS app now uses both iPhone Duo displays: the iPad split on the opened inner display with its divider in the fold, and Duo-style vertical bars in the trailing status rail.
What changed
idiom == .pad, because Duo reports.phonein every pose. It now splits when the window is regular × regular and has at least 681pt of usable width (a 280pt minimum sidebar, the divider, and a 400pt minimum detail).openCodeWindowMetrics(), shared by all five split screens.OpenCodeSplitPanereads the fold withreservedRegions(kind: .division, options: .includeInactive)(iOS 27.1). By default the sidebar ends at the fold (455pt), the divider widens to the 40pt fold gap, and the chat starts at the fold's trailing edge.followsFoldflag keeps a snapped divider tracking the fold, while a custom width stays custom. In Book pose the fold region is active, so the divider locks to the fold and the handle hides.OpenCodeTopBar: iOS never moves custom bars into the rail, so the top bar does it itself..trailing, the bar reaches the trailing safe area, and it sits at the window top, so a split's sidebar keeps its horizontal bar.HomeRoutes, bound to theNavigationStackthrough a type-erasedNavigationPath. A typed path binding trapped in SwiftUI (comparisonTypeMismatch) during the flip.SessionChatViewModel, so the draft and live subscription carry over.SessionChatHostLeasesstops the model only when the last host leaves.Verification
OpenCode MobileTestson the iOS 27.1 iPhone Duo simulator: 2159 Swift Testing tests in 215 suites passed, and 76 XCTest tests passed. New suites:HomeLayoutContinuityTests,OpenCodeVerticalBarLayoutTests, and new split-gate, fold and follow-fold cases inOpenCodeSplitPaneLayoutTests/SplitPanePreferencesTests.sdk 27.1), connected to a localopencode serve, and driven through every Device Hub pose. During that pass I fixed a rail inset bug (a reader that ignores the safe area reports no inset of its own) and the navigation-path crash on fold.Not done / known gaps
#if canImport(SwiftUI, _version: 8.0.85), so that build compiles but leaves them out (no fold detection, no rail). The split gate and continuity still apply. Builds are Duo-optimized only once the runner moves to Xcode 27.1.🤖 Generated with Claude Code
Note
Medium Risk
Touches core Home navigation, split persistence, and session chat lifecycle across layout transitions; Duo-specific APIs are SDK-gated so CI on older Xcode gets reduced behavior.
Overview
Adds iPhone Duo layout support on iOS: wide inner display gets iPad-style splits, a fold-aligned sidebar divider, and custom top-bar actions in the trailing vertical rail.
Split layout gate no longer requires iPad idiom (Duo reports
.phone). Screens split when the window is regular × regular and usable width ≥ 681pt, via rootopenCodeWindowMetrics()andOpenCodeSplitLayoutGateon Home, Settings, Changes, Files, and Terminals.Fold-aware split pane reads iOS 27.1
reservedRegionsdivisions, widens the divider in the hinge gap, snaps within 24pt, and persistsfollowsFold. Book pose locks the divider and disables drag.OpenCodeTopBarmoves Back/Close and icon actions into the Duo vertical rail (OpenCodeTopBarVerticalBarLayer); overflow menus anchor beside the rail item. Gallery/preview simulation added.Home fold ↔ unfold continuity: typed
HomeRoutestack, sharedSessionChatViewModelwithSessionChatHostLeases, andHomeLayoutContinuityso the open chat survives layout flips without losing draft/subscription.Reviewed by Cursor Bugbot for commit 138e749. Bugbot is set up for automated code reviews on this repo. Configure here.