Skip to content

perf(apple): read a single-panel simulator's rotation beside its screenshot - #4604

Open
thymikee wants to merge 6 commits into
mainfrom
t3/parallel-ios-display-probe
Open

thymikee wants to merge 6 commits into
mainfrom
t3/parallel-ios-display-probe

Conversation

@thymikee

@thymikee thymikee commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

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 displayRotation that 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

thymikee and others added 2 commits November 16, 2026 17:49
…enshot

A simulator whose panel table already resolved to one integrated panel never
names a display, so its per-capture panel table read only supplies the
display rotation. Start that read beside simctl io screenshot and attach its
rotation within a 250 ms grace after the image is written; a later read is
aborted and the rotation is absent, as the screenshot contract already states.
Multi-panel and unknown devices keep the sequential read, so a folded device
still names its lit panel.

The resolved panel count moves from the foldable rotation module into the
display inventory, which records it on every resolved read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A read beside a single-panel capture that resolves a named panel now emits
apple_display_single_panel_count_stale. ADR 0025 records that only the panel
count is kept and that a single-panel table read runs beside the capture.
The runner-fallback inventory tests pin the sequential path explicitly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 6.32 MB 6.32 MB +1.3 kB
Package (unpacked) 6.32 MB 6.32 MB +1.3 kB
Package (download) 1.92 MB 1.92 MB +420 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 41.6 ms 43.0 ms +1.3 ms
CLI --help 85.9 ms 85.7 ms -0.2 ms

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 10 files

You’re at about 97% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread docs/adr/0025-foldable-apple-panels.md Resolved
Comment thread docs/adr/0025-foldable-apple-panels.md Resolved
@apex-sentinel-staging

apex-sentinel-staging Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve

Since the last review: 0 new · 0 still open · 1 no longer raised (1 marked fixed)

No open findings.

Reviewed with this repository's own Sentinel configuration (cb335952017e).

💬 Talking to Sentinel

In a finding's thread, reply with:

Command What it does
@apex-sentinel-staging note <context> Adds context; Sentinel re-checks the cited code
@apex-sentinel-staging pivot <why> Says the finding is wrong; Sentinel re-checks the cited code
@apex-sentinel-staging like Marks the finding as useful
@apex-sentinel-staging dislike <why> Marks it as not useful, so it is not raised again

On this conversation, comment @apex-sentinel-staging review to run a full review once again.

Earlier reviews

Review of 5cd98288 · 16.11.2026 17:30 UTC

Apex Sentinel · ✅ Approve

Since the last review: 1 new · 0 still open · 1 no longer raised (1 marked fixed)

1 finding(s): 1 minor.

🟡 Minor (1)

Where Finding
packages/platform-apple/src/core/screenshot.ts:283 🆕 Stale single-panel count goes unreported when the beside-capture read cannot identify a panel

Reviewed with this repository's own Sentinel configuration (cb335952017e).

Review of 38ae500c · 16.11.2026 17:17 UTC

Apex Sentinel · ✅ Approve

1 finding(s): 1 minor.

🟡 Minor (1)

Where Finding
packages/platform-apple/src/core/display-inventory.ts:137 Suppressed unresolved diagnostic still leaves hints that tell the operator to read it

Reviewed with this repository's own Sentinel configuration (b3c1a3c8abd9).

@apex-sentinel-staging apex-sentinel-staging Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Apex Sentinel: 1 new finding on 38ae500. The verdict and the full list are in the summary comment.

thymikee and others added 3 commits November 16, 2026 18:18
…verdict cache

The rotation read test now asserts the 2 s budget and drives the 250 ms grace
with fake timers. ADR 0025 states that a stale single-panel verdict sends one
capture without --display, and that the resolved read replaces the verdict so
the next capture names the lit panel. The cache is described as a multi-panel
verdict, not a count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ts diagnostic

Fold and orientation hints point at apple_display_inventory_unresolved, so a
caller-canceled read must still emit it. The diagnostic fires again for every
unresolved read; a read whose caller aborted it reports reason probe-canceled
instead of probe-failed, without the toolchain hint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
R11 pins capture-kit's export list; the shared settledWithin helper that
Android and Apple screenshots use is a new deliberate subpath.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@apex-sentinel-staging apex-sentinel-staging Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Apex Sentinel: 1 new finding on 5cd9828. The verdict and the full list are in the summary comment.

…names no panel

A read beside a single-panel capture that refuses with
capture-panel-unidentified resolved a multi-panel table too, so that capture
also went out without --display. It now emits
apple_display_single_panel_count_stale. The refused read already records the
multi-panel verdict, so the next capture reads the table first; a test pins
that. Other read failures stay silent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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