Skip to content

Add Duo-only adaptive layouts while preserving other iPhone/iPad layouts - #123

Open
bradmb wants to merge 2 commits into
hugeBlack:mainfrom
bradmb:contribute/adaptive-layout
Open

bradmb wants to merge 2 commits into
hugeBlack:mainfrom
bradmb:contribute/adaptive-layout

Conversation

@bradmb

@bradmb bradmb commented Oct 26, 2026 •

Copy link
Copy Markdown

Summary

This PR adds support for the iPhone Duo's unique screen layout while keeping the existing experience unchanged for other iPhones and iPads.

Changes:

  • Added device detection specifically for the verified Duo hardware model (iPhone19,4), including simulator support. Other devices continue using their existing layouts, and the detection remains consistent when folding or rotating the device.
  • Updated Duo navigation to use native toolbars, adaptive columns for host selection, and a full-screen Settings view.
  • Added a checkmark-based Done button that can move into the vertical toolbar depending on the device's layout.
  • Improved streaming controls to keep them accessible and scrollable without overlapping unusable screen areas.
  • Updated the streaming layout to properly handle changes in screen dimensions and scaling while maintaining correct zoom and cursor positioning.
  • Added debouncing for resolution updates to avoid unnecessary changes while the screen is being resized.
  • Maintained compatibility with older iOS versions and compilers without changing the existing signing configuration, bundle identifiers, deployment targets, or SDK.

Tabletop / laptop mode

  • On supported Duo hardware with an active horizontal fold, keep the existing live streaming controller above the fold and place an embedded US-QWERTY desktop keyboard below it. Vertical/book folds and fully open layouts do not activate the keyboard.
  • Include numbers, punctuation, Esc, Tab, Enter, Backspace, Space, Shift/Ctrl/Alt/Windows-Command, and arrows. Use explicit key-down/key-up events, visible latched modifiers, and Backspace/arrow repeat.
  • Fit all 60 keys at the tested Duo pane width while maintaining 44-point touch targets; use scrolling for more constrained panes.
  • Put Enter/Exit Laptop Mode inside the Parsec menu instead of adding a separate floating control. Remember a full-screen opt-out for the current folded posture.
  • Prefer the left pane for Parsec and keyboard controls around vertical folds, while still avoiding camera occlusions.
  • Suppress the native software keyboard during tabletop mode, preserve hardware-keyboard input, isolate keyboard touches from stream gestures, and clear keys/repeat timers on interruptions, posture changes, and reconnects.

Validation

  • Release device build passed with Xcode 27.1 / iOS 27.1 SDK using command-line IPHONEOS_DEPLOYMENT_TARGET=15.0 and signing disabled. Xcode 27.1 no longer accepts iOS 14 targets; no deployment-target change was committed. The Xcode 26.3 build validates the unchanged iOS 14 target.
  • UIKit keyboard smoke test passed on an iPad simulator with a stubbed Parsec transport, checking all 60 keys, pane widths of 658/669/951 points, touch targets, balanced key events, Shift labels, interrupted modifier taps, accessibility activation, and repeat cancellation. Run with sh Tests/run-keyboard-smoke.sh <booted-simulator-udid> on an Apple Silicon Mac.
  • The combined sideload build was exercised on a physical Duo during development; the tester confirmed the final tabletop layout, menu toggle, and left-pane controls were working. This publication branch was separately built and tested after excluding connection-diagnostics changes.
  • Adaptive/tabletop regression tests passed all 77 assertions, covering screen geometry, Duo/non-Duo gating, fold posture, left-pane controls, modifier/key lifecycle, and repeat cleanup. Objective-C action-selector collision checks also pass.
  • Release device build passed using Xcode 26.3 and the iOS 26.2 SDK, maintaining the existing iOS 14 deployment target.
  • A combined development build was installed and tested on a physical Duo using Xcode 27.1. The adaptive layout was reported working, and I visually confirmed the full-screen Settings view and checkmark button in the side toolbar.
  • Compared the restored non-Duo layout, resizing, and cursor behavior against upstream to ensure those paths remain unchanged.
  • Project configuration, plist validation, and git diff --check all passed.

Notes

This is intentionally limited to the Duo rather than attempting to redesign the application for every iPhone and iPad. Additional Duo hardware identifiers can be added once they're verified.

While the existing non-Duo code paths have been reviewed and regression-tested, I have not physically tested the changes on ordinary iPhones or iPads. That testing would still be useful before merging.

The separate connection diagnostics PR is independent of this work, although both PRs modify some of the same files.

Existing localization build warnings are unrelated to these changes. No personal configuration, provisioning information, screenshots, or build artifacts are included.

Co-Authored-By: Warp agent@warp.dev

Gate native navigation, full-screen Settings, symbol-backed Done, stream controls and resize handling to verified Duo hardware. Preserve upstream non-Duo paths and deployment targets. Add geometry and device-gating regressions with older-SDK guards.

Co-Authored-By: Warp <agent@warp.dev>
@bradmb
bradmb marked this pull request as ready for review October 26, 2026 21:13
Keep the live stream above active horizontal folds and provide a fitted desktop keyboard below. Add menu-based laptop mode control, left-pane book controls, lifecycle cleanup, and geometry/UIKit regressions.

Co-Authored-By: Warp <agent@warp.dev>
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