fix: default playwright-cli to the chromium it ships - #13
Merged
Conversation
Pulling the published image and driving it showed the feature installed a browser nobody could reach: playwright-cli opens the branded "chrome" channel by default and looks for it at /opt/google/chrome/chrome, so "playwright-cli open" died with Chromium distribution 'chrome' is not found at /opt/google/chrome/chrome while a working Chromium sat in /usr/local/share/ms-playwright. Setting PLAYWRIGHT_MCP_BROWSER in containerEnv points the default at the bundled build; --browser still overrides per command. The scenario now opens and closes a browser with no flag, which is the only check that would have caught this — every existing check passed against the broken image. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MB7zNmdzPYMpwkUWxAjSFt
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.
Softlight Overview
UX Score: 5/5
Softlight reviewed this change and found no issues.
To run Softlight again, click here or comment @softlight.
The feature installed a browser nothing could reach. Pulling the published devcontainer image and actually driving
playwright-cliin it:playwright-clidefaults to the brandedchromechannel, not the bundled Chromium thatplaywright install chromiumdownloads. Soplaywright-cli openfailed while a perfectly good Chromium sat unused in/usr/local/share/ms-playwright.Changes
src/playwright/devcontainer-feature.json— addsPLAYWRIGHT_MCP_BROWSER=chromiumtocontainerEnv; bumps the feature to1.1.0.test/playwright/ubuntu.sh— asserts the env var, and opens/closes a browser with no--browserflag.NOTES.md/README.md— explain why the variable is set.How this was verified
Pulled
ghcr.io/orianna-ai/devcontainer@sha256:d9aec848…and ran it as uid 1000 withHOME=/data/homeon an empty volume, matching the sandbox pod:playwright-cli open(no flag), before'chrome' is not foundplaywright-cli open --browser=chromiumplaywright-cli openwithPLAYWRIGHT_MCP_BROWSER=chromiumWhy the existing tests missed it
Every check in the current scenario passed against the broken image — they verified the CLI was on
PATH, the env var was set, and Chromium was on disk and readable. All true, and all insufficient: nothing ever launched a browser. The new check is the one that fails without this fix.--browserstill overrides per command, so callers that pass it explicitly (design_doctor's capture runner does) are unaffected.Testing
pre-commit run --all-filespasses. The scenario needs Docker, so it runs in CI.Generated by Claude Code
Note
Low Risk
Container env default and documentation only; no auth, data, or API surface changes beyond making the existing CLI work out of the box.
Overview
Fixes
playwright-cli openfailing in the devcontainer when no--browserflag is passed: the CLI defaulted to the brandedchromechannel at/opt/google/chrome/chromeeven though the feature only installs Chromium underPLAYWRIGHT_BROWSERS_PATH.The Playwright devcontainer feature now sets
PLAYWRIGHT_MCP_BROWSER=chromiumincontainerEnv(feature version 1.1.0), with matching notes inNOTES.md/README.md. Per-command--browseroverrides remain unchanged.Tests assert the env var and add an end-to-end open/close without
--browser, so CI catches “browser on disk but unreachable” regressions.Reviewed by Cursor Bugbot for commit 341d398. Configure here.
Greptile Summary
The PR makes the Playwright feature default to its installed Chromium build rather than the unavailable branded Chrome channel.
PLAYWRIGHT_MCP_BROWSER=chromiumto the feature environment and bumps the feature version to 1.1.0.Confidence Score: 5/5
The PR appears safe to merge, with the changed default aligned to the browser installed by the feature and covered by a functional launch test.
The feature now selects its bundled Chromium for no-flag CLI launches, while explicit per-command browser selection remains documented as available, and no concrete regression was established.
Important Files Changed
Reviews (1): Last reviewed commit: "fix: default playwright-cli to the chrom..." | Re-trigger Greptile