Skip to content

feat: add devcontainer for headless integration testing#908

Open
EhabY wants to merge 3 commits intomainfrom
docs/devcontainer-and-headless-testing
Open

feat: add devcontainer for headless integration testing#908
EhabY wants to merge 3 commits intomainfrom
docs/devcontainer-and-headless-testing

Conversation

@EhabY
Copy link
Copy Markdown
Collaborator

@EhabY EhabY commented Apr 17, 2026

Summary

Add a .devcontainer/ configuration that reproduces CI locally and removes the first-run xvfb setup 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 and package.json engines). Installs Chromium native libs via playwright install-deps (upstream-maintained list) and xvfb for headless test execution.
  • devcontainer.json: remoteUser: node so pnpm install writes files as UID 1000 on the mounted workspace. Recommended extensions: Prettier, ESLint, Vitest, Extension Test Runner. postCreateCommand: pnpm install --frozen-lockfile (matches CI, no CI=true env leak).
  • README.md: One-click "Open in Dev Containers" badge and a pointer to AGENTS.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: Document xvfb-run -a pnpm test:integration for headless environments (CI, devcontainers).

Note

Generated by Coder Agents

Closes #909

@EhabY EhabY force-pushed the docs/devcontainer-and-headless-testing branch 7 times, most recently from 7ab0b27 to a7c362b Compare April 17, 2026 16:52
@EhabY EhabY self-assigned this Apr 18, 2026
EhabY and others added 2 commits April 18, 2026 17:48
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.
@EhabY EhabY force-pushed the docs/devcontainer-and-headless-testing branch from 53eb3f6 to 1fdef63 Compare April 18, 2026 14:48
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.
@EhabY EhabY changed the title docs: add devcontainer config and update integration test command feat: add devcontainer for headless integration testing Apr 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add devcontainer for contributor onboarding and headless testing

1 participant