You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A failed simctl list devicetypes read marks a foldable simulator non-foldable until the tool-server restarts #1532
[Diplomat, Opus 5.5]: isFoldableDeviceType (packages/tool-server/src/utils/ios-devices.ts:259-267) caches false for a device type whenever deviceTypeBundlePath returns nothing. That also happens when the listing failed: listDeviceTypeBundlePaths turns a timeout or error into an empty Map, the re-read-on-miss gets the same empty result, and false is memoized. The listing then writes false into foldableCache for every simulator of that type. Nothing re-checks once simctl recovers.
Impact: if the first listing after tool-server start runs while simctl list devicetypes hangs or fails, an iPhone Duo is never reported as foldable: true for the rest of the run. The foldable handling in simulator-server, screenshot-diff and screen recording also treats it as single-panel. This affects plain simulator rows on main, and, with #1490, provider-lent rows too.
Repro
I used an xcrun shim whose simctl list devicetypes --json hangs past its 10 s timeout until a marker file exists, and serves a Duo type with two integrated displays after that. The run called list-devices (an esbuild bundle of listDevicesTool) 3 times and created the marker after call 1.
Control, healthy from the start: call 1 has foldable: true on the Duo row.
Transient: call 1 took 20046 ms with no foldable. Calls 2 and 3 took 49 and 40 ms, still with no foldable. The shim log shows no further devicetypes call after call 1.
Activity