Skip to content

docs(visual-testing): update for @metamask/client-mcp-core 0.16.1 - #328

Merged
cryptotavares merged 2 commits into
mainfrom
cryptotavares/visual-testing-core-0.16.1
Dec 4, 2026
Merged

cryptotavares merged 2 commits into
mainfrom
cryptotavares/visual-testing-core-0.16.1

Conversation

@cryptotavares

@cryptotavares cryptotavares commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Description

Part of the mm CLI v2 effort.

Summary: Updates the Extension testing/visual-testing skill for @metamask/client-mcp-core 0.16.1. mm screenshot --selector with --timeout now waits for a late element, so the skill stops telling agents to mm wait-for first. The chart notes now say that the canvas is in a nested iframe.

Pairs with the Extension bump metamask-extension#48494. Follows #316 (0.16.0).

Problem

Skill text (0.16.0) 0.16.1 behaviour (live)
"A selector that matches no element within 2 s fails with MM_TARGET_NOT_FOUND, also with a longer --timeout; … mm wait-for it first" screenshot --selector '#late' --timeout 10000, element added after 4 s: captured, exit 0, 4.1 s (#139)
A canvas-only chart iframe: use get-text --frame … --selector body The canvas is in a nested iframe. --frame testid:advanced-chart-iframe --selector canvas matches 0 elements; --selector iframe and #tv_chart_container work (#138)

What changes

All files are under domains/testing/skills/visual-testing/.

File Change Core PR
references/cli-reference.md › Why a click failed, screenshots Without --timeout: 2 s MM_TARGET_NOT_FOUND. With it: waits that long #139
references/cli-reference.md › Iframes --frame enters one level; target the nested iframe or #tv_chart_container #138
references/error-recovery.md MM_TARGET_NOT_FOUND row; screenshot row: retry with --timeout #139
repos/metamask-extension.md MM_SCREENSHOT_FAILED bullet; chart paragraph #139, #138
CHANGELOG.md [Unreleased] entry

Decisions

Decision Why
No change for #131 (refs after a navigation) The skill names 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.
No change for #137 (mm <command> --help) The skill does not mention <command> --help.
No change for #134 (device-mcp ^0.10.0) Mobile only.

Review: read references/cli-reference.md › Element, iframe and viewport screenshots first.

Type of Change

  • New skill
  • Skill improvement/update
  • Bug fix
  • Documentation update
  • Other (please describe):

Skill Details (if adding a new skill)

N/A

Checklist

  • I have read the CONTRIBUTING.md guidelines
  • My skill follows the SKILL_TEMPLATE.md format
  • I have tested this skill with an AI agent
  • My skill does not contain any secrets, private keys, or sensitive data
  • I have added appropriate documentation
  • My changes don't break existing skills

Testing

Check Result
yarn lint exit 0
yarn test 106 tests pass, 0 fail
yarn audit:skills 100 skills, 0 errors, 134 warnings (same count as main)
git diff --check clean
Live check

Extension worktree of metamask-extension#48494 (npm @metamask/client-mcp-core 0.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.

Command Result
screenshot --selector '#late' --timeout 10000, element added after 4 s exit 0, 200×40, 4.26 s
screenshot --selector '#late', same injection exit 4, Selector #late matched 0 elements after 2000ms, 2.18 s
screenshot --selector '#never' --timeout 3000 exit 4, matched 0 elements after 3000ms
screenshot --selector head --timeout 3000 exit 1, MM_SCREENSHOT_FAILED
screenshot --frame testid:late-frame --selector '#inner' --timeout 10000, iframe added after 3.5 s exit 0, 3.52 s
screenshot --frame testid:does-not-exist exit 4 after 2 s
Chart (overlay recipe): hover --frame testid:advanced-chart-iframe --selector iframe hovered: true
get-text / wait-for --frame testid:advanced-chart-iframe --selector '#tv_chart_container' exit 0
hover … --selector canvas --timeout 3000 exit 4, … >> canvas matched 0 elements after 3000ms
describe-screen --frame testid:advanced-chart-iframe nodes: []
screenshot --frame testid:advanced-chart-iframe 798×321, candles drawn
navigate-home → navigate-settings --observe full (×5) settings test IDs, 24 nodes, no home test IDs
navigate-home --observe none, then describe-screen (×5) 16 nodes, 16 [data-mm-ref] elements
mm launch --help, mm stop --help, mm click --help exit 0, usage, no daemon started or stopped
mm frobnicate exit 2, MM_INVALID_INPUT, no .mm-server
mock-network requests --url esplora …/v3/[REDACTED]/esplora/blocks?apiKey=[REDACTED]
.mm-daemon.log POST /tool/screenshot 200 ok=true selector=#late file=late-timeout-….png 4117ms

Additional Context

@seaona seaona left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

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 -->
@cryptotavares
cryptotavares merged commit fc41f69 into main Dec 4, 2026
29 checks passed
@cryptotavares
cryptotavares deleted the cryptotavares/visual-testing-core-0.16.1 branch December 4, 2026 09:45
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