Skip to content

fix: focus booted iOS simulators with Device Hub#750

Merged
thymikee merged 3 commits into
mainfrom
codex/prefer-device-hub-simulator-focus
Jun 10, 2026
Merged

fix: focus booted iOS simulators with Device Hub#750
thymikee merged 3 commits into
mainfrom
codex/prefer-device-hub-simulator-focus

Conversation

@thiagobrez

@thiagobrez thiagobrez commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Prefer Xcode 27 Device Hub when surfacing a newly booted iOS simulator, while keeping Simulator as the fallback for older Xcode installs. When a simulator is already booted but its host UI was quit, daemon readiness now opens standalone Simulator so the booted device is visible instead of remaining hidden in the background.

Copilot AI review requested due to automatic review settings June 10, 2026 14:26
@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 1.2 MB 1.2 MB +749 B
JS gzip 385.4 kB 385.6 kB +269 B
npm tarball 497.3 kB 497.6 kB +273 B
npm unpacked 1.7 MB 1.7 MB +777 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 28.7 ms 27.1 ms -1.6 ms
CLI --help 44.1 ms 42.2 ms -1.9 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/2415.js +311 B +107 B
dist/src/1352.js +220 B +71 B
dist/src/8173.js +109 B +56 B
dist/src/session.js +57 B +25 B
dist/src/8699.js +52 B +10 B

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates iOS simulator “surfacing” behavior to prefer Xcode 27’s Device Hub when bringing up a newly booted simulator, while still falling back to the standalone Simulator app for older Xcode versions or when explicitly focusing an already-booted simulator.

Changes:

  • Add host-app selection + fallback logic when opening the iOS simulator UI (Device Hub → Simulator; or Simulator-only when focusing an existing booted device).
  • Update daemon simulator readiness to focus already-booted simulators so they’re visible even if the host UI was previously quit.
  • Refresh unit tests and ADR documentation to reflect the new Device Hub behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/platforms/ios/simulator.ts Adds Device Hub-first focusing and a “focus existing” path that opens standalone Simulator for already-booted devices.
src/platforms/ios/tests/index.test.ts Updates/extends tests for Device Hub fallback and the new “focus existing” behavior.
src/daemon/device-ready.ts Calls ensureBootedSimulator(..., { focusExisting: true }) for iOS simulators during readiness checks.
src/daemon/tests/device-ready.test.ts Updates readiness test expectations for the new options argument.
docs/adr/0001-provider-first-integration-scenarios.md Documents that local-only simulator UI launch may use Device Hub or Simulator.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -924,7 +955,7 @@ test('screenshotIos retries simulator capture timeouts and eventually succeeds',
assert.equal(
logLines.filter((line) => line === '__OPEN__ -a Simulator').length,
@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-06-10 18:07 UTC

Copilot AI review requested due to automatic review settings June 10, 2026 18:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

@thymikee thymikee merged commit b2e4ace into main Jun 10, 2026
20 checks passed
@thymikee thymikee deleted the codex/prefer-device-hub-simulator-focus branch June 10, 2026 18:07
@thymikee

Copy link
Copy Markdown
Member

Thank you!

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.

3 participants