Skip to content

fix: use ESM readline in iOS device prompt - #50

Merged
saikrishna321 merged 3 commits into
appclawhq:mainfrom
qmkCamel:agent/fix-ios-readline-esm
Aug 4, 2026
Merged

fix: use ESM readline in iOS device prompt#50
saikrishna321 merged 3 commits into
appclawhq:mainfrom
qmkCamel:agent/fix-ios-readline-esm

Conversation

@qmkCamel

Copy link
Copy Markdown
Contributor

What changed

  • replace the CommonJS require('node:readline') call in the real-device confirmation path with an ESM import
  • add a regression test that executes the interactive TTY branch and confirms the prompt resolves

Why

@appclaw/core is published as an ES module. When an interactive iOS real-device run reaches the WDA confirmation prompt, require is unavailable and the CLI exits with:

Device setup failed: require is not defined

Non-interactive runs skip this branch, which is why CI-style flows were not affected.

Impact

Interactive flows and Playground sessions can confirm a preinstalled WDA without crashing. Non-interactive behavior is unchanged.

Verification

  • npm run typecheck
  • npm run format:check
  • npm test — 18 test files, 364 tests passed
  • manually verified the same fix with @appclaw/cli@2.0.0 on an iOS 26.2.1 real device; the WDA confirmation completed and a 4/4-step flow passed

@qmkCamel
qmkCamel marked this pull request as ready for review July 31, 2026 04:17
中文:合并上游 PR appclawhq#51appclawhq#52 以及 2.0.1、2.0.2 发布提交,保持 PR appclawhq#50 基于最新主分支。

English: Merge upstream PRs appclawhq#51 and appclawhq#52 plus the 2.0.1 and 2.0.2 release commits so PR appclawhq#50 is based on the latest main.
中文:仅在同仓库 PR 或手动触发时运行依赖 LLM_API_KEY 的 Android、DOM 和 Vision 检查,避免外部 PR 因拿不到仓库密钥而误报失败。

English: Run LLM_API_KEY-dependent Android, DOM, and Vision checks only for same-repository pull requests or manual dispatches so fork PRs do not fail on unavailable repository secrets.
@saikrishna321
saikrishna321 merged commit aee7c4d into appclawhq:main Aug 4, 2026
7 checks passed
github-actions Bot pushed a commit that referenced this pull request Aug 4, 2026
## [2.0.3](v2.0.2...v2.0.3) (2026-08-04)

### Bug Fixes

* use ESM readline in iOS device prompt ([#50](#50)) ([aee7c4d](aee7c4d))
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 2.0.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants