fix(computer-server): MCP handler consistency and uiautomator fix - #881
Merged
Conversation
- Use automation_handler.get_screen_size() instead of PIL.ImageGrab - Use automation_handler.get_cursor_position() instead of pynput - Ensures MCP and HTTP API follow the same code path
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
rowingchenn
pushed a commit
to cua-verse/cua
that referenced
this pull request
Jan 23, 2026
…ycua#881) * fix(computer-server): strip uiautomator status message before parsing XML * fix(mcp-server): use handlers instead of hardcoded desktop libraries - Use automation_handler.get_screen_size() instead of PIL.ImageGrab - Use automation_handler.get_cursor_position() instead of pynput - Ensures MCP and HTTP API follow the same code path
This was referenced Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two fixes that were pushed after PR #880 was merged:
MCP server handler consistency - Use
automation_handler.get_screen_size()andget_cursor_position()instead of hardcoded PIL.ImageGrab and pynput. This ensures MCP and HTTP API follow the same code path.uiautomator XML parsing fix - Strip the status message ("UI hierchary dumped to: ...") before parsing the XML output from
uiautomator dump.Test plan
get_screen_sizereturns correct Android resolution (not VNC resolution)computer_clickuses correct coordinatesget_accessibility_treeworks on Android