perf(ios): reuse current focus for native text replacement

Merged
DA
2d ago
+365-59

Summary

Local native iOS fill reuses focus when the current command identifies the target and reads its keyboard focus. Clearing tries verified select-all/delete before a fallback caret tap. Newly focused inputs retain caret preparation.

9 files cover the native path, regression witnesses/tests, CLI help and user docs. Fixture extraction keeps the existing host file below its size gate. No public API or wire changes. No linked issue.

Validation

Base c8ad8fb1257787ce0973cf74271cb9a4fafb51d9 → tested head 5b26c9c6aae3ac7b2eb257e1d16f011e5284c1ec.

  • pnpm check:affected --run --head 5b26c9c6a: passed, exactCommit: true; 14 local checks, 17,138 unit passes and one existing unit skip.
  • iOS/macOS arm64 builds passed. All 37 selected iOS tests passed without skips, including nine new tests and both landscape directions.
  • The original eight regressions: base five pass/three fail; head eight pass. An isolated broad-deferral mutation fails the required caret-preparation test.
  • Five paired synthetic rounds: focused empty fill 2648→1807 ms (31.8%), replacement 4188→2705 ms (35.4%), clear 2950→1480 ms (49.8%). Each improved in all five pairs. Unfocused medians varied within 1.2%. No full-suite gain claim.

Aggregates, receipt summary and reproducer. Independent review has no remaining findings. All owned fixtures, leases, sessions and daemons are cleaned. GitHub Actions awaits maintainer approval for this fork; Vercel preview requires deployment authorization. Physical-device execution was not performed.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.