Repository navigation
fix(ios): read simulator snapshots past 64 accessibility levels - #4089
KrzysztofMoch wants to merge 2 commits into
Conversation
The simulator AX bridge cut every regular capture at 65 levels (maxTraversalDepth 64), so a control nested deeper was missing from the snapshot and press by label or ref failed, while a coordinate press still worked. The bridge already reads past the AX server's per-request limit through continuations; only the daemon's default bound stopped it. Raise the default to the bridge's own bound (128). Each native request still reads at most 65 levels, so trees up to 65 levels issue exactly the same requests, rejections, and depth hints as before. Double the continuation budget to 64 requests, since each root-to-leaf path needs one continuation per accepted-depth window and the bound doubled.
|
@KrzysztofMoch is attempting to deploy a commit to the Callstack Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
All reported issues were addressed across 8 files
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
Depth hints now cap their comparison at the first request themselves, so the adapter passes the requested levels unchanged and ios_snapshot_source_recovery reports 129 for a 128-level capture. Correct the per-request limit notes and the changeset's budget claim.
|
The change looks sound at d1a2434, but the live simulator evidence is for an older commit, so it needs a fresh run before merge. The deep-control press by label was taken at 7fcde94. The PR body says that run predates the host-side hint bookkeeping, the hint cap and the test changes. At this head, depth-hints.ts compares against min(requested, 65), and the native first-request window in SnapshotBridgeCapture.m is min(hint, 65). That is the same device route, and nothing shows it works at head. A bookkeeping regression, such as a hint that is never sent or never forgotten on deep trees, would only appear as extra rejected requests and added latency, which the fixtures do not catch. Please re-run on an iOS simulator at d1a2434 and quote the log lines and the head SHA in the PR body. (1) A UIKit screen with Not blocking, and fine to take or leave: the TS constant MAXIMUM_REQUEST_LEVELS in limits.ts mirrors the native maximumRequestLevels with only a comment, like MAXIMUM_DEPTH does for kMaximumDepth, so one small test comparing them with the bridge sources (or reporting the first-request levels in the recovery counters and dropping the TS constant) could follow in a separate PR; MIN(nativeLevelsHint, maximumRequestLevels) cannot change the result from this host because consume() never sends a hint above the first window, so please keep it or drop it and say which in one line; and the native fixtures in foreground-owner.m hard-code 65 and 64, so exposing those two constants through SnapshotBridgeCapture.h would keep them in step if the request cap changes. The three cubic-dev-ai threads on the 65-level window comment (#4089 (comment)), the requestedLevels diagnostic (#4089 (comment)) and the changeset wording (#4089 (comment)) are all fixed at this head and already resolved. Only the Vercel check fails, with "A member of the Team first needs to authorize it", which is the fork preview authorization and not a code failure; the diff touches nothing the docs site builds. The other 11 checks pass. I could not run the Objective-C fixtures, vitest or a simulator, so the 134/134 result and the device table are the author's. The next step before merge is the live simulator run above at d1a2434. |
Summary
On an iOS simulator,
snapshotdropped every control nested more than 64 accessibility levels deep, sopressby label or ref could not find it. Fixes #4088.limits.ts).8 files: the bridge README, the shared recovery fixture, and the native fixture, which now checks every continuation's levels.
Validation
Device run at 7fcde94 (the bridge change before review fixes to host-side hint bookkeeping, the hint cap, and tests), Xcode 26.6, iOS 26.5 simulator, iPhone 17 Pro,
Deep targetunder N plainUIViews:Selector did not matchAt d1a2434 on macOS: snapshot-source vitest 134/134 (native fixtures included), oxlint, typecheck,
fallow audit --base upstream/main,check:production-exports. Runner conformance XCTests passed at 7fcde94 (fixture unchanged since).No
check:affected --runreceipt: locallylayeringandeager-closure-budgets.test.tsfail identically on the unchanged base (the clone'soriginis a stale fork). CI is the record. Not tested: Xcode 27, iOS 27, physical devices.Changes made by Claude Opus 5.5 in Claude Code (T3 Code).