Skip to content

Conversation

@dgozman
Copy link
Contributor

@dgozman dgozman commented Sep 19, 2025

Upon capturing aria snapshot for a tab, we also diff it against a previous one. If the diff is small enough, mcp tool responds with the diff, otherwise it includes the full snapshot.

Example response:

- Page Snapshot Diff:
The following refs have changed

```yaml
button "Button 1" [active] [ref=e2]
``

```yaml
button "Button 2" [ref=e3]
``

```yaml
listitem [ref=e5]:
      - text: Filler 0
      - button "new button" [ref=e105]
``

@github-actions

This comment has been minimized.

@dgozman dgozman force-pushed the feat-mcp-snapshot-diff branch from 6b0df62 to ff33efa Compare September 19, 2025 20:26
@github-actions

This comment has been minimized.

- Page Snapshot:
\`\`\`yaml
- button "Button"`),
- Page Title: Title`),
Copy link
Member

Choose a reason for hiding this comment

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

I'd say if the dom did not change we should not include the snapshot at all, along with url / title.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll follow up in a separate PR.

Upon capturing aria snapshot for a tab, we also diff it
against a previous one. If the diff is small enough, mcp tool
responds with the diff, otherwise it includes the full snapshot.

Example response:

```
- Page Snapshot Diff:
The following refs have changed

'''yaml
button "Button 1" [active] [ref=e2]
'''

'''yaml
button "Button 2" [ref=e3]
'''

'''yaml
listitem [ref=e5]:
      - text: Filler 0
      - button "new button" [ref=e105]
'''
```
@dgozman dgozman force-pushed the feat-mcp-snapshot-diff branch from ff33efa to 1273667 Compare September 22, 2025 10:14
@github-actions

This comment has been minimized.

@dgozman dgozman force-pushed the feat-mcp-snapshot-diff branch from 1273667 to d69aa34 Compare September 22, 2025 11:50
@github-actions
Copy link
Contributor

Test results for "tests 1"

2 failed
❌ [playwright-test] › reporter-html.spec.ts:2999 › merged › execSync doesnt produce a second stdout attachment @macos-latest-node18-2
❌ [playwright-test] › playwright.trace.spec.ts:788 › should not throw when merging traces multiple times @ubuntu-latest-node22-1

4 flaky ⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:1079 › cli codegen › should not throw csp directive violation errors `@firefox-ubuntu-22.04-node18`
⚠️ [firefox-page] › page/page-wait-for-function.spec.ts:104 › should work with strict CSP policy `@firefox-ubuntu-22.04-node18`
⚠️ [playwright-test] › ui-mode-test-output.spec.ts:80 › should show console messages for test `@macos-latest-node18-1`
⚠️ [playwright-test] › ui-mode-test-output.spec.ts:117 › should collapse repeated console messages for test `@macos-latest-node18-1`

46969 passed, 821 skipped


Merge workflow run.

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