feat: add devcontainer for headless integration testing#908
Open
feat: add devcontainer for headless integration testing#908
Conversation
7ab0b27 to
a7c362b
Compare
Add a devcontainer configuration using the official MS typescript-node:24-bookworm image with xvfb pre-installed for headless integration testing. Update the AGENTS.md integration tests command to use xvfb-run -a, which is required on headless environments (matching CI).
Set remoteUser to node so pnpm install writes files as UID 1000 rather than root on the mounted workspace. Drop the redundant apt-get update since playwright install-deps already refreshed the cache, and remove /root/.npm so the cached playwright tarball does not bloat the image. Gitignore the .pnpm-store workspace fallback that pnpm creates when the default store sits on a different filesystem than the bind mount. Drop the npm-intellisense extension recommendation since the project is a strict pnpm workspace. Flag the headless caveat on the integration tests table row so a scanner sees it before running the wrong command. Add a docker dependabot ecosystem pointed at .devcontainer so the base image sha256 digest stays current on weekly cadence.
53eb3f6 to
1fdef63
Compare
Switch base to Node 22 to match CI and package.json engines. Use pnpm install --frozen-lockfile instead of CI=true for explicit intent. Add apt-get update before xvfb install for robustness. Add a small README with an Open in Dev Containers badge. Tidy AGENTS.md wording.
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.
Summary
Add a
.devcontainer/configuration that reproduces CI locally and removes the first-runxvfbsetup friction. Contributors can open the repo in a Dev Container (badge in.devcontainer/README.md) and run the full test suite, including integration tests, out of the box.What's in it
Dockerfile:typescript-node:22-bookworm(digest-pinned, matches CI's Node 22 andpackage.jsonengines). Installs Chromium native libs viaplaywright install-deps(upstream-maintained list) andxvfbfor headless test execution.devcontainer.json:remoteUser: nodesopnpm installwrites files as UID 1000 on the mounted workspace. Recommended extensions: Prettier, ESLint, Vitest, Extension Test Runner.postCreateCommand: pnpm install --frozen-lockfile(matches CI, noCI=trueenv leak).README.md: One-click "Open in Dev Containers" badge and a pointer toAGENTS.md..github/dependabot.yml: New docker ecosystem entry for/.devcontainer(weekly, 7-day cooldown) to keep the base image digest current..gitignore: Ignore.pnpm-store/(pnpm's workspace fallback when the default store sits on a different filesystem than the bind mount).AGENTS.md: Documentxvfb-run -a pnpm test:integrationfor headless environments (CI, devcontainers).Note
Generated by Coder Agents
Closes #909