Repository navigation
fix(selectors): resolve a wrapper chain's control for uniqueness reads - #2501
Merged
Merged
Conversation
A control reported through its own accessibility wrapper answers a selector twice, and a regular iOS snapshot omits unverified hittability, so the ladder that relates a wrapper to its control cannot fire. #2482 collapsed that chain for mutating resolution only: `press` tapped the toolbar button while `is visible` and `get attrs` reported "Selector did not match" and `screenshot --crop-on` refused the same screen as two nodes. Export the collapse beside the classification that asks for it and apply it where a read row's answer was a refusal. Rows that resolve before any refusal are untouched, and a candidate set the rule does not recognize as one control - a cell and the button inside it, or matches in distinct subtrees - still refuses. Replay verifies a recorded target by resolving its recorded selector again under the same row's refusal rules, so a step whose screen had not changed verified as an identity mismatch on its first replay. Verification names the collapsed control too, which is the node dispatch acted on and the node the recorded identity carries.
Contributor
Size Report
Startup median (7 runs, lower is better):
|
thymikee
force-pushed
the
fix/wait-wrapper-chain-2498
branch
from
September 11, 2026 16:50
16b925b to
bab4435
Compare
Member
Author
|
No findings at bab4435. Uniqueness reads and replay now resolve the same wrapper control while distinct subtrees and genuinely separate controls still refuse; the reported live simulator run covers is/get/crop and the regression tests cover replay. Ready for human review and merge; current-head checks pass. |
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
waitalready succeeds onmain; what still fails on the reported screen is every read that insists on one match. A SwiftUI toolbar wrapper and its button share one identifier, a regular iOS snapshot omits unverified hittability, so the ladder that relates a wrapper to its control cannot fire:presstaps the button whileis visibleandget attrsreportSelector did not matchandscreenshot --crop-onrefuses with "matched 2 nodes". #2482 collapsed that chain for mutating resolution only.This exports the collapse (
resolveUnverifiedWrapperControl) and applies it at the read door:readUniqueandcropTargetresolve the control instead of refusing. Rows that resolve before a refusal are untouched, and a candidate set the rule does not recognise as one control - a cell and the button inside it, matches in distinct subtrees - still refuses.Replay was the second door. Verification re-resolves a recorded selector under the same row's refusal rules, so a step whose screen had not changed verified as
IDENTITY_MISMATCHon its first replay; it now names the collapsed control, the node dispatch acted on.ADR 0011 is amended: its 2026-08-07 clause still described
get/is/waitas runnerquerySelectorreads. 11 files, +431/-31.Closes #2498
Validation
pnpm check:affected --runatbab4435(rebased ontoorigin/maind80fb35): 563 files / 4084 tests pass. An earlier run at the pre-rebase commit had one failure under concurrent load from other worktrees on this host and passed on rerun.is visibleandget attrsselector-not-matched,screenshot --crop-onmatched 2 nodes. After:is visiblepasses,get attrs/get textresolve the Button, crop is 35x36,waitandpressunchanged,is hiddenfails withactual={"visible":true},find … liststill lists both nodes, and a distinct-subtree duplicate still refuses.hittable: true, reads and acts both refuse. That is fix(selectors): collapse an unverified-hittability wrapper chain to its control #2482's existing boundary and is unchanged here.