Skip to content

feat(android): let agents swipe - #396

Merged
ElbertePlinio merged 3 commits into
mainfrom
feat/231-android-swipe
Oct 28, 2026
Merged

ElbertePlinio merged 3 commits into
mainfrom
feat/231-android-swipe

Conversation

@ElbertePlinio

Copy link
Copy Markdown
Member

The Android lab had android_tap but no swipe, so agents could not scroll lists or dismiss sheets with a gesture.

This adds an android_swipe MCP tool and a pickforge-lab android swipe command. Both run adb shell input swipe x1 y1 x2 y2 [durationMs] with argv arrays, validate and bound every value, and record both endpoints in evidence. A swipe counts as an interaction when evidence decides a run's outcome.

Proof: fake adb tests cover the exact argv and rejections, and a live swipe on an emulator scrolled a Compose list. The full suite passes (3364 tests).

Stacked on #395; this PR is retargeted to main before #395 merges.

Sol review: round 1 found that a swipe did not count as an interaction for outcomes (should), round 2 approved.

Closes #231

Requirement How verified Scenario and edge cases Result Evidence
Tool and CLI command with argv arrays Fake adb tests in packages/android, packages/mcp-server and packages/cli; live CLI swipe With and without a duration Exact argv -s emulator-5555 shell input swipe 160 500 150 120 400; the live swipe moved a list row from y=264 to y=168 ~/.pickforge/investigations/231/, ~/.pickforge/investigations/qa-351-231/shots/j6-montage.png
Coordinates and duration validated and bounded Builder tests, MCP schema rejection (no adb call), CLI rejection Negative, fractional and oversized values Coordinates 0 to 16383 (largest Android surface side); duration 0 to 10000 ms, optional CI, ~/.pickforge/investigations/qa-351-231/cli-invalid.txt
Evidence records both endpoints MCP evidence tests A recorded swipe action Both start and end points stored CI
A swipe counts as an interaction for outcomes packages/core/test/evidence-outcome.test.ts Swipe-only run with an inspected screenshot Passes as an interaction CI
Tests with the fake adb As above Pass CI
Release note Diff One bullet ending (#231) Diff
QA pass Lab Android session, swipe, long press and duration swipe Before and after screenshots Passed ~/.pickforge/investigations/qa-351-231/shots/

The android_swipe MCP tool and the android swipe CLI command run adb shell
input swipe with argv arrays. Coordinates are bounded to 0-16383 pixels
and the optional duration to 0-10000 ms. Evidence records both endpoints.

Closes #231
@ElbertePlinio
ElbertePlinio changed the base branch from feat/351-compact-ui-tree to main October 28, 2026 19:10
@ElbertePlinio
ElbertePlinio merged commit 408eb6c into main Oct 28, 2026
14 of 15 checks passed
@ElbertePlinio
ElbertePlinio deleted the feat/231-android-swipe branch October 28, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

android: add a swipe tool

1 participant