perf(ios): confirm fill focus from the tapped input before the keyboard

Merged
TH
5h ago
+152-24

Summary

After a keyboard-down fill's focus tap, stabilization asked for the keyboard first. During presentation that query blocks and finds nothing: 0.57–3.77 s in 8 of 12 fills on perf run 39679264668.

Now the tapped input's ResolvedTextEntryInput answers first. When it reports hasKeyboardFocus, that read becomes the post-focus read: one snapshot gives focus, the refresh point, and the TextEntryReader's first input. Keyboard and app-wide checks stay as fallbacks; runner.log names the evidence. Builds on #3882; 5 runner files.

Validation

Main 4d5c38498c vs d9065c5ebd (production code of 954ce832cd), own iPhone 17 Pro / iOS 27.0 simulator, interleaved, ms median (p95):

Fillnrunnerpost-tap focus
Test app field-name62367 (2956) → 2370 (2988)74 (85) → 57 (71)
Same, cold boot62141 (3110) → 2019 (2216)150 (650) → 40 (50)
Catalog search62222 (2243) → 2228 (2296)132 (137) → 122 (127)
Bluesky username91780 (1808) → 1734 (1805)54 (63) → 39 (42)

Main queried the keyboard after the tap in all 39 keyboard-down fills, clears included; head never.

  • 120 runner tests pass; the order test fails if the keyboard is asked first. Value reads: 17 (pin ≤ 18); 19 without the hand-off or reader seeding.
  • check:xctest-selection and check:affected --run --head 954ce832cd passed, exactCommit=true.
  • Unverified: secure-text and WKWebView inputs reporting their own focus (else fallback).

🤖 Generated with Claude Code