Repository navigation
docs: fix the chart iframe examples in SKILL.md - #138
Merged
Merged
Conversation
cryptotavares
marked this pull request as ready for review
December 2, 2026 13:03
itsyoboieltr
approved these changes
Dec 2, 2026
7 of 11 tasks
cryptotavares
added a commit
to MetaMask/skills
that referenced
this pull request
Dec 4, 2026
## Description Part of the mm CLI v2 effort. > **Summary:** Updates the Extension `testing/visual-testing` skill for `@metamask/client-mcp-core` [0.16.1](https://github.com/MetaMask/client-mcp-core/releases/tag/v0.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](MetaMask/metamask-extension#48494). Follows [#316](#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](MetaMask/client-mcp-core#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](MetaMask/client-mcp-core#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 - [x] Skill improvement/update - [ ] Bug fix - [ ] Documentation update - [ ] Other (please describe): ## Skill Details (if adding a new skill) N/A ## Checklist - [x] I have read the [CONTRIBUTING.md](https://github.com/MetaMask/skills/blob/main/CONTRIBUTING.md) guidelines - [x] My skill follows the [SKILL_TEMPLATE.md](https://github.com/MetaMask/skills/blob/main/.github/SKILL_TEMPLATE.md) format - [x] I have tested this skill with an AI agent - [x] My skill does not contain any secrets, private keys, or sensitive data - [x] I have added appropriate documentation - [x] 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 | <details> <summary>Live check</summary> 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` | </details> ## Additional Context - Core release: https://github.com/MetaMask/client-mcp-core/releases/tag/v0.16.1 - Extension bump: MetaMask/metamask-extension#48494 - Previous update (0.16.0): #316
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.
Part of the mm CLI v2 effort.
Problem
SKILL.mdshowed commands against the Extension advanced chart that cannot work as written.--frameenters one iframe level. Theadvanced-chart-iframewrapper resolves to the chart page iframe, and the TradingView canvas is in a further, nested iframe. Sohover --frame … --selector canvasmatches nothing.Live check on core
0.16.0with the Extension test build:Also,
"No chart data"is the Extension's own empty state. It renders instead of the iframe, so a--framewait for it cannot work.What changes
describe-screen --framecommenthover --selectorcanvasiframe(the nested iframe that holds the canvas)get-text --selector'<css in the chart>''#tv_chart_container'wait-for --selector'text=No chart data''#tv_chart_container'--frameenters one iframe level, so target the nested iframe elementDocs only.
yarn lintpasses.Review: read the "Inside iframes (browser)" section in
SKILL.md.Testing
Live check on the Extension test build (
MM_HEADLESS=true, contexte2e) with core0.16.0+204f4091via yalc:mm hover --frame testid:advanced-chart-iframe --selector iframehovered: truemm get-text --frame testid:advanced-chart-iframe --selector '#tv_chart_container'text: "\n\t"mm wait-for --frame testid:advanced-chart-iframe --selector '#tv_chart_container'found: truemm screenshot --frame testid:advanced-chart-iframemm describe-screen --frame testid:advanced-chart-iframeWith an empty OHLCV mock,
chart-error-stateshows "No chart data" andadvanced-chart-iframeis absent.