fix(ios): find a popover dismiss region in one query instead of reading every element
Summary
Fixes smoke:webview-remote-content → wait for the WebView page to expose its link (#2491 row 1, run 35982745770). A runner restart timed out the landmark wait, so the scenario sent alert get. With no alert up, the runner then read every descendant of every window to find a popover dismiss region. Each element cost one XCTest round trip, and each element the loading page removed cost a 4 s retry. After the 10 s watchdog the runner stayed busy 38 s; every wait poll spent the #2863 resend window (~6 s) on RUNNER_BUSY.
Now one predicate query per window set finds the region. Its query, the alert-title filter, and alert observation share one marker pattern. Three iOS XCTests on a 500-label fixture check it: an absent alert resolves in under half the alert budget; a trimmed, mixed-case marker on a button resolves; a window that is itself the marker resolves. Complements #2897.
Validation
Head ee75e9b9ae: pnpm check:affected --run passed (exit 0).
- Mutation (main's
firstDismissPopupWindowrestored): the absent test fails at 282 s against its 5 s bound (500 labels). With the fix: 0.37–0.39 s over 3 runs. - Live (iOS 26.2 sim), WebView lab →
alert get→ page wait:- main:
MAIN_THREAD_TIMEOUTat 10.2 s; the wait failed withwait_capture_stalledafter 20 s; the runner stayed busy 21.9 s. - fix: 10/10
ALERT_NOT_FOUNDin 0.18–1.2 s; the wait passed in <0.7 s.
- main:
- The scenario passed 10/10.
Residual: the runner restart is a separate signature.