feat(playwright-dev): add Playwright browser-automation devcontainer feature - #52
Merged
Conversation
Installs OS-level dependencies for headless Chromium/Firefox/WebKit via the official `playwright install-deps` (not a hand-maintained apt list), caches the browser binaries themselves in a Docker named volume shared across rebuilds (same shape as pnpm-store, since /workspaces-style mounts aren't available at image build time), and bundles the official Playwright Test VS Code extension with sane defaults. Does not install the `playwright` npm package itself — that stays a devDependency of the consuming project so the CLI version always matches the project's own, instead of drifting from a separately-installed global one. Verified: image build succeeds (OS deps install cleanly for all three engines, guard script lands at /usr/local/bin/devcontainer-playwright-browsers), manifest is valid plain JSON, both scripts pass bash -n, and the common.sh bootstrap block is byte-identical to vite-plus's (no drift). The full `devcontainer features test` container-launch step couldn't be verified in this sandbox — docker-outside-of-docker means the CLI's own workspace bind mount points at a path the host dockerd can't see, unrelated to this feature's mounts (which are volume-type, not bind). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ternative - IDE support table (VS Code/Cursor confirmed, WebStorm/IntelliJ noted as natively handled, Zed not yet supported by the devcontainer spec) — matches the format already used in claude-dev/mistral-dev. - Documented mcr.microsoft.com/playwright as a simpler alternative for consumers who don't need to compose with other helpers4 features. - Version History section added (convention established in dotfiles-sync). No behavior change — bumped to 1.0.1 since README changed under src/. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
✅ PR Validation Passed
📋 Pipeline Status
🤖 Generated by @helpers4 CI • 2026-08-01 |
…che integrity Three findings from PR#52 review, all verified before fixing: - Dropped the @latest pin from both npx playwright calls. It forced the newest registry release regardless of what's actually installed, contradicting the feature's own stated goal (README: browser/CLI version should track the project's own playwright devDependency, never drift from it). Without the pin, npx resolves the local project version once one exists (guard script, post-workspace-mount) and only falls back to latest when nothing local exists yet (install.sh, image build time, same result as before there). - Added ghcr.io/devcontainers/features/node:1 to dependsOn. typescript-dev alone doesn't install Node (confirmed: its install.sh is a no-op besides essential-dev) so the feature's own "npm not found" guard wasn't actually covered by the dependency it named. - Guard script now writes a completion marker (scoped to the current browsers selection) instead of treating a non-empty cache dir as "fully downloaded". A network drop mid-download no longer leaves a permanently broken cache that's silently skipped on every future start. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
baxyz
force-pushed
the
feat/playwright-dev-feature
branch
from
August 1, 2026 00:39
623108c to
9cb7668
Compare
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.
Description
Adds
playwright-dev, a new DevContainer Feature for local E2E/browser-automation testing: installs OS-level dependencies for headless Chromium/Firefox/WebKit via the officialplaywright install-deps, caches the browser binaries in a Docker named volume shared across rebuilds (same shape aspnpm-store), and installs the official Playwright Test VS Code extension with sane defaults.Reviewed end to end (naming, code correctness, IDE extension, IDE settings, possible improvements, and whether an existing feature already covers this — see checklist below) and improved based on that review:
mcr.microsoft.com/playwrightas a simpler prebuilt-image alternative for consumers who don't need to compose with otherhelpers4features.Review findings (all verified, not assumed):
-devsuffix convention (angular-dev,typescript-dev,claude-dev, …).volumemount (notbind) for the browser cache — no host-missing-path crash risk, unlike bind-mounted features.playwright.reuseBrowser/playwright.showTracesettings verified against the actual extension'spackage.jsonon GitHub (both real, boolean, correct defaults being overridden intentionally).microsoft/playwright#33610, "playwright as a devcontainer feature").Type of Change
Related Issues
None.
How Has This Been Tested?
jq emptyon the manifest (valid JSON, no JSONC comments)bash -noninstall.shandtest/playwright-dev/test.shhelpers4-common's canonical version (matches — the repo's own CI drift check would pass)scopes.json,pr-validation.ymlandtest.ymltest matrices,AGENTS.mdfeatures tableChecklist
devcontainer features testend to end — static checks above all pass)Screenshots (if applicable)
N/A.
Additional Context
None.
🤖 Generated with Claude Code