Skip to content

fix: clear ios text fields with the hid clear key instead of cmd+a - #406

Merged
gmegidish merged 2 commits into
mainfrom
feat/ios-clear-key
Oct 14, 2026
Merged

gmegidish merged 2 commits into
mainfrom
feat/ios-clear-key

Conversation

@gmegidish

Copy link
Copy Markdown
Member

Why

On iOS, locator.fill() / locator.clear() cleared fields with cmd+a + backspace. With the devicekit-ios 0.0.33 agent, the first key combo after a field gets focus is dropped, so only backspace arrived and one character was deleted ("Glorpax" → "Glorpa", then "Failed to clear element"). Related: #275.

What

Cloud devices using driver-mobilenext need agent 0.0.34 or newer for this to work.

Test plan

  • Unit tests and lint pass
  • Milliways iOS tests on an iOS 26.5 simulator with agent 0.0.34: every fill() / clear() step passes
  • Mobilenext cloud devices (needs agent 0.0.34 deployed)

Not fixed here: "leaving without saving keeps the old profile" in Milliways still fails when it runs right after a test that saved the profile. device.clearAppData() doesn't reset UserDefaults on the simulator, which is a separate issue.

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 91522a60-ef1a-4a81-be83-03ceddd06119
📥 Commits

Reviewing files that changed from the base of the PR and between 919a51c and 0e15fbf.

⛔ Files ignored due to path filters: 1
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing: 4
  • packages/driver-mobilecli/package.json
  • packages/driver-mobilecli/src/driver.test.ts
  • packages/driver-mobilecli/src/driver.ts
  • packages/driver-mobilenext/src/driver.ts

Included review availability: This review used your included allowance. 2 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

Walkthrough

Both mobile drivers now use the clear key for clearText() on iOS. On other platforms, they continue to send ctrl+a followed by backspace. The mobile CLI test now expects the iOS clear key, and the mobilecli dependency changes from version 1.0.19 to 1.0.20.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 0e15f

No confirmed merge-blocking issue remains. Compatibility with older local agents and the MobileNext cloud rollout has not been established.

Pre-merge checks: Passed 5
Passed Passed checks: 5 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: using the HID clear key for iOS text fields instead of cmd+a.
Description check Passed The description accurately explains the iOS failure, the mobilecli dependency update, the clearText() changes, platform behavior, and test coverage.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Warning

Some tools did not complete. Review the errors below.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed due to a network error.

Comment @coderabbitai help to get the list of available commands.

@gmegidish
gmegidish merged commit 92c73b6 into main Oct 14, 2026
9 checks passed
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.

1 participant