Repository navigation
Description
Summary
Automated upstream-monitoring run (2026-07-10) against microsoft/playwright, focused on Playwright MCP changes.
Baseline for this run was the last mirrored change, #121 → upstream microsoft/playwright#41676 (commit 39a418a, CDP noDefaults). One newer upstream MCP change is relevant to a tool this repo directly mirrors, but it cannot be mirrored yet because it depends on a Playwright core release we don't pin — hence an issue rather than a PR.
Upstream change
- PR: microsoft/playwright#41152 — feat(screenshot): add webp output format
- Commit:
f3114b3(merged 2026-07-10)
Upstream added 'webp' as an output format to both the core screenshot API (page.screenshot() / locator.screenshot()) and the MCP browser_take_screenshot tool. The tool's schema changed from z.enum(['png', 'jpeg']) to z.enum(['png', 'jpeg', 'webp']), with native WebP encoding wired through CDP (Chromium), Page.screenshot (Firefox), and a WASM libwebp re-encode path for WebKit on macOS.
Why it matters here
This repo mirrors that exact tool in src/tools/screenshot.ts:
- Line 26:
type: z.enum(['png', 'jpeg']).default('png')— nowebp. - Line 28: filename default describes only
{png|jpeg}. - Line 59:
quality: fileType === 'png' ? undefined : 90— would apply to webp as-is. - Line 84:
contentType: fileType === 'png' ? 'image/png' : 'image/jpeg'— would need animage/webpbranch. - Line 58:
type: fileTypeis passed straight intoplaywright.PageScreenshotOptions.
So the tool surface has diverged: users of this MCP server can't request WebP screenshots even though upstream now supports it.
Why this is blocked (needs maintainer decision)
The webp screenshot support is a new Playwright core capability, not just an MCP wrapper change. This repo pins:
"playwright": "1.61.0",
"playwright-core": "1.61.0",
#41152 merged to main on 2026-07-10 and is not part of 1.61.0. On the pinned version, page.screenshot({ type: 'webp' }) would both fail TypeScript typecheck (the type union is 'png' | 'jpeg') and throw at runtime. Mirroring the enum without the underlying support would break browser_take_screenshot.
Mirroring therefore requires bumping playwright / playwright-core to the first release that includes #41152, which the past bump history shows is a deliberate, review-worthy step (e.g. #66f9c6d bumping to 1.61.0, plus the 1.59/1.60 breakage fixes).
Proposed action
When playwright is next bumped to a release containing #41152:
- Add
'webp'to thetypeenum inscreenshotSchemaand update the filename default description to{png|jpeg|webp}. - Add an
image/webpbranch to thecontentTypelogic at line 84. - Confirm
quality: 90is appropriate for webp (matches upstream default handling). - Add/extend coverage in the screenshot tests and update the
browser_take_screenshotsection ofREADME.md.
Keep the change minimal and gated on the version bump — do not add webp to the schema before the pinned Playwright supports it.
Also reviewed this run — no action needed
Other MCP commits merged upstream since the baseline were checked and do not apply to this repo:
- microsoft/playwright#41646 (
a9ae10f, "await init page before screenshot") — addstab.waitForInitialized()for the--init-scriptinit-page feature, which this repo does not implement. - microsoft/playwright#41680 (
142a273, "preserve directory for additional tab videos") — fixes per-tab video filename directory handling; this repo has no video-recording surface. 1fbd702("don't crash the response when navigating closes the last tab") — this repo'ssrc/response.tsalready guards the empty-tabs case (finish()only snapshots whencurrentTabexists;renderTabsMarkdownrenders a graceful "No open tabs" message), so it isn't affected.- microsoft/playwright#41719 ("skip ARIA snapshot serialization when snapshot-mode=none") — still open upstream, and this repo has no
snapshot-modeconfig; re-evaluate if/when it merges.
Activity
JustasMonkev commentedon Jul 19, 2026
Upstream-monitoring update (2026-07-19): still blocked — the recent Playwright bump does not unblock this.
package.jsonnow pinsplaywright/playwright-core1.61.1 (bumped from 1.61.0 in #129 as part of the TypeScript 7 upgrade, not a deliberate feature bump). I verified against the published[email protected]tarball that the screenshottypeunion is still:i.e. microsoft/playwright#41152 (webp screenshot format) is a
main-branch feature that was not cherry-picked into the 1.61.x patch line. Adding'webp'toscreenshotSchemaon 1.61.1 would still fail typecheck (union is'png' | 'jpeg') and throw at runtime.The blocking condition in this issue is unchanged: mirror only once
playwrightis bumped to a release that actually contains #41152 (expected 1.62+). Leaving this open and blocked.Generated by Claude Code
feat: add webp screenshot format from upstream MCP