You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(rn-device): close iOS-MVP coverage gaps + strip upstream branding
Live pre-merge validation (docs/proof/ios-mvp-validation/REPORT.md in
workspace) surfaced 6 substantive bugs where iOS device verbs still
routed through the legacy agent-device daemon/CLI — exactly the surface
PR #164 was supposed to eliminate. This commit closes those gaps and
removes the leftover upstream visual branding.
API migration:
- rn-fast-runner-client.ts: drop dead per-endpoint helpers
(fastTap/fastType/fastSnapshot/fastScreenshot/fastDismissKeyboard,
plus their postJSON/postBinary plumbing). Rewrite fastSwipe to POST
the single /command endpoint with command='drag' (the Swift .swipe
case is tvOS-only; iOS coord gestures use .drag).
- RunIOSArgs: add 'drag' | 'longPress' | 'pinch' | 'findText' command
variants + scale field for pinch.
- runIOS body builder: forward args.scale to the runner.
- agent-device-wrapper.ts: expand RN_FAST_RUNNER_COMMANDS to include
swipe / scroll / longpress / pinch so runAgentDevice short-circuits
through runIOS for all iOS device verbs.
- buildRunIOSArgs: new cases for swipe+scroll (→ .drag), longpress
(→ .longPress), pinch (→ .pinch).
- device-interact.ts createDeviceFindHandler: on iOS the non-exact path
now uses the snapshot-based findInLatestSnapshot orchestrator instead
of the legacy `agent-device find` CLI (which respawned the upstream
AgentDeviceRunner via the daemon and stole focus from RnFastRunner).
- device-interact.ts createDeviceScrollIntoViewHandler: new TS
orchestrator scrollIntoViewIOS — snapshot → find → decideScroll →
fastSwipe loop (up to 12 iterations). Android keeps the legacy CLI
delegate (its daemon doesn't have the focus race).
Branding cleanup (live finding: "rn fast runner has agent device
runner logo / intro screen as well"):
- ContentView.swift: drop Image("Logo") + Image("PoweredBy"); show
only the "rn-dev-agent / fast runner" text + "XCUITest bridge" tag.
- Assets.xcassets: delete Logo.imageset and PoweredBy.imageset
imagesets entirely. Remove logo.jpg from AppIcon.appiconset and
clear the filename reference in Contents.json so the runner uses
Xcode's default placeholder icon (the runner ideally never
foregrounds anyway, per the Task 2 regression XCTest).
Validation: existing 1449/1449 unit tests still pass. Swift TEST
BUILD SUCCEEDED. Live re-validation pending /reload-plugins.
Findings refs: docs/proof/ios-mvp-validation/REPORT.md (workspace).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
returnfailResult(`AMBIGUOUS_MATCH: "${args.text}" matched ${candidates.length} elements. Use device_press with one of these refs, or retry with index: N.`,{
231
+
code: 'AMBIGUOUS_MATCH',
232
+
query: args.text,
233
+
candidates,
234
+
hint: 'Pick the correct ref (prefer one with hittable=true) and call device_press(ref="...") directly, or call device_find again with index: N.',
235
+
});
236
+
}
209
237
constcliArgs=['find',args.text];
210
238
if(args.action)
211
239
cliArgs.push(args.action);
@@ -701,17 +729,81 @@ export function createDeviceScrollHandler() {
returnfailResult(`scrollintoview: swipe failed at iteration ${i}: ${swipeResp.error??'unknown'}`);
803
+
}
804
+
}
805
+
returnfailResult(`scrollintoview: target "${args.ref??args.text}" did not enter viewport after ${MAX_ITERATIONS} swipe iterations`,{code: 'SCROLL_EXHAUSTED',iterations: MAX_ITERATIONS});
0 commit comments