Skip to content

Conversation

@kvs-coder
Copy link
Collaborator

@kvs-coder kvs-coder commented Jan 13, 2026

extend the jsonrpc call set with 2 additional methods: dump_ui & apps_launch

Summary by CodeRabbit

Release Notes

  • New Features

    • Added dump_ui RPC method for accessing UI structure data
    • Added apps_launch RPC method for launching applications
  • Documentation

    • Comprehensive JSON-RPC API documentation now available, including method descriptions, required parameters, and curl usage examples

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 13, 2026

Walkthrough

Introduces dump_ui and apps_launch JSON-RPC methods for the mobilecli API, including server-side implementations with parameter validation and error handling, alongside comprehensive API documentation describing all available methods, parameters, and usage examples.

Changes

Cohort / File(s) Change Summary
Documentation
docs/jsonrpc_README.md
New JSON-RPC API documentation describing request/response format, base URL, and all registered methods (devices, screenshot, screencapture, io_tap, io_longpress, io_text, io_button, io_swipe, io_gesture, url, device_info, io_orientation_get, io_orientation_set, device_boot/shutdown/reboot, dump_ui, apps_launch) with parameter definitions and curl examples.
Server Implementation
server/server.go
Added dump_ui and apps_launch JSON-RPC methods with corresponding handlers and parameter types (DumpUIParams, AppsLaunchParams). Includes parameter validation, error handling, and command routing to DumpUICommand and LaunchAppCommand.
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main changes: adding two new JSON-RPC methods (dump_ui and apps_launch) with clear, concise phrasing that aligns with the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@kvs-coder kvs-coder changed the title launch, dump ui feat: jsonrpc add methods - launch, dump ui Jan 13, 2026
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
docs/jsonrpc_README.md (1)

27-145: Consider fixing markdown lint warnings if linting is enforced in CI.

Static analysis flagged hard tabs (MD010) and list indentation (MD007) throughout the file. If your project enforces markdown linting, you may want to:

  • Replace tabs with spaces
  • Adjust nested list indentation (2-space for first level, 4-space for second level)

This is purely cosmetic and the documentation is otherwise well-structured.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 33e663d and b1a5de7.

📒 Files selected for processing (2)
  • docs/jsonrpc_README.md
  • server/server.go
🧰 Additional context used
🧬 Code graph analysis (1)
server/server.go (2)
commands/dump.go (2)
  • DumpUIRequest (9-12)
  • DumpUICommand (21-59)
commands/apps.go (2)
  • AppRequest (8-11)
  • LaunchAppCommand (14-32)
🪛 markdownlint-cli2 (0.18.1)
docs/jsonrpc_README.md

13-13: Hard tabs
Column: 1

(MD010, no-hard-tabs)


14-14: Hard tabs
Column: 1

(MD010, no-hard-tabs)


15-15: Hard tabs
Column: 1

(MD010, no-hard-tabs)


16-16: Hard tabs
Column: 1

(MD010, no-hard-tabs)


27-27: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


27-27: Hard tabs
Column: 1

(MD010, no-hard-tabs)


28-28: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


28-28: Hard tabs
Column: 1

(MD010, no-hard-tabs)


29-29: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


29-29: Hard tabs
Column: 1

(MD010, no-hard-tabs)


30-30: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


30-30: Hard tabs
Column: 1

(MD010, no-hard-tabs)


31-31: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


31-31: Hard tabs
Column: 1

(MD010, no-hard-tabs)


32-32: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


32-32: Hard tabs
Column: 1

(MD010, no-hard-tabs)


39-39: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


39-39: Hard tabs
Column: 1

(MD010, no-hard-tabs)


40-40: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


40-40: Hard tabs
Column: 1

(MD010, no-hard-tabs)


41-41: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


41-41: Hard tabs
Column: 1

(MD010, no-hard-tabs)


42-42: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


42-42: Hard tabs
Column: 1

(MD010, no-hard-tabs)


43-43: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


43-43: Hard tabs
Column: 1

(MD010, no-hard-tabs)


44-44: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


44-44: Hard tabs
Column: 1

(MD010, no-hard-tabs)


51-51: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


51-51: Hard tabs
Column: 1

(MD010, no-hard-tabs)


52-52: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


52-52: Hard tabs
Column: 1

(MD010, no-hard-tabs)


53-53: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


53-53: Hard tabs
Column: 1

