Repository navigation
feat: add webp screenshot format from upstream Playwright MCP - #124
JustasMonkev wants to merge 3 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe screenshot tool now supports WebP output, infers omitted formats from filename extensions, applies quality only to JPEG, returns format-specific content types, updates documentation and Playwright versions, and adds validation coverage. ChangesWebP screenshot support
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@package.json`:
- Around line 52-53: Align the `@playwright/test` dependency with playwright and
playwright-core by updating its version to 1.62.0-alpha-2026-07-10 in
package.json, ensuring all Playwright packages resolve to the same version.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 6b6e2e38-2ebd-4fb5-850d-0c4adadd5ea2
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (4)
README.mdpackage.jsonsrc/tools/screenshot.tstests/tools-screenshot.test.ts
| "playwright": "1.62.0-alpha-2026-07-10", | ||
| "playwright-core": "1.62.0-alpha-2026-07-10", |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
@playwright/test version mismatch with playwright/playwright-core.
playwright and playwright-core are bumped to 1.62.0-alpha-2026-07-10, but @playwright/test (Line 61) remains at 1.61.0. This creates a duplicate playwright-core installation in node_modules (1.61.0 via @playwright/test transitive, 1.62.0-alpha direct), which can lead to API mismatches and subtle runtime issues if both are imported in the same process.
🔧 Proposed fix
- "`@playwright/test`": "1.61.0",
+ "`@playwright/test`": "1.62.0-alpha-2026-07-10",Also applies to: 61-61
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@package.json` around lines 52 - 53, Align the `@playwright/test` dependency
with playwright and playwright-core by updating its version to
1.62.0-alpha-2026-07-10 in package.json, ensuring all Playwright packages
resolve to the same version.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 581551918c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Mirror microsoft/playwright#41152 (commit f3114b3): browser_take_screenshot now accepts type 'webp' alongside png/jpeg. Requires playwright 1.62, so the pin moves to 1.62.0-alpha-2026-07-10 until a stable release lands. Closes #123 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VNuK5H15LdnhueURhz1rEq
5815519 to
8703615
Compare
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
README.md (1)
258-258: 🔒 Security & Privacy | 🟡 Minor | ⚡ Quick winPin the Playwright version in the storage-state command.
README.mddocumentsnpx playwright codegen, but the package dependencies use Playwright1.62.0. Pin the CLI command to that version to avoid resolving a different release.Proposed fix
-npx playwright codegen --save-storage=auth.json https://example.com/login +npx playwright@1.62.0 codegen --save-storage=auth.json https://example.com/login🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@README.md` at line 258, Update the documented Playwright storage-state command to invoke version 1.62.0 explicitly, while preserving its existing codegen arguments and URL.Source: Learnings
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@README.md`:
- Line 258: Update the documented Playwright storage-state command to invoke
version 1.62.0 explicitly, while preserving its existing codegen arguments and
URL.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 024a3762-8d1d-4f05-bca2-1ac3d4b3b625
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (4)
README.mdpackage.jsonsrc/tools/screenshot.tstests/tools-screenshot.test.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- package.json
- tests/tools-screenshot.test.ts
- src/tools/screenshot.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 870361541f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 870361541f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b7e5351556
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
Closes #123 by mirroring microsoft/playwright#41152 / commit
f3114b3, now shipped in Playwright 1.62.0.Upstream added WebP screenshot support and made screenshot type optional so it can be inferred from the filename extension.
Changes
playwrightandplaywright-corefrom 1.61.1 to stable 1.62.0.webptobrowser_take_screenshot.png,jpeg, orwebpfrom the filename whentypeis omitted.Why it matters
The downstream tool schema rejected WebP even though stable Playwright supports it. Clients also could not rely on the upstream filename-inference behavior.
Validation
npm test -- tests/tools-screenshot.test.ts— 9 passed.npm run lint.npm run build.npm test— 37 files, 501 tests passed.npm pack --dry-run --json.Summary by CodeRabbit
typeisn’t provided.typevalues.Blocked by upstream ARIA regression
Do not merge this dependency bump yet. A real-browser comparison found that Playwright 1.61.1 preserves the accessible name for the nested-span/aria-hidden-SVG case, while stable 1.62.0 emits an unnamed button.
Upstream fixed the regression in microsoft/playwright#41988 / commit
59120d0, after 1.62.0 was published.Next action: wait for a stable Playwright release containing that fix, update the pin, rerun the focused runtime comparison and full validation, then mark this PR ready.