Skip to content

Turn off the simulator hardware keyboard in the iPhone CI job - #160

Merged
BunsDev merged 8 commits into
mainfrom
ios-sim-keyboard
Oct 11, 2026
Merged

BunsDev merged 8 commits into
mainfrom
ios-sim-keyboard

Conversation

@BunsDev

@BunsDev BunsDev commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Why

With a hardware keyboard connected, the iOS simulator hides the software keyboard. When XCTest can't read a field's own focus, typeTextWhenReady falls back to checking app.keyboards.firstMatch.exists, which stays false when the simulator hides the software keyboard. Run 37831389640 failed at CompanionFlowTests.swift:45 with "The keyboard did not appear".

#153 found that failure's real cause: a tap landed while the sheet was still animating, and the helper now taps again until the field has focus. This PR is a safeguard on top of that, not the fix. The fixture network timeout in run 37983100896 at CompanionFlowTests.swift:169 was handled separately in #158.

What

  • .github/workflows/ci.yml: a new iPhone companion step sets defaults write com.apple.iphonesimulator ConnectHardwareKeyboard -bool false before the first xcodebuild boots the simulator, then reads the value back into the log. The step runs only in CI; Scripts/test-e2e.sh is unchanged, so local Simulator settings stay as they are.
  • docs/status.md: a note in Known rough edges.

Verification

  • Current signed head fa90a390 is based on merged Close half-open companion connections on shutdown #158 (c32f179). Its tree is unchanged from reviewed 9c5edd0: build and unit tests passed (469 passed, 1 skipped). Independent review verified the workflow exactly matches the original safeguard and both overlapping status explanations remain intact.
  • Both current-head iPhone jobs passed and logged hardware keyboard 0. Both required macOS jobs passed all 166 desktop and 7 site cases; all four current-head checks are green.
  • The workflow parses, and the new step sits between simulator selection and native unit tests. Local Simulator settings remain untouched.

BunsDev and others added 3 commits October 9, 2026 20:16
CompanionServer.close() destroyed only the sockets Node's
closeAllConnections() knows about, which are the ones that finished the
TLS handshake. A phone that opened a TCP connection but never sent its
ClientHello kept close() waiting for Node's 120 s handshake timeout. The
paused-Mac step of the iPhone CI flow answers /resume only after
dispose() returns, so on a slow simulator the UI test's 10 s wait expired
first (run 37983100896, main at #154). The runner's Session log showed its
wait ending on schedule, which placed the stall in the fixture.

Track every accepted socket per server and destroy them all in close().
A unit test holds a half-open connection and requires dispose() to return
promptly; it timed out at 5 s before the fix. Reproduced against the real
fixture with one half-open connection: no reply in 15 s before, 204 in
6 ms after.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
The commit's pull_request run passed the whole paired iPhone flow while
its push run (38012518622) failed at the first follow-up, before the
pause-and-resume step this change affects. The phone's log shows one
request hitting its 8 s timeout ten seconds before the send tap and no
later request failing. The fixture writes no log, so the status page now
says what is known and what to add first if it recurs.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
With a hardware keyboard connected the iOS simulator hides the software
keyboard, so app.keyboards stays empty after a field takes focus. That is
the fallback focus check in typeTextWhenReady. The iPhone companion job now
sets ConnectHardwareKeyboard to false before the first xcodebuild boots the
simulator. CI only; local Simulator settings are untouched.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@vercel

vercel Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
modex Ready Ready Preview Oct 11, 2026 8:43am UTC

Request Review

Main c32f179 has the exact tree of verified ancestor 958253f. The new merge retains the complete previously verified PR tree 67d8a52. Fresh hosted checks remain required.
@BunsDev
BunsDev merged commit 4925488 into main Oct 11, 2026
5 checks passed
@BunsDev
BunsDev deleted the ios-sim-keyboard branch October 11, 2026 23:43

This branch was successfully deployed

1 active deployment
Preview — fa90a390 Deployed Oct 11, 2026 by vercel[bot]
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