81 Commits

Author SHA1 Message Date
Michał Pierzchała 7400701857 perf: speed up iOS swipes and harden runner cache (#676)
* perf: speed up ios swipes and harden runner cache

* fix: harden maestro replay smoke tests
2026-06-03 04:59:13 -07:00
Michał Pierzchała 7e30a83057 fix: tune iOS runner response retention (#665)
* fix: tune iOS runner response retention

* fix: require explicit runner response retention
2026-06-01 20:24:04 -07:00
Michał Pierzchała 3ae2472d44 fix: keep iOS runner status transport visible (#663) 2026-06-01 20:23:29 -07:00
Michał Pierzchała f2ef68871c docs(ios): note idleTimeout: false guardrail + why swipe/mouseClick bypass performGesture (review nits) (#664) 2026-06-01 21:27:07 -05:00
Michał Pierzchała daaf71a661 refactor(ios): safely(tag:default:) wrapper for the catch-log-and-default band-aid (#660)
Consolidate the repeated `var x = default; catchException({ x = expr }); if let m {
NSLog("..._IGNORED_EXCEPTION=%@", m); return default }; return x` shape used around
exception-prone XCUITest queries into one generic helper (RunnerTests+Exceptions.swift):

  func safely<T>(_ tag:, _ fallback:, _ block:) -> T
  func safely<T>(_ tag:, _ block: () -> T?) -> T?   // nil-default convenience

11 uniform sites adopt it: SystemModal (4), Snapshot (2), TextEntry (2), Interaction (3).
Each drops from ~7-12 lines to 1-3. The NSLog format is preserved byte-for-byte via the tag arg
(tag "MODAL_QUERY" -> "AGENT_DEVICE_RUNNER_MODAL_QUERY_IGNORED_EXCEPTION=%@"), so the
silently-logged-and-continued path keeps its searchable format and now has a single place to add
per-tag exception telemetry.

Left inline by design (not the uniform pattern): the silent `_ = catchException` KVC reads
(elementHasFocus, snapshotHasFocus), the throw-on-AX snapshot path, executeOnMainSafely's
retry-driving catch, and the bespoke pressKeyboardReturn fallback / performElementTap branches
whose result depends on the exception message.

Behavior-preserving: same defaults, same log output, same returned values. catchException is
non-escaping, so the inout capture in safeIsActionableCandidate is preserved.

Verified: xcodebuild build-for-testing -> TEST BUILD SUCCEEDED.
2026-06-01 21:25:43 -05:00
Michał Pierzchała 3f65124ea4 refactor: add iOS runner lifecycle protocol (#658)
* refactor: add ios runner lifecycle protocol

* fix: avoid journaling ios runner status probes

* fix: cap ios runner journal responses

* perf: avoid snapshot journal serialization

* perf: skip ids for ios runner status probes

* refactor: keep ios runner status off main thread
2026-06-01 20:40:09 -05:00
Michał Pierzchała cbe725d49b refactor(ios): gesture-response factory + performGesture wrapper in CommandExecution (#659)
Collapse the gesture-command boilerplate in the executeOnMain switch behind two seams:
- performGesture(app, idleTimeout:) -> (timing, outcome): folds measureGesture + the scroll
  idle-timeout/quiescence-skip wrap. Parameterized: touch gestures wrap (idleTimeout: true,
  default); synthesis gestures (pinch/rotate/transform) pass idleTimeout: false because
  RunnerSynthesizedGesture governs its own timing — a distinction that was previously implicit.
- gestureResponse(message:timing:frame:) over a GestureFrame (none/touch/drag): one factory for
  the success DataPayload (message + gesture timing + optional touch/drag visualization frame).

The 13 gesture cases (tap x3, tapSeries x2, longPress, drag, dragSeries, swipe, mouseClick, pinch,
rotateGesture, transformGesture) now use the seams; ~120 lines of repeated quartet (measureGesture +
idle-wrap + unsupported check + 8-field DataPayload) collapse. CommandExecution.swift 949 -> 867.

Behavior-preserving: identical outcomes, timing capture, DataPayload fields/messages, and the same
touch-wrapped vs synthesis-unwrapped distinction. No wire change (the factory emits the already
wire-locked DataPayload internally). mouseClick (throws) and swipe (returns an optional frame) keep
their bespoke measure/wrap but route the success payload through gestureResponse.

Verified: xcodebuild build-for-testing -> TEST BUILD SUCCEEDED (no warnings).
2026-06-01 20:32:18 -05:00
Michał Pierzchała 4d016db3b8 refactor(ios): extract the text-entry engine into RunnerTests+TextEntry.swift (#651)
Behavior-preserving relocation: move the text-entry concern out of the (formerly 1805-line)
RunnerTests+Interaction.swift — the repo's most-changed file — into a new
RunnerTests+TextEntry.swift. Interaction.swift drops to 1068 lines (-737).

Moved verbatim (no logic changes):
- value types: TextTypingRepairMode, TextEntryTiming, TextEntryResult, TextEntryTarget
- the focus -> type -> verify -> repair pipeline (typeTextReliably + focus orchestration +
  readiness polling + dropped-char/repair heuristics)
- clearTextInput and the text-entry leaf helpers (editableTextValue, isPlaceholderValue,
  isGenericTextInputLabel, normalizedElementText, moveCaretToEnd, estimatedDeleteCount,
  keyboardBecameVisible, keyboardElementExists)

The whole cluster is text-entry-exclusive (its only callers are within the moved code or the
already-internal command entry points), so every symbol keeps its original visibility — no
access widened. Shared helpers used by gestures/snapshot/get-text (isKeyboardVisible,
visibleKeyboardFrame, textInputAt, textInputCandidatesAt, readableText, ...) stay in
Interaction. The new file is auto-included via the project's file-system-synchronized group.

This is the safe, cosmetic half of the "TextEntry engine" architecture candidate. A deeper
extraction behind a real seam/type is intentionally deferred: it carries the #245 revert risk
and wants stronger text-entry e2e coverage first.

Verified: xcodebuild build-for-testing -> TEST BUILD SUCCEEDED. Pure relocation, no behavior change.
2026-06-01 16:53:21 -05:00
Michał Pierzchała 3785a17554 fix(ios): unify multi-touch gestures on two-finger synthesis + hinted unsupported errors (#645)
* fix(ios): unify multi-touch gestures on two-finger synthesis + hinted unsupported errors

Make RunnerSynthesizedGesture the single iOS multi-touch engine and drop the older
incompatible models:

- rotateGesture now drives the two-finger XCTest synthesis path (dx=dy=0, scale=1,
  degrees), mirroring the pinch migration in #634. The native XCUIElement.rotate(withVelocity:)
  injected a single synthetic rotation that React Native's rotation recognizer did not read
  reliably; synthesis fixes it. velocity is ignored on iOS (kept in the wire contract for
  compatibility; rotation direction comes from the sign of degrees).
- pinch is now synthesis on iOS and a clear UNSUPPORTED_OPERATION on tvOS/macOS. The macOS
  coordinate double-tap+drag heuristic (performCoordinatePinch) is removed: synthesis is
  iOS-only, so macOS multi-touch is reported honestly as unsupported rather than approximated.
- RunnerInteractionOutcome.unsupported now carries an actionable hint, mapped to ErrorPayload.hint
  (#639). Every unsupported gesture/tvOS path returns a concise message plus a next-step hint
  (existing messages kept verbatim).

Net: on iOS, pinch/rotate/transform all flow through one synthesis primitive. swipe/scroll/pan/
fling remain single-finger drags (correct, unchanged).

Coverage: examples/test-app/replays/gesture-lab.ad exercises pinch + rotate against the gesture
lab and asserts "pinch changed yes" / "rotate changed yes".

* fix(ios): fail-fast macOS pinch + align capability/docs with synthesis-only

Follow-through for removing the macOS coordinate pinch path (the runner now returns
UNSUPPORTED_OPERATION for macOS pinch): reject it at admission instead of round-tripping.

- capabilities.ts: pinch now matches rotate-gesture/transform-gesture (Android + iOS
  simulator only); macOS dropped. Removes the now-unused isMacOsOrMobileAppleSimulator helper.
- capabilities.test.ts: pinch expected unsupported on macOS and tvOS.
- website/docs/docs/commands.md: pinch listed for Android + iOS simulators only (removed from
  the macOS app-session list); documents that iOS rotate ignores the optional velocity arg
  (synthesis uses a fixed duration; direction comes from the sign of degrees).

Addresses PR #645 review HIGH #2 and MEDIUM #3.

* fix(ios): surface a hinted unsupported error for synthesis gestures at admission

Removing macOS pinch from the capability matrix makes macOS pinch (and the already-excluded
rotate-gesture/transform-gesture on macOS/tvOS/physical iOS) fail fast in ensureGenericCommandReady
before reaching the runner. That left the runner's macOS-specific hint unreachable on the daemon
path, so callers only saw the generic "<cmd> is not supported on this device".

Add an optional unsupportedHint to the capability matrix and surface it at admission, so the
synthesis-only gestures fail fast (no runner round-trip) AND return an actionable hint pointing to
where they work (Android + iOS simulator). Applied to pinch / rotate-gesture / transform-gesture.

Addresses PR #645 review (P2: route macOS pinch to the hinted failure).
2026-06-01 19:30:36 +02:00
Michał Pierzchała 5492cf4642 refactor(ios): single CommandTraits table for runner command classification (#642)
* refactor(ios): single CommandTraits table for runner command classification

Replace the three hand-maintained switches in RunnerTests+Lifecycle.swift
(isInteractionCommand / isReadOnlyCommand / isRunnerLifecycleCommand) with one
source of truth: CommandType.traits, an exhaustive switch returning a
CommandTraits struct (interaction / readOnly / lifecycle axes), collocated with
CommandType in RunnerTests+Models.swift.

Pure refactor: every command's classification is reproduced verbatim, and the
three predicates become one-line lookups with unchanged signatures, so call
sites are untouched. The exhaustive switch makes it a compile error to add a
CommandType without classifying it, closing the drift that historically let
tapSeries/dragSeries/keyboardReturn fall out of isInteractionCommand.

readOnly is a 3-state enum (.always/.never/.conditional); .conditional preserves
alert's action-dependent read-only behavior, resolved in isReadOnlyCommand.
Classification feeds ADR-0002 session invalidation (the read-only retry that
nulls currentApp/currentBundleId), so behavior is intentionally unchanged.

Adds the "Runner command traits" term to CONTEXT.md.

* docs(ios): note CommandTraits.readOnly .conditional is alert-only (review follow-up)

* fix(ios): classify tapSeries/dragSeries/keyboardReturn as interaction commands (#643)

* fix(ios): classify tapSeries/dragSeries/keyboardReturn as interaction commands

tapSeries and dragSeries are the series forms of tap/drag (already interaction
commands); keyboardReturn is the sibling of keyboardDismiss (already an
interaction command). All three were missing from the historical
isInteractionCommand switch — a drift the new CommandTraits table (#642) makes
visible. Classifying them as interaction commands gives them the foreground-guard
+ stabilization preflight that their single-shot/sibling forms already get.

Behavior change: these three commands now re-activate a backgrounded target to
foreground and pay the stabilization delays before running. Ships separately from
the CommandTraits refactor (#642) and should land after that bakes.

mouseClick left unchanged: macOS-only and the foreground guard interacts with
bespoke macOS activation, so it needs a macOS smoke check first.

* test: cover iOS runner series commands in perf harness
2026-06-01 18:11:04 +02:00
Michał Pierzchała b09e7d37e6 fix: preserve iOS AX snapshot failures (#639) 2026-06-01 15:10:53 +02:00
Michał Pierzchała 2068f604bb fix: improve ios selector reads and maestro reliability (#636) 2026-06-01 14:04:27 +02:00
Michał Pierzchała fa4e2d5ee0 fix(ios): drive gesture pinch via two-finger synthesis instead of single-finger drag (#634)
On iOS the runner lowered `pinch` to performCoordinatePinch — a tap() then a
single-finger press(forDuration:thenDragTo:). React Native reads that as a pan,
so the pinch scale never changes (reported in #629: scale stays 1.00).

Route iOS pinch through the existing two-finger XCTest synthesis path
(transformGesture / RunnerSynthesizedGesture) with zero translation and rotation,
so RN's pinch recognizer fires. macOS keeps the coordinate path.

Validated on iPhone 17 Pro against examples/test-app: the gesture-lab.ad oracle
now passes 1/1 (fling/pan/pinch/rotate); it previously failed at the pinch step.

Refs #629
2026-05-31 15:09:28 +02:00
Michał Pierzchała 73c057a442 perf+fix(ios): faster text entry (readiness + typed-query field resolve) + fix fill mis-navigation (#633)
* perf(ios): early-exit text-entry readiness when the keyboard is visible

The XCUITest text-entry focus/readiness loops keyed their fast-exit on
focusedTextInput(), which is intentionally hardcoded to return nil on iOS (focus
predicates are stale there). As a result stabilizeTextInputBeforeTyping always
burned its full focusTimeout (0.4s) and waitForTextEntryReadiness burned its full
readinessTimeout (2.0s) in the normal case where the software keyboard appears —
~2.4s of dead wait before a single keystroke on every type/fill.

The software keyboard becoming visible is the reliable iOS readiness signal, so
both loops now return as soon as isKeyboardVisible() is true. The warmup-first-char
echo check and post-type verify/repair remain as drop safety nets.

Measured on iPhone 17 sim (Settings search field), median type time:
  25 chars:  3342ms -> 1379ms  (2.4x)
  52 chars:  3969ms -> 2190ms
  313 chars: 10.3s   -> 8.6s    (remainder is genuine per-char XCUITest typing)
Reliability unchanged: 64/65 trials exact (incl. a 50-word lorem ipsum, verified
by read-back + screenshot); the lone miss triggered the existing verify/repair.

* fix(ios): don't clear an already-empty text field (fixes fill mis-navigation)

clearTextInput unconditionally ran moveCaretToEnd (an edge-tap computed from the
element frame) + a 24-key delete burst, even when the field was empty. On a field
that repositions on focus — e.g. the Settings search bar jumping bottom->top and
revealing a 'Suggestions' list — that edge-tap used a stale frame and landed on an
adjacent row (Developer), navigating away instead of clearing. fill (replace) into
the search field went to the Developer pane (0/3 correct).

Skip the clear entirely when the field's value is already empty (placeholder
treated as empty): replacing into an empty field is a no-op, and skipping avoids
the stray edge-tap. fill into the Settings search now types correctly and stays
put: 5/5 exact (read-back + screenshot).

* perf(ios): resolve text fields via typed queries, not full-tree enumeration

textInputAt used app.descendants(.any).allElementsBoundByIndex (snapshots EVERY
element) to find the text input at a point. fill drove this repeatedly: once it has
coordinates, resolveTextEntryElement re-runs textInputAt on every verify/repair poll
iteration whenever the focused-field reference goes stale (e.g. the Settings search
bar repositioning bottom->top), so the full-tree enum dominated fill latency.

Query the text-input element types directly (app.textFields/secureTextFields/
searchFields/textViews) instead. Same matches, but XCUITest resolves typed queries
without snapshotting the whole tree. Measured (iPhone 17 sim, warm runner): fill 25
chars ~14.5s -> ~4.5s (3.2x), 6/6 exact. Same primitive #632 killed for get text.

* fix(ios): address review — focus-change gate + secure-field clear

Review P1 (focus race): the isKeyboardVisible early-exit in stabilizeTextInputBeforeTyping
and waitForTextEntryReadiness fired the instant the keyboard was visible — but when it was
ALREADY up from a previous field (back-to-back fills), that is before first-responder moves
to the newly-tapped field, so app.typeText could target the old field. Gate the fast-path on
a keyboard hidden->visible TRANSITION via a shared keyboardBecameVisible(wasVisibleAtEntry:)
helper; when the keyboard was already up, fall back to the settle/timeout (the prior, correct
behavior) instead of the ~2.4s dead wait the fresh case avoids.

Review P1 (F2): clearTextInput used editableTextValue(...) ?? "" and skipped clearing on
empty — but editableTextValue returns nil for secure (and unknown) fields, so secure fields
were NEVER cleared and replace concatenated stale+new. Distinguish nil (clear) from "" (skip).

Device-validated: fresh fill fast-path preserved + exact; a second fill with the keyboard
already up still types into the correct field and replaces (not concatenates).
2026-05-31 15:08:57 +02:00
Michał Pierzchała ab760b6cf9 fix: apply app icon to iOS UI test runner (#611) 2026-05-29 09:16:15 +02:00
Michał Pierzchała a5fffc6e49 feat: add Maestro YAML replay compatibility (#581)
* feat: add Maestro replay compatibility

* fix: harden Maestro replay compatibility

* fix: address Maestro replay review feedback

* fix: finalize Maestro replay compatibility

* refactor: tighten Maestro replay compatibility boundary

* refactor: reduce Maestro replay quality debt

* refactor: satisfy Maestro replay fallow audit

* fix: stabilize Android provider snapshot tests
2026-05-27 21:45:51 +02:00
Michał Pierzchała ea21793154 feat: support ios transform gesture (#586) 2026-05-26 09:58:33 +02:00
Michał Pierzchała 47b981c8ad feat: add gesture command coverage (#576)
* feat: add gesture command coverage

* fix: align iOS fling provider fixture

* feat: group gesture commands

* fix: clarify android gesture support

* feat: add android multitouch gestures

* fix: address gesture review feedback

* refactor: simplify gesture plumbing

* fix: keep gesture subcommands internal

* fix: update iOS provider pan transcript
2026-05-22 18:01:58 +02:00
Michał Pierzchała dfd5c71282 perf: speed up hot iOS taps (#572)
* perf: skip fresh iOS tap preflight

* perf: use app root for iOS coordinate taps

* perf: simplify iOS coordinate tap payloads

* fix: tighten hot iOS tap safety window

* chore: trace skipped iOS tap preflights
2026-05-21 12:42:08 +02:00
Michał Pierzchała b0e19c9d1e perf: improve recording and interaction flows (#563)
* perf: improve recording and interaction flows

* feat: add React Native overlay dismiss command

* test: cover RedBox overlay dismissal

* fix: simplify React Native overlay snapshot hint

* fix: address daemon and scroll review feedback

* fix: unblock ci after recording polish

* chore: refresh fallow health baseline

* test: stabilize android provider suites

* test: cover rn overlay provider command
2026-05-20 20:32:08 +02:00
Michał Pierzchała f71371ebb8 fix: handle platform alerts (#562)
* fix: handle Android platform alerts

* fix: handle iOS alerts in runner

* chore: type alert metadata

* refactor: colocate Android alert handling
2026-05-20 14:51:17 +02:00
Michał Pierzchała 840bef56ca fix: tighten env var surface (#560) 2026-05-19 17:11:31 +02:00
Michał Pierzchała 094c290703 perf: speed up iOS replay runner (#557)
* perf: speed up iOS replay runner

* fix: harden ios replay fast paths

* fix: address ci validation failures

* refactor: trim unused ios replay surface
2026-05-19 11:36:48 +02:00
Alex d67e988671 fix: ios press idle timeout (#543)
* fix: ios press idle timeout

* fix: preserve ios mutating command recovery

---------

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2026-05-15 13:27:05 +02:00
Hwidong Bae 2e04edd869 fix: prevent runner XCTest attachment bloat (#520)
Long-running AgentDeviceRunnerUITests sessions can inherit Xcode 26 screenRecording/deleteOnSuccess defaults and leave hidden testmanagerd attachments behind when sessions terminate outside a clean XCTest success path.

Pin an explicit AgentDeviceRunnerUITests.xctestplan with screenshots and keepNever attachment lifetimes, then normalize the generated per-session .xctestrun copy before test-without-building. The .xctestrun normalization protects stale cached artifacts and Xcode versions that ignore some test-plan attachment lifetime keys during build-for-testing.

This only affects XCTest's automatic attachments; user-requested agent-device recordings still use the existing record command paths.

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2026-05-14 14:24:33 +02:00
Si Huynh d2a3742c7c fix: enable tvOS compilation for XCUITest runner (#492)
* fix: enable tvOS compilation for XCUITest runner

XCUICoordinate type and XCUIElement.tap() are unavailable on tvOS.
Gate coordinate-based interactions and touch APIs behind #if !os(tvOS)
and provide tvOS alternatives using XCUIRemote (Siri Remote) actions:

- tap/doubleTap → XCUIRemote.shared.press(.select)
- longPress → XCUIRemote.shared.press(.select, forDuration:)
- drag → directional remote press based on primary axis
- back gesture → XCUIRemote menu button
- app switcher → double home press
- pinch/rotate → return unsupported (no-op / false)
- keyboard dismiss → remote menu button
- alert accept/dismiss → remote select button

Verified: builds successfully for both tvOS Simulator and iOS Simulator.

* fix: harden tvOS runner interactions

* refactor: prune tvOS remote helpers

* test: keep fallow focused on tvOS changes

---------

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2026-05-12 10:32:21 +02:00
Michał Pierzchała bbb1d363c2 fix: handle iOS keyboard Done dismiss controls (#469) 2026-04-28 21:20:09 -04:00
Michał Pierzchała 364844e01d feat: add recording quality flag (#409)
* feat: add recording quality flag

* test: cover quality edge cases

* fix: scale transform translation in resize

* fix: narrow recording quality flag
2026-04-15 13:18:57 +02:00
Michał Pierzchała 7df452b3b5 feat: add rotate command for iOS and Android (#344)
* feat: add device rotation command

* fix: simplify rotate command handling
2026-04-01 20:34:56 +02:00
Michał Pierzchała 8df45b69a8 fix: make snapshot refs visible-first (#337)
* fix: make snapshot refs visible-first

* fix: handle zero-height visible rects

* refactor: simplify scrollintoview success handling

* feat: hint hidden scroll content in snapshots

* refactor: simplify snapshot output helpers

* feat: add hidden scroll-area hints to snapshots

* refactor: keep scroll containers in interactive snapshots

* perf: reuse Android snapshot tree for scroll hints

* refactor: trim hidden scroll hint scope

* refactor: unify mobile visible-first snapshot semantics

* fix: suppress noisy system scroll-container labels

* refactor: unify scroll indicator heuristics

* refactor: trim android hinting overhead

* fix: avoid viewport-sized ancestor promotion for ref taps

* refactor: dedupe viewport helpers and clarify hint naming
2026-04-01 19:00:02 +02:00
Michał Pierzchała f7f7ce531f chore: add icon for iOS UITest runner (#328)
* chore: add icon for iOS UITest runner

* chore: tighten uitest runner icon assets

* chore: prefer jpg for uitest runner icon
2026-03-31 21:03:57 +02:00
Michał Pierzchała 0fed800eee fix: avoid focusing iOS simulator window (#319) 2026-03-28 19:39:14 +01:00
Michał Pierzchała 876f091c00 feat: close macOS parity gaps (#311)
* feat: close macos parity gaps

* fix: support targeted macOS menubar app snapshots

* chore: clarify menubar fallback heuristics

* chore: address review nits

* fix: complete macOS parity flow
2026-03-28 19:06:52 +01:00
Michał Pierzchała d9d94f0f5a [codex] close iOS runner responses gracefully (#306)
* fix: close iOS runner responses gracefully

* fix: close runner connection after send
2026-03-27 17:48:20 +01:00
Michał Pierzchała ac50381270 docs: clarify iOS runner protocol contract (#300) 2026-03-27 15:27:56 +01:00
Michał Pierzchała b6592db978 Fix iOS runner fill for tapped secure text fields (#298)
* fix: target iOS runner fill typing to tapped inputs

* fix: clarify targeted fill error handling
2026-03-27 14:57:56 +01:00
Michał Pierzchała 1669c7a101 feat: support pixel-based scroll gestures (#293)
* feat: add pixel-based scroll gestures

* fix: address remaining scroll review comments

* chore: make scroll direction switch exhaustive

* docs: keep readme informational

* docs: revert readme changes

* refactor: reuse shared apple scroll planning

* refactor: reduce apple scroll runner churn
2026-03-27 12:06:57 +01:00
Michał Pierzchała 11b47a25a7 Fix keyboard dismiss semantics across iOS and Android (#291)
* fix: correct keyboard dismiss semantics

* fix: address PR review feedback

* fix: preserve iOS keyboard dismiss contract

* fix: restore session handler platform import

* docs: update skill guidance for keyboard commands
2026-03-27 11:49:30 +01:00
Michał Pierzchała c9ca550f1e feat: add --delay-ms support to type and fill (#292)
* feat: add delayed typing support

* fix: keep literal delay tokens in replay

* chore: tighten delay-ms follow-up polish
2026-03-27 10:43:52 +01:00
Michał Pierzchała 605f736f2f fix: expose collapsed iOS tab items in snapshots (#287)
* fix: expose collapsed iOS tab items in snapshots

* fix: address snapshot fallback review feedback

* fix: tighten snapshot fallback scope and truncation
2026-03-27 10:25:32 +01:00
Michał Pierzchała dc8f318f76 Split back navigation into explicit in-app and system semantics (#288)
* feat: split back navigation semantics

* fix: address back review feedback

* fix: make in-app back the default
2026-03-27 10:18:00 +01:00
Michał Pierzchała a39bb6d0fc fix: improve large text surface discovery and reads (#261)
* fix: improve large text surface discovery and reads

* chore: trim duplicated skill guidance

* fix: tighten large text read follow-ups

* fix: scope snapshot metadata and log read fallbacks
2026-03-25 17:13:31 +01:00
Michał Pierzchała 0cca41f673 feat: add gesture telemetry recording overlays (#245)
* feat: add gesture telemetry recording overlays

* fix: stabilize recording validation and telemetry artifacts

* fix: tighten recording telemetry helpers

* fix: clean up android recording stop fallback

* refactor: split ios recording handlers

* fix: tighten runner-backed touch telemetry

* refactor: simplify touch recording recovery

* feat: add gesture telemetry recording overlays

* refactor: split touch interaction recording flow

* fix: rebase gesture telemetry onto main

* test: fix recording overlay CI expectations
2026-03-24 13:38:41 +01:00
Michał Pierzchała 4b8fc2f4f6 fix: improve macOS runner snapshot and context menus (#252)
* fix: improve macos runner snapshot and context menus

* fix: address macos runner review feedback

* refactor: simplify xctestrun product resolution

* refactor: future-proof macos runner and click flows

* refactor: remove secondary click alias

* fix: tighten macos runner review follow-ups

* update readme

* fix: discover macos apps from standard bundles

* fix: stabilize macos app listing test on linux
2026-03-23 16:01:52 +01:00
Michał Pierzchała 9e1991daf6 feat: add apple-family macOS desktop support (#246)
* feat: add apple-family macos desktop support

* feat: extend macos desktop command support

* fix: stabilize CI for macos runner build

* fix: harden macos app resolution

* fix: tighten apple-family session routing

* fix: align macos log capabilities

* fix: support macos wait text

* fix: make iOS session refresh test host-agnostic
2026-03-23 10:22:55 +01:00
Muhammad Mugni Hadi b79bd86017 fix: remove trailing commas in Swift for Xcode <16.3 compatibility (#186)
* fix: remove trailing commas in Swift for Xcode <16.3 compatibility

Remove trailing commas from function/initializer argument lists in the
iOS XCUITest runner Swift source files. SE-0439 trailing commas in
comma-separated lists require Swift 6.1+ (Xcode 16.3+), but the runner
is compiled locally by users who may have older Xcode versions.

Users with Xcode 16.2 (Swift 6.0.3) encounter build failures:
  error: unexpected ',' separator

This causes the runner to never start, surfacing as:
  Error (COMMAND_FAILED): Runner did not accept connection (simctl spawn)

Files fixed (12 trailing commas removed):
- RunnerTests+Snapshot.swift (5)
- RunnerTests+Transport.swift (2)
- RunnerTests+CommandExecution.swift (1)
- RunnerTests+ScreenRecorder.swift (2)
- RunnerTests.swift (2)

Verified: pnpm build:xcuitest passes (TEST BUILD SUCCEEDED).

* ci: guard iOS runner trailing-comma syntax

---------

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2026-03-06 15:40:18 +01:00
Michał Pierzchała 9b443c526f refactor: split RunnerTests into focused files (#149)
* refactor: split RunnerTests into focused files

* chore: remove dead interaction label helper
2026-02-28 13:38:59 +01:00
Michał Pierzchała 97f59254bb fix: make snapshot --raw use target app tree on physical iOS (#148)
* fix: use snapshots for raw iOS tree traversal

Fixes #147

* refactor: unify snapshot hittable computation across modes

* refactor: account for cousin occlusion in hittable

* refactor: tighten snapshot occlusion heuristic
2026-02-28 12:55:41 +01:00
Michał Pierzchała 14de55c9b7 fix: support configurable iOS runner bundle IDs (#146) 2026-02-26 16:40:24 +01:00
Nick Dima 43aae1d30a fix(ios): correctly implement runner fallback for physical device screenshots (#132)
* fix(ios): use XCTest runner for screenshots on physical devices

`xcrun devicectl device screenshot` was removed in Xcode 26.x, causing
`agent-device screenshot` to fail on physical iOS devices with exit code 64.

This fix routes physical device screenshots through the AgentDeviceRunner
XCTest runner (already used for snapshot/interaction commands) instead:

- Add `screenshot` command to the Swift runner's `CommandType` enum
- Implement the handler using `XCUIScreen.main.screenshot()`, writing a
  timestamped PNG to the app's temp directory (returned as `tmp/<file>`)
- If `appBundleId` is provided, activate the target app before capturing
  so the screenshot shows the app under test rather than the runner itself
- In `screenshotIos()`, pass `appBundleId` to the runner command then pull
  the file back to the host via `xcrun devicectl device copy from` (same
  mechanism used by the recording feature)
- Thread `appBundleId` through `Interactor.screenshot()` → `dispatch.ts`
  → `screenshotIos()` so the active session's app is always captured
- Extract `IOS_RUNNER_CONTAINER_BUNDLE_IDS` to `runner-client.ts` so it
  can be shared between `apps.ts` and `record-trace.ts`

Fixes: screenshots failing with "Failed to capture iOS screenshot" on
devices using Xcode 26.x / devicectl 506.6+

* fix: clean up iOS screenshot fallback follow-ups

---------

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2026-02-25 16:11:01 +01:00