Skip to content

Conversation

@gmegidish
Copy link
Member

@gmegidish gmegidish commented Jan 13, 2026

Summary by CodeRabbit

  • New Features
    • New apps_terminate RPC method enables remote termination of running applications on specified devices using device ID and bundle identifier parameters
    • New apps_list RPC method enables discovery of installed applications on devices with optional device ID-based filtering
    • API documentation expanded with complete method descriptions, parameter specifications, and practical curl examples for both new endpoints

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

@coderabbitai
Copy link

coderabbitai bot commented Jan 13, 2026

Walkthrough

This PR adds two new JSON-RPC methods: apps_terminate for terminating running apps and apps_list for listing installed apps on a device. Changes include updated documentation with curl examples and new server-side handler implementations with parameter validation and request routing.

Changes

Cohort / File(s) Summary
Documentation
docs/jsonrpc_README.md
Adds RPC method documentation and curl examples for apps_terminate and apps_list, with parameter descriptions for deviceId and bundleId.
Server Implementation
server/server.go
Introduces AppsTerminateParams and AppsListParams structs; adds handleAppsTerminate and handleAppsList functions; extends JSON-RPC dispatcher with cases for routing "apps_terminate" and "apps_list" requests.

Possibly related PRs

🚥 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 pull request title accurately and specifically describes the main change: adding two new RPC methods (apps_list and apps_terminate) to both documentation and server code.

✏️ 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.

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 (2)
server/server.go (1)

476-483: Consider reusing existing command types for JSON unmarshalling.

AppsTerminateParams and AppsListParams have identical structures to commands.AppRequest and commands.ListAppsRequest respectively. You could unmarshal directly into those types to reduce duplication, as the JSON tags match.

That said, the current approach provides layer separation between JSON-RPC params and command requests, which is also valid.

docs/jsonrpc_README.md (1)

259-273: Minor: duplicate request ID in examples.

The apps_terminate curl example uses "id":21 which is also used by the device_info example above (line 241). Consider using a unique ID like "id":23 for clarity, though this doesn't affect functionality.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5163c8a and bb15176.

📒 Files selected for processing (2)
  • docs/jsonrpc_README.md
  • server/server.go
🧰 Additional context used
🧬 Code graph analysis (1)
server/server.go (1)
commands/apps.go (4)
  • AppRequest (8-11)
  • TerminateAppCommand (35-53)
  • ListAppsRequest (56-58)
  • ListAppsCommand (61-73)
🪛 markdownlint-cli2 (0.18.1)
docs/jsonrpc_README.md

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

(MD007, ul-indent)


148-148: Hard tabs
Column: 1

(MD010, no-hard-tabs)


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

(MD007, ul-indent)


149-149: Hard tabs
Column: 1

(MD010, no-hard-tabs)


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

(MD007, ul-indent)


150-150: Hard tabs
Column: 1

(MD010, no-hard-tabs)


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

(MD007, ul-indent)


151-151: Hard tabs
Column: 1

(MD010, no-hard-tabs)


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

(MD007, ul-indent)


154-154: Hard tabs
Column: 1

(MD010, no-hard-tabs)


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

(MD007, ul-indent)


155-155: Hard tabs
Column: 1

(MD010, no-hard-tabs)


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

(MD007, ul-indent)


156-156: Hard tabs
Column: 1

(MD010, no-hard-tabs)


264-264: Hard tabs
Column: 1

(MD010, no-hard-tabs)


265-265: Hard tabs
Column: 1

(MD010, no-hard-tabs)


272-272: Hard tabs
Column: 1

(MD010, no-hard-tabs)


273-273: 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). (2)
  • GitHub Check: build_on_linux
  • GitHub Check: build_on_windows
🔇 Additional comments (4)
server/server.go (3)

191-194: LGTM!

The new method routing follows the established pattern and is correctly placed in the dispatcher switch statement.


742-763: LGTM!

The handler follows the established pattern from handleAppsLaunch and correctly validates params, unmarshals, constructs the command request, and handles errors consistently.


765-783: LGTM!

The handler correctly treats deviceId as optional by not requiring params, matching the documented behavior. This is consistent with how handleDevicesList handles optional parameters.

docs/jsonrpc_README.md (1)

147-156: LGTM!

The documentation for apps_terminate and apps_list follows the established format and accurately reflects the handler implementations. The parameter requirements match the code (bundleId required for terminate, deviceId optional for both).

@gmegidish gmegidish merged commit a6d638b 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.

2 participants