Repository navigation
docs(visual-testing): update for @metamask/client-mcp-core 0.16.1 - #328
Merged
Merged
Conversation
2 of 7 tasks
cryptotavares
marked this pull request as ready for review
December 3, 2026 16:58
LabinatorSolutions
pushed a commit
to LabinatorSolutions/metamask-extension
that referenced
this pull request
Dec 4, 2026
## **Description** > **Summary:** Bumps the dev-only `@metamask/client-mcp-core` from 0.16.0 to [0.16.1](https://github.com/MetaMask/client-mcp-core/releases/tag/v0.16.1). On the Extension, `mm <command> --help` prints help instead of running the command, and `mm screenshot --selector --timeout` waits for a late element. Refs stay stamped after a navigation. No app or test code changes. Follows [MetaMask#48425](MetaMask#48425) (0.16.0). Sibling skill PR: [MetaMask/skills#328](MetaMask/skills#328). ### What changes | File | Change | |---|---| | `package.json` | `@metamask/client-mcp-core` `0.16.0` → `0.16.1` (exact pin, `devDependencies`) | | `yarn.lock` | `client-mcp-core` 0.16.1; its dependency `@metamask/device-mcp` `^0.9.0` → `^0.10.0` (resolves to 0.10.0). No other entries change. | | `test/e2e/playwright/llm-workflow/README.md` | The `--preset` note drops the version. The daemon-log example names the target (`testid=…`). | ### What 0.16.1 changes for the Extension (checked live, see Testing) | Area | 0.16.0 | 0.16.1 | |---|---|---| | `mm launch --help`, `mm stop --help`, `mm click --help` | Runs the command (launches, stops the daemon, clicks test ID `--help`) | Prints help, exit 0, runs nothing ([MetaMask#137](MetaMask/client-mcp-core#137)) | | `mm screenshot --selector X --timeout <ms>`, X appears late | `MM_TARGET_NOT_FOUND` after 2 s | Waits up to `<ms>` and captures ([MetaMask#139](MetaMask/client-mcp-core#139)) | | Refs and observation after a navigation | Refs could fall back to `role=`/`text=`; the observation could show the old route | Refs are stamped; the observation shows the new route ([MetaMask#131](MetaMask/client-mcp-core#131)) | ### Decisions | Decision | Why | |---|---| | No `allow-scripts` / LavaMoat policy change | Both packages are dev-only. `yarn allow-scripts list` reports no unconfigured packages. | | No change to `test/e2e/playwright/llm-workflow` code | `yarn lint:tsc` and the llm-workflow jest suites pass without code changes. | ### Review guide 1. `package.json` and `yarn.lock`: a version bump only (+10/−10 in the lockfile). 2. `README.md`: two sentences. Both match the live run below. ## **Changelog** CHANGELOG entry: null ## **Related issues** Fixes: N/A. Core release: https://github.com/MetaMask/client-mcp-core/releases/tag/v0.16.1 ## **Manual testing steps** 1. `yarn install`, then `yarn webpack:tsc && yarn build:test`. 2. Run `yarn mm launch --help`. Check that it prints help and that no `.mm-server` file appears. 3. `MM_HEADLESS=true yarn mm launch --context e2e --state default`, then unlock. 4. Add an element after a few seconds with `yarn mm cdp Runtime.evaluate` (`setTimeout`). Run `yarn mm screenshot --selector '<css>' --timeout 10000`. Check that it captures the element. 5. `yarn mm navigate-settings --observe full`. Check that the observation lists the settings test IDs. 6. `yarn mm cleanup && yarn mm stop`. <!-- ## **Screenshots/Recordings** ### **Before** ### **After** --> <details> <summary>Testing details</summary> Node v26.13.1 (`.nvmrc`). | Check | Result | |---|---| | `yarn install --immutable` | exit 0 | | `yarn dedupe --check` | exit 0 | | `yarn lint:lockfile` | pass | | `yarn allow-scripts list` | unconfigured packages: none | | `yarn lint:tsc` | exit 0 | | `yarn jest test/e2e/playwright/llm-workflow` | 13 suites, 169 tests pass | | oxfmt (README), prettier (`package.json`) | pass | Live run with the 0.16.1 `mm` against a 13.60.0.0 test build (headless, `--context e2e --state default`). `.mm-server` reports `"version":"0.16.1"`. The run followed only the sibling skill ([skills#328](MetaMask/skills#328)). | Command | Result | |---|---| | `mm launch --help`, `mm stop --help`, `mm click --help` (no daemon) | exit 0, usage, no `.mm-server` | | `mm stop --help`, `mm cleanup --help` (daemon up) | exit 0; `mm status` shows the same daemon PID | | `mm frobnicate` | exit 2, `MM_INVALID_INPUT` | | `screenshot --selector '#late' --timeout 10000`, element added after 4 s | exit 0, 4.26 s | | `screenshot --selector '#late'`, same injection | exit 4, `MM_TARGET_NOT_FOUND`, `matched 0 elements after 2000ms`, 2.18 s | | `navigate-home` → `navigate-settings --observe full` (×5) | 5 of 5 show the settings test IDs and no home test IDs | | `navigate-home --observe none`, then `describe-screen` (×5) | 16 nodes, 16 elements with `data-mm-ref` each time | | `mock-network requests --url esplora` | `https://bitcoin-mainnet.infura.io/v3/[REDACTED]/esplora/blocks?apiKey=[REDACTED]` | | `mm launch --state custom --preset withMultipleAccounts` | `Warning: unknown launch flag '--preset'`, then `MM_LAUNCH_FAILED` | | `.mm-daemon.log` | `POST /tool/click 200 ok=false code=MM_TARGET_NOT_FOUND testid=does-not-exist 2078ms` | </details> ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Dev-only dependency and documentation updates; no production app logic or security-sensitive paths changed. > > **Overview** > Bumps the dev-only **`@metamask/client-mcp-core`** pin from `0.16.0` to **`0.16.1`** in `package.json` and `yarn.lock`, which also resolves its dependency **`@metamask/device-mcp`** to `0.10.0`. No extension or test source changes. > > The **`llm-workflow` README** is updated to match 0.16.1 behavior: daemon log lines now document the **target** (e.g. `testid=…`), and the custom-launch note drops a stale version reference for `--preset`. > > Downstream, **`mm --help`** on subcommands prints usage instead of executing the command, **`mm screenshot --selector --timeout`** honors the wait window for late elements, and **refs/observation** stay correct after navigation—behavior that lives in the bumped package, not this repo. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit fe29d1d. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
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.
Description
Part of the mm CLI v2 effort.
Pairs with the Extension bump metamask-extension#48494. Follows #316 (0.16.0).
Problem
MM_TARGET_NOT_FOUND, also with a longer--timeout; …mm wait-forit first"screenshot --selector '#late' --timeout 10000, element added after 4 s: captured, exit 0, 4.1 s (#139)get-text --frame … --selector body--frame testid:advanced-chart-iframe --selector canvasmatches 0 elements;--selector iframeand#tv_chart_containerwork (#138)What changes
All files are under
domains/testing/skills/visual-testing/.references/cli-reference.md› Why a click failed, screenshots--timeout: 2 sMM_TARGET_NOT_FOUND. With it: waits that longreferences/cli-reference.md› Iframes--frameenters one level; target the nested iframe or#tv_chart_containerreferences/error-recovery.mdMM_TARGET_NOT_FOUNDrow; screenshot row: retry with--timeoutrepos/metamask-extension.mdMM_SCREENSHOT_FAILEDbullet; chart paragraphCHANGELOG.md[Unreleased]entryDecisions
role=/text=refs only for elements that cannot be stamped, which is still true. It never says refs fall back after a page load, or that the observation shows the old screen.mm <command> --help)<command> --help.^0.10.0)Review: read
references/cli-reference.md› Element, iframe and viewport screenshots first.Type of Change
Skill Details (if adding a new skill)
N/A
Checklist
Testing
yarn lintyarn testyarn audit:skillsmain)git diff --checkLive check
Extension worktree of metamask-extension#48494 (npm
@metamask/client-mcp-core0.16.1;.mm-server"version":"0.16.1"), test build 13.60.0.0, headless,--context e2e --state default, unlocked. Nothing was confirmed or signed. The agent followed only this skill.screenshot --selector '#late' --timeout 10000, element added after 4 sscreenshot --selector '#late', same injectionSelector #late matched 0 elements after 2000ms, 2.18 sscreenshot --selector '#never' --timeout 3000matched 0 elements after 3000msscreenshot --selector head --timeout 3000MM_SCREENSHOT_FAILEDscreenshot --frame testid:late-frame --selector '#inner' --timeout 10000, iframe added after 3.5 sscreenshot --frame testid:does-not-existhover --frame testid:advanced-chart-iframe --selector iframehovered: trueget-text/wait-for --frame testid:advanced-chart-iframe --selector '#tv_chart_container'hover … --selector canvas --timeout 3000… >> canvas matched 0 elements after 3000msdescribe-screen --frame testid:advanced-chart-iframenodes: []screenshot --frame testid:advanced-chart-iframenavigate-home→navigate-settings --observe full(×5)navigate-home --observe none, thendescribe-screen(×5)[data-mm-ref]elementsmm launch --help,mm stop --help,mm click --helpmm frobnicateMM_INVALID_INPUT, no.mm-servermock-network requests --url esplora…/v3/[REDACTED]/esplora/blocks?apiKey=[REDACTED].mm-daemon.logPOST /tool/screenshot 200 ok=true selector=#late file=late-timeout-….png 4117msAdditional Context