feat(mobile-mcp): vendor mobile-mcp with opt-in 0-1000 relative coordinates - #6235
Conversation
git-subtree-dir: packages/mobile-mcp git-subtree-split: c5d7d27fd61e4762e15ae4b1c68b6c011be88bb7
…inates Fork mobile-next/mobile-mcp (v0.0.61) into packages/mobile-mcp/ via git subtree, renamed to @qwen-code/mobile-mcp with the following additions: Relative coordinate shim (src/coord-norm.ts): - MOBILE_MCP_COORDINATE_SPACE=1 enables 0-1000 normalized coordinates - MOBILE_MCP_COORDINATE_SCALE configurable (default 1000, 999 for mobile_use) - Input denormalization for click/double_tap/long_press/swipe - Output normalization for list_elements and get_screen_size - Tool description rewriting when enabled - Default off = zero behavior change Android enhancements: - mobile_install_app: -r/-g/-d/-t install flags (Android only) - mobile_ui_dump: full UIAutomator XML hierarchy dump - mobile_adb_pull / mobile_adb_push: file transfer via ADB Infrastructure: - cd-mobile-mcp.yml: npm publish workflow (tag mobile-mcp-v*) - scripts/sync-from-upstream.sh: git subtree pull for upstream sync - .vendored-from / .vendored-patches.md: vendoring metadata - Upstream telemetry disabled by default - eslint.config.js: exclude packages/mobile-mcp from root lint
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Hi @LaZzyMan, thanks for the PR! 👋
The PR body doesn't follow the project's PR template. The template requires these sections:
- What this PR does — describe the change in prose
- Why it's needed — motivation and problem being solved
- Reviewer Test Plan — with
How to verify,Evidence (Before & After), andTested onsubsections - Risk & Scope — main risk, what's out of scope, breaking changes
- Linked Issues — closes/references to related issues
The current body has Summary, Changes, and Test plan which don't map to these required sections. Could you restructure the PR description to match the template? It helps reviewers evaluate the PR efficiently.
中文说明
你好 @LaZzyMan,感谢提交 PR!👋
PR 描述没有遵循项目的 PR 模板。模板要求包含以下部分:
- What this PR does — 用文字描述改动内容
- Why it's needed — 动机和要解决的问题
- Reviewer Test Plan — 包含
How to verify、Evidence (Before & After)和Tested on子部分 - Risk & Scope — 主要风险、不在范围内的内容、破坏性变更
- Linked Issues — 关闭或引用相关 issue
当前 PR 使用了 Summary、Changes 和 Test plan,与模板要求的部分不匹配。请按照模板重新组织 PR 描述,以便审查者高效评估。
— Qwen Code · qwen3.7-max
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
- ensureScreenSize: log warning instead of silent failure (#4) - invalidateScreenSize on orientation change (#5) - adb_push: path.posix.resolve to prevent /sdcard/ traversal (#6) - adb_pull: readOnlyHint → destructiveHint (writes local file) (#9) - adb_push: remove validateOutputPath on read-source local_path (#11) - normalizeElementResult: log error instead of bare catch (#16) - rewriteDescription: remove dead duplicate regex (#17) - cd workflow: add test step between build and publish (#19)
Review round 1 — resolvedCommit: 1dcd780 8 fixed (our additions):
11 declined (upstream code, out of PR scope):
|
Review round 2 — resolvedCommit: 0c3f1d7 关于本 PR 的代码来源说明本 PR 通过 我们在上游代码之上做的改动仅限于以下文件:
其余所有文件( 本 PR 只接受针对上述我们改动部分的 review。 本轮处理结果: 2 fixed(我们遗漏的):
15 declined(上游原样代码,不在本 PR 改动范围):
|
Review round 3 — resolved (0 code changes)All 18 threads declined — no code changes in this round. 7 threads on our code — all declined with specific reasoning:
11 threads on upstream code — declined per the scope statement in round 2. As stated previously: this PR vendors upstream mobile-next/mobile-mcp as-is via |
Summary
packages/mobile-mcp/viagit subtree add, renamed to@qwen-code/mobile-mcpMOBILE_MCP_COORDINATE_SPACE=1), mirroring cua-driver's approach for mobileChanges
Relative coordinate shim (
src/coord-norm.ts, ~160 lines):MOBILE_MCP_COORDINATE_SPACE=1enables 0-1000 normalized coordinatesMOBILE_MCP_COORDINATE_SCALEconfigurable (default 1000, 999 formobile_use)Android enhancements:
mobile_install_app:-r/-g/-d/-tinstall flagsmobile_ui_dump: full UIAutomator XML hierarchy dump (complementsmobile_list_elements_on_screen)mobile_adb_pull/mobile_adb_push: file transfer via ADBInfrastructure:
cd-mobile-mcp.yml: npm publish workflow (tagmobile-mcp-v*)scripts/sync-from-upstream.sh:git subtree pullfor upstream sync.vendored-from/.vendored-patches.md: vendoring metadataeslint.config.js: excludepackages/mobile-mcpfrom root lint (vendored code has own eslint)Test plan
tsc --noEmitzero errorsnpm run buildpasses