fix(ios): stop a tap's post-gesture lookup from recording an XCTest failure (#3060)
Summary
Closes #3060.
A tap holds a handle bound to the query that resolved its element, so reading that handle re-runs the query.
Flutter reports a password field as TextField by one accessibility channel and Other by another, so once
focused it stops answering the query that found it; XCTest records a no-matches failure and
didRecordXCTestFailure fails the command and invalidates the target — for a tap that already landed. ADR 0005
keeps a tap's outcome independent of this bookkeeping; three post-gesture reads did not follow it.
rememberTextEntryTap re-derived isTextEntryElement after the gesture though both tap routes classify before
dispatching, so it could only agree or die. Its parameter is now the caller's classification; the coordinate
route's comes from queryTextInputs, which enumerates only text-entry types. Readiness no longer classifies,
and its frame comes from snapshot() instead — same answer, throwing channel, records nothing, as
probeTextEntryInput and withElement already do. Still read after the wait, so the focus repeat aims at
where the field is then. Runner-only, 4 files; a tap that did not land still fails.
Validation
Head 399858300 (comment-only amendment over a6f6af1, which carried the live A/B). pnpm check:affected --run green; iOS PR lane 97/97 locally on iOS 27.1, and CI runs these cases
on iOS 26.2.
Reproduced and fixed live on a Flutter login screen, same app and daemon, only the runner binary differing.
click label=Password on base failed at 7.34 s with XCTEST_RECORDED_FAILURE, 2 invalidations, and a runner
restart per failing tap; its runner.log carries the report's error verbatim — no-matches on Element at index 1 from input {(TextField)}, legacy-TextField-vs-modern-Other, traits 146029150208 — recorded at
TextEntry.swift:268, the read removed here. The fix returns Tapped at 0.92 s with none of those, and a
following type lands six masked characters. press and click text= are clean on both sides; the full matrix
and caveats are in my review comments.
Both new tests fail on base with that signature and pass on the fix. Unclaimed: the speedup is the avoided
restart, not a re-timed tap. One real behavior delta — where base's post-gesture type read answered a non-text
type it skipped readiness entirely, and readiness now runs its wait there; on the measured Flutter shape both
sides performed no repeat (2 synthesized dispatches per 2 taps in both). fill @e6 is type's own reads —
#3238.