perf(apple): read a single-panel simulator's rotation beside its screenshot
Summary
A single-panel iOS simulator screenshot waited for the display-inventory read before simctl io screenshot, though that read only supplies displayRotation there. Once a resolved table shows one panel, the read now runs beside the capture with a 2 s budget and a 250 ms grace after the image, as on Android. A late read is aborted and displayRotation is absent, as the help documents. Multi-panel and unknown devices keep the read before capture, so a folded Duo still names its lit panel (#2703). Only the panel count is kept, now owned by display-inventory.ts. Scoped sets use the same read through the guest helper. 11 files. ADR 0025 is amended.
Diagnostics: a canceled panel table read, including a rotation read that misses its grace, reports apple_display_inventory_unresolved with reason probe-canceled. A read beside the capture that names a panel emits apple_display_single_panel_count_stale.
Validation
Timed at 38ae500cde (later heads change tests, docs and diagnostics only) against base b3c1a3c8ab, on the iPhone 18 Pro simulator. Arms were interleaved, n=40 each. The host 1-minute load average was 317β395.
daemon durationMs | base | branch |
|---|---|---|
| p50 | 1197 | 958 (β239) |
| p95 | 2110 | 2880 (load spikes; an earlier run gave 3476 β 2788) |
The probe alone takes a median of ~180 ms.
- Rotation, Safari: 24/24 shots reported a
displayRotationthat matched the image shape. - iPhone Duo, 5 fold cycles: 0 of 20 PNGs were black, and every capture had the lit panel's size.
- Focused vitest suites, lint and typecheck pass. CI owns
check:affected.
π€ Generated with Claude Code