(MD010, no-hard-tabs)


54-54: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


54-54: Hard tabs
Column: 1

(MD010, no-hard-tabs)


55-55: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


55-55: Hard tabs
Column: 1

(MD010, no-hard-tabs)


56-56: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


56-56: Hard tabs
Column: 1

(MD010, no-hard-tabs)


57-57: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


57-57: Hard tabs
Column: 1

(MD010, no-hard-tabs)


60-60: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


60-60: Hard tabs
Column: 1

(MD010, no-hard-tabs)


61-61: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


61-61: Hard tabs
Column: 1

(MD010, no-hard-tabs)


62-62: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


62-62: Hard tabs
Column: 1

(MD010, no-hard-tabs)


63-63: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


63-63: Hard tabs
Column: 1

(MD010, no-hard-tabs)


64-64: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


64-64: Hard tabs
Column: 1

(MD010, no-hard-tabs)


65-65: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


65-65: Hard tabs
Column: 1

(MD010, no-hard-tabs)


72-72: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


72-72: Hard tabs
Column: 1

(MD010, no-hard-tabs)


73-73: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


73-73: Hard tabs
Column: 1

(MD010, no-hard-tabs)


74-74: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


74-74: Hard tabs
Column: 1

(MD010, no-hard-tabs)


75-75: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


75-75: Hard tabs
Column: 1

(MD010, no-hard-tabs)


76-76: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


76-76: Hard tabs
Column: 1

(MD010, no-hard-tabs)


77-77: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


77-77: Hard tabs
Column: 1

(MD010, no-hard-tabs)


80-80: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


80-80: Hard tabs
Column: 1

(MD010, no-hard-tabs)


81-81: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


81-81: Hard tabs
Column: 1

(MD010, no-hard-tabs)


82-82: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


82-82: Hard tabs
Column: 1

(MD010, no-hard-tabs)


83-83: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


83-83: Hard tabs
Column: 1

(MD010, no-hard-tabs)


86-86: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


86-86: Hard tabs
Column: 1

(MD010, no-hard-tabs)


87-87: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


87-87: Hard tabs
Column: 1

(MD010, no-hard-tabs)


88-88: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


88-88: Hard tabs
Column: 1

(MD010, no-hard-tabs)


89-89: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


89-89: Hard tabs
Column: 1

(MD010, no-hard-tabs)


92-92: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


92-92: Hard tabs
Column: 1

(MD010, no-hard-tabs)


93-93: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


93-93: Hard tabs
Column: 1

(MD010, no-hard-tabs)


94-94: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


94-94: Hard tabs
Column: 1

(MD010, no-hard-tabs)


95-95: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


95-95: Hard tabs
Column: 1

(MD010, no-hard-tabs)


98-98: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


98-98: Hard tabs
Column: 1

(MD010, no-hard-tabs)


99-99: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


99-99: Hard tabs
Column: 1

(MD010, no-hard-tabs)


100-100: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


100-100: Hard tabs
Column: 1

(MD010, no-hard-tabs)


101-101: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


101-101: Hard tabs
Column: 1

(MD010, no-hard-tabs)


104-104: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


104-104: Hard tabs
Column: 1

(MD010, no-hard-tabs)


105-105: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


105-105: Hard tabs
Column: 1

(MD010, no-hard-tabs)


106-106: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


106-106: Hard tabs
Column: 1

(MD010, no-hard-tabs)


107-107: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


107-107: Hard tabs
Column: 1

(MD010, no-hard-tabs)


110-110: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


110-110: Hard tabs
Column: 1

(MD010, no-hard-tabs)


111-111: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


111-111: Hard tabs
Column: 1

(MD010, no-hard-tabs)


112-112: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


112-112: Hard tabs
Column: 1

(MD010, no-hard-tabs)


113-113: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


113-113: Hard tabs
Column: 1

(MD010, no-hard-tabs)


120-120: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


120-120: Hard tabs
Column: 1

(MD010, no-hard-tabs)


121-121: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


121-121: Hard tabs
Column: 1

(MD010, no-hard-tabs)


122-122: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


122-122: Hard tabs
Column: 1

(MD010, no-hard-tabs)


125-125: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


125-125: Hard tabs
Column: 1

(MD010, no-hard-tabs)


126-126: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


126-126: Hard tabs
Column: 1

(MD010, no-hard-tabs)


127-127: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


