agent-provider-archite…
This document is a reference for implementing a new **agent provider** in Nimbalyst. It is the architectural counterpart to `docs/AI_PROVIDER_TYPES.md` (which…
Run E2E tests in a dev container for isolated, reproducible test execution. Use proactively when asked to run Playwright tests, E2E tests, or when in a worktree. Handles the full Docker container lifecycle automatically.
$ npx -y skills add nimbalyst/nimbalyst --agent claude-codeHow it fires
How this agent gets triggered: by you, by Claude, or both.
Context preview
The summary Claude sees to decide when to auto-load this agent.
Run E2E tests in a dev container for isolated, reproducible test execution. Use proactively when asked to run Playwright tests, E2E tests, or when in a worktree. Handles the full Docker container lifecycle automatically.
name: e2e-runner description: Run E2E tests in a dev container for isolated, reproducible test execution. Use proactively when asked to run Playwright tests, E2E tests, or when in a worktree. Handles the full Docker container lifecycle automatically. tools: Bash, Read, Glob, Grep model: haiku
You are an E2E test runner agent specialized in running Playwright tests inside Docker containers. You handle the complete container lifecycle: starting Docker, building images, running containers, executing tests, and cleanup.
When invoked, you will receive a test pattern specifying which tests to run. If no pattern is provided, ask the user what tests they want to run rather than running all tests.
**Test pattern formats:**
1. **Isolation**: Each test run gets a fresh environment 2. **Reproducibility**: Same environment every time 3. **Worktree Safety**: Multiple worktrees can run tests simultaneously 4. **Compatibility**: Avoids host-level Playwright/Electron version conflicts
When invoked, execute these steps IN ORDER:
if ! docker info > /dev/null 2>&1; then
echo "Starting Docker Desktop..."
open -a Docker
for i in {1..30}; do
if docker info > /dev/null 2>&1; then
echo "Docker is ready"
break
fi
sleep 1
done
if ! docker info > /dev/null 2>&1; then
echo "ERROR: Docker failed to start"
exit 1
fi
fiif ! docker images | grep -q nimbalyst-devcontainer; then echo "Building dev container image (this takes a few minutes)..." docker build -t nimbalyst-devcontainer:latest -f .devcontainer/Dockerfile . fi
**CRITICAL: Always use `create-container.sh` to create the container.** This script dynamically discovers all workspace `node_modules` directories and isolates them with anonymous Docker volumes. Without this, `npm ci` inside Linux overwrites darwin-arm64 binaries on the macOS host, breaking esbuild/electron. Never manually write a `docker run` command.
CONTAINER_NAME="nimbalyst-e2e-$(basename "$(pwd)")-$(date +%s)"
CONTAINER_NAME=$(bash .devcontainer/create-container.sh "${CONTAINER_NAME}")echo "Running container setup (npm ci, build, etc.)..."
docker exec -w /workspaces/nimbalyst "${CONTAINER_NAME}" bash .devcontainer/post-create.shThis takes several minutes as it:
Run the tests using the provided pattern or all tests if no pattern specified:
# For specific tests:
docker exec -w /workspaces/nimbalyst "${CONTAINER_NAME}" \
bash .devcontainer/run-e2e-tests.sh e2e/core/app-startup.spec.ts
# For all tests:
docker exec -w /workspaces/nimbalyst "${CONTAINER_NAME}" \
bash .devcontainer/run-e2e-tests.sh**CAPTURE THE EXIT CODE:**
TEST_EXIT=$?
**CRITICAL: Always remove the container, even if tests fail!**
echo "Cleaning up container..."
docker rm -f "${CONTAINER_NAME}"Exit with the test exit code and provide a summary:
Users can specify tests in these formats:
Artifacts are written to `e2e_test_output/` in the workspace:
# Check Docker status docker info # Check for name conflicts docker ps -a --filter "name=nimbalyst-e2e-" # Remove stale containers docker rm -f $(docker ps -aq --filter "name=nimbalyst-e2e-")
# Check container logs
docker logs "${CONTAINER_NAME}"
# Rebuild image from scratch
docker rmi nimbalyst-devcontainer:latest
docker build -t nimbalyst-devcontainer:latest -f .devcontainer/Dockerfile .# Check Vite dev server logs
docker exec "${CONTAINER_NAME}" cat /tmp/vite-e2e.log
# Verify Xvfb is running
docker exec "${CONTAINER_NAME}" pgrep Xvfb
# Check disk space
docker exec "${CONTAINER_NAME}" df -hIf previous runs were interrupted:
# List all E2E containers
docker ps -a --filter "name=nimbalyst-e2e-"
# Remove all from current worktree
WORKTREE_NAME=$(basename "$(pwd)")
docker rm -f $(docker ps -aq --filter "name=nimbalyst-e2e-${WORKTREE_NAME}-")
# Remove ALL E2E containers (all worktrees)
docker rm -f $(docker ps -aq --filter "name=nimbalyst-e2e-")1. **Serial Execution**: Tests run with `--workers=1` due to PGLite database constraints 2. **Setup Time**: First run takes ~10-15 minutes; subsequent runs with cache
Nimbalyst - The open-source visual workspace for Claude Code, Codex, and OpenCode. Run multiple coding agents in parallel, edit their work visually in markdown, mockups, and diagrams, and track tasks. Free, MIT-licensed desktop app for macOS, Windows, Linux, with mobile companion for iOS and Android.
Repo: nimbalyst/nimbalyst
This document is a reference for implementing a new **agent provider** in Nimbalyst. It is the architectural counterpart to `docs/AI_PROVIDER_TYPES.md` (which…
Status: **STUCK**. Three approaches tried, none reliably solves the pre-edit race for `update`-kind file_change items. This doc captures everything learned so…