fix(ios): refuse a press whose target is not hittable
Summary
On iOS, press/click on a closed swipe action (RN ReanimatedSwipeable) reported success but tapped the row beside it: snapshot hittable is geometric only. A press now refuses before dispatch with target_not_hittable, dispatched: no.
- Gate (snapshot only):
isNestedTouchControlselects touch controls inside a larger touch control (the swipe-action shape). Other presses pay nothing. - Gated target: one lean runner read (
querySelectorwithhittabilityProbe: counts every match, readsisHittableand frame of a single one).notHittablerefuses.unknown(no selector, ambiguous, frame not the target's, read failure) proceeds as before. - Hook: new
probeTargetHittabilitybackend sibling of the offscreen probe, called inadmitResolvedTargetbefore the motion check. iOS only; snapshot output and latency are unchanged. NocoveredByis claimed.
20 files. Refs #4568 (iOS part).
Before: press @e15 on closed Delete Avocado → Tapped @e15 (338, 467), row toggled ("2 items still to buy").
After:
Error (COMMAND_FAILED): "Delete Avocado" is not hittable: a tap would land on another element. Not dispatched. Next: Reveal the control (for example swipe its row), then take a fresh snapshot -i.
details: {reason: target_not_hittable, ref: @e15, rect: {294,425.67,88,82}, dispatched: no}
Row unchanged. After the row is swiped open, the same press deletes it.
Validation
Tested head 10e38f8da8, base cfe08502f0. pnpm check:affected --run --head HEAD: 25 checks passed (receipt run-ezpc0k). Native RunnerTests probe and selector tests ran with INCLUDE_UNIT_TESTS=1: 2/2 passed. CI owns coverage and device lanes.
Device (iOS 26.2 sim, Pantry RN app): closed Delete refused, open Delete pressed; the 22x22 Recipes "Save" button is not nested, so it is ungated and unchanged.
Press latency, ms (base → head):
| Press | base | head |
|---|---|---|
| ungated tab press, 6 runs | 532–572 | 524–549 |
| gated open-row Delete, 9 samples | 527–702 | 526–832, medians within noise |
| refused press, 5 runs | n/a | 253–332 |
Not covered: native UITableView swipe actions (no fixture), Android.