-
Notifications
You must be signed in to change notification settings - Fork 35
Enable patchright based execution #93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Mesa DescriptionOverviewThis PR replaces the Changes
TestingBuild + ran both headful + headless images. Confirmed execution working as expected with curl -sS http://localhost:444/playwright/execute \
-H 'Content-Type: application/json' \
-d '{"code":"await page.goto(\"https://example.com\"); return await page.title();"}'
{"result":"Example Domain","success":true}Description generated by Mesa. Update settings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Performed full review of 18771b2...50d5bb3
Analysis
-
Static imports of both engines create a hard dependency on patchright being installed even when not in use, creating potential module loading failures if patchright installation fails but playwright-core succeeds. Consider implementing dynamic imports.
-
Global removal of automation-related Chromium flags (--enable-automation, --disable-extensions, etc.) affects both playwright-core and patchright modes. These changes may impact existing automation scripts and should potentially be conditional based on the selected engine.
-
Lack of validation for PLAYWRIGHT_ENGINE environment variable values could lead to silent failures with typos.
-
Missing documentation for the PLAYWRIGHT_ENGINE variable and its valid values makes adoption and troubleshooting difficult.
Tip
Help
Slash Commands:
/review- Request a full code review/review latest- Review only changes since the last review/describe- Generate PR description. This will update the PR body or issue comment depending on your configuration/help- Get help with Mesa commands and configuration options
6 files reviewed | 0 comments | Edit Agent Settings • Read Docs
| --disable-breakpad \ | ||
| --disable-client-side-phishing-detection \ | ||
| --disable-component-extensions-with-background-pages \ | ||
| --disable-component-update \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am little bit worry about deleting these flags because I dont what they are doing lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overview
Following up on #84. Install and allow running against patchright instead of only playwright
Testing
Build + ran both headful + headless images. Confirmed execution working as expected with
curl:Note
Adds Patchright support across images and runtime, selectable via PLAYWRIGHT_ENGINE, and tweaks headless Chromium flags.
server/runtime/playwright-executor.tsto dynamically selectchromiumfrompatchrightorplaywright-corebased onPLAYWRIGHT_ENGINE.patchrightglobally alongsideplaywright-core,typescript, andtsxinimages/chromium-headful/Dockerfileandimages/chromium-headless/image/Dockerfile.PLAYWRIGHT_ENGINEenv inimages/chromium-headful/run-docker.shandimages/chromium-headless/run-docker.sh.images/chromium-headless/image/wrapper.shby removing several flags (e.g.,--disable-component-update,--disable-default-apps,--disable-extensions,--enable-automation).Written by Cursor Bugbot for commit 50d5bb3. This will update automatically on new commits. Configure here.