Repository navigation
feat(ios): pair plain and honor-modal AX reads in the alert surface corpus - #4124
Conversation
…orpus The runner reads one app three times through the private AX client: the tree with snapshotKeyHonorModalViews, the plain tree, and the honor-modal tree again. Each node carries its AX identity (pid:elementOrHash.elementID) and parent identity. The plain and honor-modal trees are matched by element and parent element in linear time; a truncated, unmatched, reparented, or moved pair, or two honor-modal reads that differ, is unstable. The corpus moves to format 2 with both trees, read order, timings, and toolchain. All fixtures are re-recorded, and a Settings page sheet and a Settings screen without a modal are added. `expect` replays on honorModal, which matched XCUIApplication.snapshot() on every recording. No behavior change for alert or snapshot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Size Report
Startup median (7 runs, lower is better):
|
There was a problem hiding this comment.
All reported issues were addressed across 20 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
|
I found no new code problems in f7d69df. Smoke Tests is still in progress and has not failed; the diff touches only the iOS runner sources, the snapshot-presentation package with its fixtures, and Not blocking, take or leave: (1) the corpus now records an AX read with Of the open inline threads, the P2 on I did not rerun the live captures, |
A read that reached maxNodes on its last walked child was reported as a complete tree, so a clipped pair could be paired as stable. The tree build moves into modalScopeTreeFromSnapshot so fabricated snapshots can drive it. The capture also drops AGENT_DEVICE_IOS_BUNDLE_ID and AGENT_DEVICE_IOS_RUNNER_TEST_BUNDLE_ID from its build env, since either would override its own runner bundle id. The fixtures' capture.commit now names f7d69df, whose capture code is identical to the squashed commit that recorded them. The reparentedElement doc covers an element listed more often under the same parent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Apex Sentinel could not review commit Apex Sentinel did not review this pull request, as |
There was a problem hiding this comment.
All reported issues were addressed across 12 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
maxChildren and maxArrayCount bound children per element and maxDepth bounds levels; the total is bounded only by the client-side count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NSValue(cgRect:) is iOS-only, so the macOS runner unit variant failed to compile. The test also checks the frame the tree reads back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The code looks good at d8eb5a9. The earlier findings from f7d69df are fixed, and the iOS and macOS runner builds are green in CI. Not blocking: the new test's doc comment at https://github.com/callstack/agent-device/blob/d8eb5a9/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/UnitTests/RunnerTests+ModalScopeCaptureTests.swift#L5 still says the server stops at Of the open inline threads, these no longer apply and are already resolved: the bundle-id env cleanup in capture-alert-surface.ts (#4124 (comment)), the truncation flag in the modal scope capture (#4124 (comment)), the fixture commit reference (#4124 (comment)), the reparentedElement doc (#4124 (comment)), and the cap comment in the .m file (#4124 (comment)). Each is fixed at this commit. The only check that did not pass is the Apex Sentinel review. It declined because the diff, mostly the corpus JSON fixtures, exceeds its size limit, so it says nothing about the code. There are no conflicts. I did not run swift test, the runner unit tests, the runner builds or check:affected, and I relied on CI for the macOS compile fix. I did not re-record any fixture live; the unchanged fixture provenance rests on node counts staying far below the cap. I read #4125 only by title, body and file list, so its use of ModalScopePair is not reviewed here. |
#4127) The modal-scope capture from #4124 has one caller, the alert surface corpus capture test, yet its ObjC reader, the Swift acquisition, and the bridge's internal header shipped in the runner source. They move under UnitTests/, which the packager drops, and compile only under AGENT_DEVICE_RUNNER_UNIT_TESTS. The bridging header imports the capture header only when it exists, since OTHER_CFLAGS defines do not reach Swift's clang importer. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Summary
PR 1 of 3 for modal-scoped
alert. No behavior change foralertorsnapshot.snapshotKeyHonorModalViews), plain, honor-modal again. Each node carries its AX identity and its parent's. Pairing is linear on (element, parent). Typed outcomes cover unsupported, failed, and unstable (truncated, unmatched, reparented, moved, screen changed).expectpins today'sdismissPopupoutput.XCUIApplication.snapshot()equals the honor-modal tree on all 7 recordings, soexpectreplays onhonorModal.20 files.
Validation
check:affected --run --head f7d69df7b9passed. Hostswift test36/36. iOS and macOS runner builds pass.iPhone Duo, iOS 27.1. Nodes plain/honor; ms honor/plain/confirm:
¹ Warm-up read.
Positive control: each prompt removes nodes; each screen without one removes none (asserted per recording).
Not verified: physical devices, iOS before 27.1, iPad popovers, React Native
Modal,SFSafariViewController.🤖 Generated with Claude Code