127-127: Hard tabs
Column: 1

(MD010, no-hard-tabs)


128-128: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


128-128: Hard tabs
Column: 1

(MD010, no-hard-tabs)


131-131: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


131-131: Hard tabs
Column: 1

(MD010, no-hard-tabs)


132-132: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


132-132: Hard tabs
Column: 1

(MD010, no-hard-tabs)


133-133: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


133-133: Hard tabs
Column: 1

(MD010, no-hard-tabs)


136-136: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


136-136: Hard tabs
Column: 1

(MD010, no-hard-tabs)


137-137: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


137-137: Hard tabs
Column: 1

(MD010, no-hard-tabs)


138-138: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


138-138: Hard tabs
Column: 1

(MD010, no-hard-tabs)


139-139: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


139-139: Hard tabs
Column: 1

(MD010, no-hard-tabs)


142-142: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


142-142: Hard tabs
Column: 1

(MD010, no-hard-tabs)


143-143: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


143-143: Hard tabs
Column: 1

(MD010, no-hard-tabs)


144-144: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


144-144: Hard tabs
Column: 1

(MD010, no-hard-tabs)


145-145: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


145-145: Hard tabs
Column: 1

(MD010, no-hard-tabs)


157-157: Hard tabs
Column: 1

(MD010, no-hard-tabs)


158-158: Hard tabs
Column: 1

(MD010, no-hard-tabs)


165-165: Hard tabs
Column: 1

(MD010, no-hard-tabs)


166-166: Hard tabs
Column: 1

(MD010, no-hard-tabs)


173-173: Hard tabs
Column: 1

(MD010, no-hard-tabs)


174-174: Hard tabs
Column: 1

(MD010, no-hard-tabs)


181-181: Hard tabs
Column: 1

(MD010, no-hard-tabs)


182-182: Hard tabs
Column: 1

(MD010, no-hard-tabs)


189-189: Hard tabs
Column: 1

(MD010, no-hard-tabs)


190-190: Hard tabs
Column: 1

(MD010, no-hard-tabs)


197-197: Hard tabs
Column: 1

(MD010, no-hard-tabs)


198-198: Hard tabs
Column: 1

(MD010, no-hard-tabs)


205-205: Hard tabs
Column: 1

(MD010, no-hard-tabs)


206-206: Hard tabs
Column: 1

(MD010, no-hard-tabs)


213-213: Hard tabs
Column: 1

(MD010, no-hard-tabs)


214-214: Hard tabs
Column: 1

(MD010, no-hard-tabs)


221-221: Hard tabs
Column: 1

(MD010, no-hard-tabs)


222-222: Hard tabs
Column: 1

(MD010, no-hard-tabs)


229-229: Hard tabs
Column: 1

(MD010, no-hard-tabs)


230-230: Hard tabs
Column: 1

(MD010, no-hard-tabs)


237-237: Hard tabs
Column: 1

(MD010, no-hard-tabs)


238-238: Hard tabs
Column: 1

(MD010, no-hard-tabs)


245-245: Hard tabs
Column: 1

(MD010, no-hard-tabs)


246-246: Hard tabs
Column: 1

(MD010, no-hard-tabs)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: lint
🔇 Additional comments (7)
server/server.go (5)

187-190: LGTM!

The new switch cases for dump_ui and apps_launch follow the established pattern used by other handlers in this file.


462-470: LGTM!

The parameter structs are well-defined and correctly map to the underlying command request types. The omitempty tag on Format appropriately marks it as optional.


683-704: LGTM!

The handler follows the established pattern in this file. Parameter validation, unmarshalling, command invocation, and error propagation are all correctly implemented.


706-727: LGTM!

The handler correctly maps to commands.LaunchAppCommand. The bundleId validation is handled by the command layer (per the relevant snippet showing if req.BundleID == "" { return NewErrorResponse(...) }), which is an acceptable approach.


840-842: LGTM!

Formatting alignment changes only; no semantic impact.

docs/jsonrpc_README.md (2)

135-145: LGTM!

The documentation for dump_ui and apps_launch accurately reflects the implementation in server.go and the underlying command layer. The parameter descriptions and required field annotations are correct.


233-247: LGTM!

The curl examples for dump_ui and apps_launch correctly demonstrate the expected request format and parameter structures.

@gmegidish gmegidish merged commit 5163c8a into main Jan 13, 2026
15 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.

3 participants