Repository navigation
Add native iPhone and iPad Simulator panes - #7857
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Too many files changed for review. ( |
|
Important Review skippedToo many files! This PR contains 836 files, which is 536 over the limit of 300. To get a review, narrow the scope: Usage-priced reviews support at most 300 files. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (836)
You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests (beta)
|
056a980 to
63b4b57
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 63b4b57. Configure here.
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
1 similar comment
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
4 similar comments
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dcdd11f657
ℹ️ 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".
| return request("simulator.button", ["button": simulatorButtonName(value)]) | ||
| case "rotate": | ||
| guard let value = oneSimulatorValue(arguments) else { throw simulatorArgumentsError(subcommand) } | ||
| return request("simulator.rotate", ["orientation": value.replacingOccurrences(of: "-", with: "_")]) |
There was a problem hiding this comment.
Normalize rotate orientations before sending them
When users pass a mixed-case value—as the new CLI contract test does with Landscape-Left—this sends Landscape_Left, but TerminalController+ControlSimulatorOperations.swift resolves the value with the case-sensitive SimulatorOrientation(rawValue:), whose raw value is landscape_left. The fake socket test therefore succeeds while the real app rejects the request as an unknown orientation; lowercase the value or parse and serialize it through the shared orientation model.
AGENTS.md reference: AGENTS.md:L146-L150
Useful? React with 👍 / 👎.
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
|
Final merge evidence for
|
Adds native iPhone and iPad Simulator surfaces, modeled on serve-sim, without its browser server.
The pane streams the selected booted device, draws matching device chrome, forwards pointer, multitouch, keyboard, wheel, rotation, and hardware-button input, and persists the selected device. Its native tools cover apps, media, pasteboard, location routes, permissions, status and accessibility settings, Core Animation diagnostics, screenshots, video, logs, camera injection, foreground app details, accessibility inspection, and raw Web Inspector commands. CLI and control-socket entry points expose the same actions.
Private CoreSimulator, SimulatorKit, Indigo, HID, accessibility, camera, and Web Inspector calls run in a supervised child process. The worker converts frames into a permission-restricted BGRA shared-memory ring. The host validates and copies stable slots off-main, then gives Core Animation only immutable host-owned images. One crash restarts automatically, a second trips a fuse, and explicit recovery waits for a live stream. The serve-sim-derived camera injector retains its license and attribution.
Verification:
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Note
High Risk
Large new surface area spanning CLI, control socket, and simulator worker integration with many privileged operations (permissions, camera, Web Inspector); mitigated by extensive package tests and socket-worker isolation, but regressions could affect automation and pane creation flows.
Overview
Adds programmatic control of native iOS Simulator panes through new top-level
cmux simulatorandcmux ioscommands (split intoCMUXCLI+Simulator*modules) that route tosimulator.*v2 socket methods with--surfacetargeting, bounded stdin/file input, and human or JSON output.cmux iosforwards most simulator subcommands and addslist,context, andscreenshot(including--allviasimctl), resolving simulator panes throughsurface.list/simulator.context.The control socket gains a
ControlSimulatorContextseam and coordinator handlers for typing, gestures/taps/swipes, hardware buttons, rotation, camera, permissions, UI settings, accessibility, foreground app, recovery, and Web Inspector (targets/attach/send/highlight/release). Long-running work runs on the socket worker with receipt-based waits so the main actor is not blocked; execution policy registers the fullsimulator.*method set.Layout and UX hooks:
canvas.new_pane,new-pane, andnew-surfaceacceptsimulator; command palette getspanel.isSimulator; shortcuts addsimulatorFocus-scoped actions (home, rotate, appearance, software keyboard) with default bindings. CI runstest_cli_simulator_contract.py; sharedjsonStringmoves toCMUXCLI+JSONOutput.swift.Reviewed by Cursor Bugbot for commit 63b4b57. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Adds native iPhone/iPad Simulator panes with device chrome, floating controls, and an integrated toolset. Introduces
cmux simulator/cmux iosand v2simulator.*/simulator.web_inspector.*APIs with strict readiness, exact restore selection, cross‑worker Web Inspector leasing, and fail‑closed recovery that persists across restarts.New Features
canvas.new_pane type=simulator; panes persist device/runtime;surface.listaddssimulator_id,runtime_id,device_type_id,device_name,state; command palettepanel.isSimulator;simulatorFocusshortcuts (Home, rotate L/R, appearance, software keyboard) with priority routing and Settings UI captions.simulator.type; apps/media/pasteboard/permissions/Core Animation; screenshots/video/logs with bounded batch capture; camera inject with serialized cleanup/recovery; location routes with ownership/rollback; select integrated display and publish default‑screen metadata; Web Inspector targets/attach/send/highlight/release with cross‑worker leasing, occupancy handoff/refresh/timeout, and safe release.cmux simulatorand pane‑awarecmux ios list|context|screenshot --allwith--surfacetargeting (defaults to caller pane), bounded--stdin/--file, human/JSON output; v2 socket methods viaControlSimulatorContext; newCmuxSimulatorpackage with typedSimulatorControlServiceand a bounded command runner; CI runstest_cli_simulator_contract.py.Reliability and Limits
simulator.*set.Written for commit a2347c1. Summary will update on new commits.