refactor(ios): runner native bridge — one sole-screen entry, API-only ObjC comments
Merged
TH
11h ago+52+52+01234567890123456789-142-142-012345678901234567890123456789
Summary
Behavior-preserving simplification of the runner native bridge and the shared geometry header. These Objective-C files ship byte-for-byte in the npm package, so their narration is shipped size.
- Deleted
RunnerResolveSoleScreenDisplayID: a renaming wrapper that discarded the resolved screen.RunnerCreateEventRecordnow callsRunnerResolveSoleScreenat the same point, so the dispatch-time sole-screen admission recheck keeps the same call and timing. - Fixed the stale
RunnerSynthesizedGesture.hcomment: a nilresolvedWindowis the sole-screen route, not the first window. - Inlined the single-use
RunnerDragProgressFunction/RunnerSampledDragPointerPathintoRunnerControlledScrollPointerPath, its only caller, which passed a fixed progress function. Same event sequence. - Replaced
AgentDeviceForegroundOwnershipMatches(an inlinea == b) with==at both callers; deleted the deadkAttributeFramebranch inSnapshotBridgeRuntime.m(it returnednilinto areturn nil;). - Trimmed ObjC narration to one sentence per exported symbol plus the constraints code cannot show (frame read before screen;
existsrequired; class absence cached, never geometry; phone idiom skips the probe). History notes (#2728, "measured on a live Duo") are gone.
7 files, two commits. No wire, CLI, or public type changed; the shared header's protocol, tolerance, and measurable/fills predicates are untouched.
Validation
Tested SHA 25bc6b2d5f (rebased onto origin/main a16d437237; 1ba2e5fa74 changed only one header comment).
- Bridge native tests (
cache-native-runtime.test.ts,cache.test.ts,cache-identity.test.ts): 58 passed, including the-Werrorbridge compile. - Mutant (disposable checkout): drop the bridge ownership check →
cache-native-runtime.test.ts3 failed / 46 passed (baseline 55 passed). - Runner unit suites (bridge, synthesized interaction, scroll gesture, gesture) built with
AGENT_DEVICE_XCUITEST_INCLUDE_UNIT_TESTS=1: iPhone 17 Pro 36 passed / 0 failed; iPad Air 13-inch (M4) 38 passed / 0 failed (counts after the rebase; the pre-rebase run was 37 and 39). - Mutant: remove the sole-screen fills-screen refusal → the nightly-iPad selection fails 4/4 (baseline 4 passed).
pnpm check:xctest-selectionpassed.pnpm check:affected --run --head 25bc6b2d5f: all runnable checks passed,exactCommit=true; swift-runner lanes are GitHub-authoritative.- XCTest Nightly on the final head (the iPad sole-screen route changed): https://github.com/callstack/agent-device/actions/runs/40403407186 — success; iPhone full suite 498 executed, iPad sole-screen leg 4 executed.
Size Report
| Metric | Base | Current | Diff |
|---|---|---|---|
| Installed (including dependencies) | 5.57 MB | 5.56 MB | -5.1 kB |
| Package (unpacked) | 5.56 MB | 5.56 MB | -5.1 kB |
| Package (download) | 1.69 MB | 1.69 MB | -1.8 kB |
🤖 Generated with Claude Code