Skip to content

ios: keep the laptop deck filled when the keyboard is dismissed - #8222

Open
UTMapp-bot wants to merge 1 commit into
utmapp:mainfrom
UTMapp-bot:fix/issue-8220-laptop-keyboard
Open

UTMapp-bot wants to merge 1 commit into
utmapp:mainfrom
UTMapp-bot:fix/issue-8220-laptop-keyboard

Conversation

@UTMapp-bot

Copy link
Copy Markdown
Collaborator

On iPhone Duo folded like a laptop, the dismiss button in the key row dismissed the whole keyboard and left the bottom half of the screen empty. This keeps the deck filled at all times:

  • Dismiss (and a swipe down on the display) hides only the key row; the keyboard stays and the guest display takes the row's space. Modifiers toggled in the row are released, since no row is left to show them. A swipe up brings the row back.
  • The toolbar's keyboard button steps through what the deck can show: keyboard with key row → keyboard alone → touchpad → keyboard with key row. Its icon shows the next step (hide row, touchpad, keyboard). A keyboard the system took away is brought back first; a terminal window, which has no touchpad, keeps its keyboard.
  • Opening the device brings the keyboard back, always with its key row, when the deck showed a keyboard, and no keyboard when it showed the touchpad. A window saved while folded remembers the same.

Fixes #8220

Testing

Tested by an AI (Claude) on the iPhone Duo simulator, iOS 27.1 (Xcode 27.1, Device Hub) running in a macOS 27 VM, with a QEMU ARM VM without drives started in the simulator (its display stays black). Laptop mode is the Duo opened and rotated so the fold is horizontal.

Before (current main): folded, the deck shows the keyboard with the key row; pressing the row's dismiss button removes the keyboard and the bottom half is empty.

Folded Dismiss pressed
before folded before dismissed

After (this PR), toolbar keyboard button and dismiss button:

Folded Toolbar: keyboard alone Toolbar: touchpad Toolbar: keyboard + row Dismiss pressed

Opening and folding again:

Opened from keyboard alone Folded again (remembered) Toolbar: touchpad Opened from touchpad

Opened flat (outside the deck), the toolbar still shows the keyboard with its row and the dismiss button still hides it, as before.

Automated: ./scripts/test_utm.sh -s (217 tests, 0 failures), ./scripts/test_utm.sh -s iPad -only-testing:UTMUITests-iOS (7 tests, 0 failures), ./scripts/test_utm.sh on macOS (288 tests, 16 skipped: the VM lifecycle tests, which run only in the signed host; 0 failures). Builds for the iOS Simulator and the visionOS Simulator.

Not exercised: the swipe gestures on the display (Device Hub gives no swipe input), a hardware keyboard, a terminal window in the deck, and the modifier release on dismiss. Outside the deck the code paths are unchanged, so other devices were not re-screenshotted.

On iPhone Duo folded like a laptop, the dismiss button in the key row
dismissed the whole keyboard and left the bottom half empty. In the deck
it now hides only the key row, which gives its space to the guest
display, and releases the modifiers toggled in it. A swipe down on the
display does the same, and a swipe up brings the row back.

The toolbar's keyboard button steps through the three things the deck
can show: the keyboard with the key row, the keyboard alone and the
touchpad. Its icon shows the next step. A keyboard the system took away
is brought back first, and a terminal window, which has no touchpad,
keeps its keyboard.

Opening the device brings the keyboard back, with its key row, when the
deck showed a keyboard, and leaves it away when the deck showed the
touchpad. That is also what a window saved while folded remembers.

Fixes utmapp#8220

Assisted-by: Claude:claude-opus-5-5
@osy

osy commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

The runner failed to run the tests. If the failure is not due to this change then make a new PR fixing it.

@UTMapp-bot

Copy link
Copy Markdown
Collaborator Author

The failure isn't caused by this PR, and I found nothing in the repository to fix, so I haven't opened a second PR yet.

What failed: only the macOS Test UTM job (log). The build finished and the test host was signed. Then xcodebuild crashed while launching the host, before any test ran:

DVTAssertions: ASSERTION FAILURE in IDEFrameworks/IDEFoundation/Execution/LaunchSystem/IDELaunchServicesLauncher.m:445
Details:  Assertion failed: childPID > 0
Method:   -_waitForChildExit:
** INTERNAL ERROR: childPID > 0 **
Assertion failure: ProductBuildVersion: 27A9275
... Abort trap: 6   ./scripts/test_utm.sh -r UTMTests.xcresult

Launch Services returned no process for the test host, so Xcode aborted. No test failed.

Why it isn't this change:

  • The PR touches only files under Platform/iOS/, which the macOS target doesn't build. The macOS build jobs in this run passed, and so did Test UTM (iOS Simulator).
  • Its base is 3d4b8d8c (current main, unchanged since Nov 18). That commit's own run passed this job (run 44272266487). The last ten macOS test jobs passed on macstadium-1 to -4, including macstadium-1, which failed here.
  • Here, the same suite on the same Xcode (27.1, 27A9275) and the same base passes: ./scripts/test_utm.sh ran 288 tests, skipped 16 (the VM lifecycle tests, which need the signed host) and had 0 failures.

What changed on the CI side: the passing runs had RUNNER_IMAGE: xcode-27. This run has RUNNER_IMAGE: macos-26, the workflow's fallback in .github/workflows/build.yml:34, so the RUNNER_IMAGE repository variable seems to have been removed or changed since Nov 18. The test job doesn't read that variable on self-hosted runners, so I can't say whether it matters. It may point to a change to the runners around then. Nothing else in the run's inputs differs.

Next step: re-run the failed job; this account can't. If it fails the same way again, it's a runner problem rather than a one-off. Then a small PR to scripts/test_utm.sh could retry xcodebuild test-without-building once when it aborts with this internal error before any test starts. I can open that if you want it, but it would only hide a runner that can't launch apps. If it keeps happening, the runner's GUI session and Launch Services need checking first.

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.

iPhone Duo: laptop mode keyboard hides when dismissed

2 participants