Skip to content

Conversation

@eglitise
Copy link
Collaborator

This is a major enhancement to the Commands tab, adding the ability to retrieve the active driver's supported commands directly from the driver, and generate the visible command buttons from this response. Note that since the Inspector relies on WDIO for running any command, the visible commands are filtered only to those supported by WDIO.

Many other related enhancements are also included:

  • Retrieve and run the active driver's supported execute methods
  • Retrieve and run the commands and execute methods added by any active plugins (the WDIO support limitation still applies for commands)
  • Filter the commands/methods using a search bar
  • Show command/method specific information (deprecated status, info text, required status for any parameters)
  • Keep the existing predefined commands list if no commands/methods can be retrieved (e.g. Appium <2.16)
  • Add unit tests and update documentation

Functionality was tested on Appium 3.1.0, 2.19.0 and 2.15.0, with UiAutomator2 and XCUITest drivers.

Here's a brief demo:

commands-tab.mp4

… result

also remove handling for notes and driver-specific command exclusion
Copilot finished reviewing on behalf of eglitise November 11, 2025 08:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the Commands tab to dynamically retrieve and execute commands/methods from active Appium drivers and plugins, replacing the static command list for Appium 2.16.0+.

Key changes:

  • Introduced dynamic command retrieval using getAppiumCommands and getAppiumExtensions endpoints
  • Added utilities for transforming driver responses and filtering methods
  • Implemented a searchable interface with separate tabs for commands and execute methods
  • Maintained backward compatibility with a static fallback for older Appium versions

Reviewed Changes

Copilot reviewed 16 out of 22 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
app/common/renderer/utils/commands-tab.js New utility functions for parsing, filtering, and transforming command/method maps from driver responses
test/unit/utils-commands-tab.spec.js Comprehensive test suite covering the new utility functions
app/common/renderer/components/SessionInspector/CommandsTab/Commands.jsx Refactored to support dynamic command loading with parameter handling
app/common/renderer/components/SessionInspector/CommandsTab/MethodMapCommandsList.jsx New component for rendering dynamic command lists with search and filtering
app/common/renderer/components/SessionInspector/CommandsTab/StaticCommandsList.jsx Extracted static command list for backward compatibility
app/common/renderer/constants/commands.js Added mappings for Appium-to-WDIO command names and mismatched parameter formats
docs/session-inspector/commands.md Updated documentation explaining dynamic command retrieval and limitations
docs/quickstart/requirements.md Updated recommended driver versions to latest major releases

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@KazuCocoa KazuCocoa left a comment

Choose a reason for hiding this comment

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

(I haven't fully walked through the PR yet, but just a 🦶)

return mapped.filter((v) => !isEmptyObject(v));
const recurse = (arr) => arr.map(deepFilterEmpty);
const clean = (arr) => arr.filter(_.negate(isEmptyObject));
const recurseAndClean = _.flow([recurse, clean]);
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

return _.pickBy(mapped, (v) => !isEmptyObject(v));
const recurse = (obj) => _.mapValues(obj, deepFilterEmpty);
const clean = (obj) => _.pickBy(obj, _.negate(isEmptyObject));
const recurseAndClean = _.flow([recurse, clean]);
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe this part could be extracted to avoid duplication

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think this is fine, since it's only 2 lines that are only duplicated once

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

Labels

documentation Improvements or additions to documentation enhancement New feature or request i18n Translation changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants