Skip to content

perf: fast-path macos device resolution#525

Merged
thymikee merged 1 commit into
mainfrom
perf/macos-device-resolution
May 14, 2026
Merged

perf: fast-path macos device resolution#525
thymikee merged 1 commit into
mainfrom
perf/macos-device-resolution

Conversation

@thymikee
Copy link
Copy Markdown
Member

@thymikee thymikee commented May 14, 2026

Summary

Fast-path explicit macOS desktop device resolution.

Adds a macOS device-list helper, preserves selector validation on the fast path, and keeps simulator-set parity in the resolver call. Behavior note: explicit --platform macos / Apple desktop resolution now validates the host target directly instead of surfacing missing Apple mobile tooling errors from xcrun probes.

Validation

  • pnpm exec vitest run src/core/__tests__/dispatch-resolve.test.ts
  • pnpm check:fallow --base 6874af189dba6261efaff1f0463f6fada3372f1e
  • Stack head: pnpm check:quick
  • Stack head: pnpm check:unit

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 68bdb7d809

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/core/dispatch-resolve.ts Outdated
Comment on lines +167 to +170
if (shouldUseHostMacFastPath(selector)) {
return cacheResolvedTargetDevice(
cacheKey,
await resolveDevice([buildHostMacDevice()], selector),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve macOS host guard on non-Darwin

When --platform macos or --platform apple --target desktop is resolved on a Linux/Windows host, this fast path now returns a synthetic macOS device before reaching listAppleDevices, bypassing the existing process.platform !== 'darwin' UNSUPPORTED_PLATFORM check. That makes non-macOS environments believe the local host is a usable Mac and defers failure to later macOS-helper/runner calls with less accurate behavior; gate this fast path on process.platform === 'darwin' or keep the platform check in the macOS device builder.

Useful? React with 👍 / 👎.

@thymikee thymikee force-pushed the perf/macos-device-resolution branch from 68bdb7d to ae9ce13 Compare May 14, 2026 14:20
@thymikee thymikee force-pushed the refactor/runtime-collaborators branch 2 times, most recently from 500c922 to 48d6f25 Compare May 14, 2026 15:29
@thymikee thymikee force-pushed the perf/macos-device-resolution branch 2 times, most recently from 64c2c6f to 87b66d3 Compare May 14, 2026 15:59
@thymikee thymikee force-pushed the refactor/runtime-collaborators branch from 48d6f25 to 6874af1 Compare May 14, 2026 15:59
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 14, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://callstackincubator.github.io/agent-device/pr-preview/pr-525/

Built to branch gh-pages at 2026-05-14 16:18 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Base automatically changed from refactor/runtime-collaborators to main May 14, 2026 16:13
@thymikee thymikee force-pushed the perf/macos-device-resolution branch from 87b66d3 to 9db8993 Compare May 14, 2026 16:17
@thymikee thymikee merged commit 204a320 into main May 14, 2026
18 checks passed
@thymikee thymikee deleted the perf/macos-device-resolution branch May 14, 2026 16:25
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