Skip to content

[Bug]: Device panel shows the generic phone and no iPhone Duo fold controls for a renamed simulator #38226

Closed as not planned

Description

@Naiko

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web (Device panel), packages/client-runtime

Steps to reproduce

  1. Create an iPhone Duo simulator with any name other than exactly iPhone Duo, for example xcrun simctl create "my-feature iPhone Duo" com.apple.CoreSimulator.SimDeviceType.iPhone-Duo <iOS 27.2 iPhone19-4 runtime>, or rename an existing one with xcrun simctl rename <udid> "my-feature iPhone Duo".
  2. Boot it and open it in the Device panel.

Expected behavior

The panel shows the iPhone Duo model with its fold controls (Closed / Half / Open, Laptop and Tent stands) and pinch-to-fold, the same as for a simulator named iPhone Duo.

Actual behavior

The panel shows a 3D phone, but it is the generic one built from the screen size, not the iPhone Duo model, and there are no fold controls.

Confirmed by opening two simulators of the same device type and runtime side by side in the Device panel: the one named iPhone Duo shows the Duo model and its fold controls; the one with a prefix before iPhone Duo shows the generic phone and no fold controls.

From the code, other models with a dedicated 3D model are affected the same way: an iPhone 18 Pro simulator renamed to my-feature iPhone 18 Pro would get the generic phone instead of its own model.

The 3D model is chosen from the simulator's display name with exact regexes, in resolveDeviceModelId in packages/client-runtime/src/device/model.ts:

if (/^iPhone Duo$/i.test(name)) return "iphone-duo";
if (/^iPhone 18 Pro Max$/i.test(name)) return "iphone-18-pro-max";
if (/^iPhone 18 Pro$/i.test(name)) return "iphone-18-pro";
if (/^iPad Pro 13-inch \(M5\)$/i.test(name)) return "ipad-pro-13-m5";

When it returns null, the panel falls back to the generic 3D phone. DeviceStreamView.tsx only renders the Duo fold toolbar when the model resolves to iphone-duo, so any renamed Duo loses it. The hinge itself still works: agent-device fold open|closed on the same simulator folds it.

Impact

Minor bug or occasional failure

Version or commit

T3 Code (Beta) 0.1.9, expo-device-hub 0.22.1, agent-device 0.21.36. The code above is unchanged on main at 86534db.

Environment

macOS 27.2.1, Xcode 27.2, iPhone Duo simulator on runtime iOS 27.2 (iOS-27-2-iPhone19-4), local device host

Logs or stack traces

None. Nothing fails; the model lookup returns null.

Screenshots, recordings, or supporting files

—

Workaround

Rename the simulator to exactly iPhone Duo (xcrun simctl rename <udid> "iPhone Duo") and reopen it, or fold it from an agent with agent-device fold.

Notes

  • Renaming simulators is common when several are kept side by side, for example one per git worktree or branch, so their names carry a prefix.
  • A possible fix is to resolve the model from the CoreSimulator device type (com.apple.CoreSimulator.SimDeviceType.iPhone-Duo, …iPhone-18-Pro, and so on) instead of the name. expo-device-hub already reads deviceTypeIdentifier from simctl list devices --json (its appleDeviceFrame uses it), but its /api/devices response doesn't include it, so the type would need to be exposed there or looked up by the T3 server.

Activity

  1. changed the title [-][Bug]: Device panel shows no 3D model or iPhone Duo fold controls for a renamed simulator[/-] [+][Bug]: Device panel shows the generic phone and no iPhone Duo fold controls for a renamed simulator[/+] on Nov 17, 2026
  2. juliusmarminge commented on Nov 17, 2026

    @juliusmarminge
    Member

    I tried to reproduce this on the current build and could not.

    On origin/main 7338212 I added cases to packages/client-runtime/src/device/model.test.ts calling resolveDeviceModelId("ios", name). The control 'iPhone Duo' resolves to 'iphone-duo'. 'my-feature iPhone Duo', 'my-feature iPhone 18 Pro' and 'my-feature iPhone 18 Pro Max' return null; vp test run src/device/model.test.ts reports 3 failed, 5 passed. Not run in the live Device panel: it needs a local macOS device host with a renamed simulator, and the VM has neither. Pool simulators are shared, so I did not rename one.

    Closing as not planned. If it still happens for you, reply with the exact steps and the version you are on and it will be looked at again.

  3. Naiko commented on Nov 24, 2026

    @Naiko
    Author

    Thanks for looking into this. I think the test results reproduce the bug rather than rule it out: my-feature iPhone Duo, my-feature iPhone 18 Pro and my-feature iPhone 18 Pro Max returning null is the bug. A null model is what makes the Device panel fall back to the generic phone and hide the Duo fold controls. The control iPhone Duo resolving to iphone-duo is the one case that works today.

    It still happens on T3 Code (Beta) 0.1.11, the current version, and resolveDeviceModelId on main still matches the exact display names (the file hasn't changed since 86534db). The steps in the issue are exact: create or rename an iPhone Duo simulator to any name other than iPhone Duo, then open it in the Device panel.

    #27932 looks like the fix. It resolves the model from the simulator's hardware type through simctl, which is what this issue suggests. Could this be reopened and linked to that PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions