From 45f6f17eb0b0e1e6f28a9a77069397255c3b6e8f Mon Sep 17 00:00:00 2001 From: Kacper Date: Mon, 2 Feb 2026 15:47:18 +0100 Subject: [PATCH 1/5] fix(docker): Pre-install Playwright Chromium browsers for automated testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #725 AI agents in automated testing mode require Playwright to verify implementations, but Docker containers had only system dependencies installed, not browser binaries. This caused verification failures with permissions errors. Changes: - Install Playwright Chromium in Dockerfile (~300MB increase) - Update docker-compose.override.yml.example with clearer Playwright documentation - Add "Playwright for Automated Testing" section to README - Document optional volume mount for persisting browsers across rebuilds Browsers are now pre-installed and work out of the box for Docker users. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- Dockerfile | 6 ++++++ README.md | 27 +++++++++++++++++++++++++++ docker-compose.override.yml.example | 11 ++++++++--- 3 files changed, 41 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 03911b45e..7d22858cc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -118,6 +118,12 @@ RUN curl -fsSL https://opencode.ai/install | bash && \ echo "=== Checking OpenCode CLI installation ===" && \ ls -la /home/automaker/.local/bin/ && \ (which opencode && opencode --version) || echo "opencode installed (may need auth setup)" + +# Install Playwright Chromium browser for AI agent verification tests +# This adds ~300MB to the image but enables automated testing mode out of the box +RUN npx playwright install chromium && \ + echo "=== Playwright Chromium installed ===" && \ + ls -la /home/automaker/.cache/ms-playwright/ || echo "Playwright browsers installed" USER root # Add PATH to profile so it's available in all interactive shells (for login shells) diff --git a/README.md b/README.md index 757056737..645ba7221 100644 --- a/README.md +++ b/README.md @@ -338,6 +338,33 @@ services: The Docker image supports both AMD64 and ARM64 architectures. The GitHub CLI and Claude CLI are automatically downloaded for the correct architecture during build. +##### Playwright for Automated Testing + +The Docker image includes **Playwright Chromium pre-installed** for AI agent verification tests. When agents implement features in automated testing mode, they use Playwright to verify the implementation works correctly. + +**No additional setup required** - Playwright verification works out of the box. + +**Optional: Persist browsers across container rebuilds** + +To avoid re-downloading browsers when rebuilding the Docker image, add this to your `docker-compose.override.yml`: + +```yaml +services: + server: + volumes: + - playwright-cache:/home/automaker/.cache/ms-playwright + +volumes: + playwright-cache: + name: automaker-playwright-cache +``` + +**Updating browsers manually:** + +```bash +docker exec automaker-server npx playwright install chromium +``` + ### Testing #### End-to-End Tests (Playwright) diff --git a/docker-compose.override.yml.example b/docker-compose.override.yml.example index 3815c197d..d1f0c2167 100644 --- a/docker-compose.override.yml.example +++ b/docker-compose.override.yml.example @@ -21,9 +21,13 @@ services: # - ~/.local/share/opencode:/home/automaker/.local/share/opencode # - ~/.config/opencode:/home/automaker/.config/opencode - # Playwright browser cache - persists installed browsers across container restarts - # Run 'npx playwright install --with-deps chromium' once, and it will persist + # ===== Playwright Browser Cache (Optional) ===== + # Playwright Chromium is PRE-INSTALLED in the Docker image for automated testing. + # Uncomment below to persist browser cache across container rebuilds (saves ~300MB download): # - playwright-cache:/home/automaker/.cache/ms-playwright + # + # To update Playwright browsers manually: + # docker exec automaker-server npx playwright install chromium environment: # Set root directory for all projects and file operations # Users can only create/open projects within this directory @@ -37,6 +41,7 @@ services: # - CURSOR_API_KEY=${CURSOR_API_KEY:-} volumes: - # Playwright cache volume (persists Chromium installs) + # Playwright cache volume - optional, persists browser updates across container rebuilds + # Uncomment if you mounted the playwright-cache volume above # playwright-cache: # name: automaker-playwright-cache From b37a287c9c63b6955e454e8497a16746a2231712 Mon Sep 17 00:00:00 2001 From: Kacper Date: Mon, 2 Feb 2026 15:55:11 +0100 Subject: [PATCH 2/5] fix(docker): Address PR #745 review feedback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Clean up npx cache after Playwright installation to reduce image size - Clarify README: volume mounts persist cache across container lifecycles, not image rebuilds - Add first-use warning: empty volume overrides pre-installed browsers, users must re-install with docker exec command 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- Dockerfile | 4 +++- README.md | 13 +++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7d22858cc..f5c3511e4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -121,9 +121,11 @@ RUN curl -fsSL https://opencode.ai/install | bash && \ # Install Playwright Chromium browser for AI agent verification tests # This adds ~300MB to the image but enables automated testing mode out of the box +# Clean up npx cache after installation to reduce image size RUN npx playwright install chromium && \ echo "=== Playwright Chromium installed ===" && \ - ls -la /home/automaker/.cache/ms-playwright/ || echo "Playwright browsers installed" + ls -la /home/automaker/.cache/ms-playwright/ || echo "Playwright browsers installed" && \ + rm -rf /home/automaker/.npm/_npx USER root # Add PATH to profile so it's available in all interactive shells (for login shells) diff --git a/README.md b/README.md index 645ba7221..0c21245b7 100644 --- a/README.md +++ b/README.md @@ -344,9 +344,18 @@ The Docker image includes **Playwright Chromium pre-installed** for AI agent ver **No additional setup required** - Playwright verification works out of the box. -**Optional: Persist browsers across container rebuilds** +**Optional: Persist browsers for manual updates** -To avoid re-downloading browsers when rebuilding the Docker image, add this to your `docker-compose.override.yml`: +By default, Playwright Chromium is pre-installed in the Docker image. If you need to manually update browsers or want to persist browser installations across container restarts (not image rebuilds), you can mount a volume. + +**Important:** When you first add this volume mount to an existing setup, the empty volume will override the pre-installed browsers. You must re-install them: + +```bash +# After adding the volume mount for the first time +docker exec automaker-server npx playwright install chromium +``` + +Add this to your `docker-compose.override.yml`: ```yaml services: From 3ccea7a67beee54f06060ecc4cfb8ebb0c307673 Mon Sep 17 00:00:00 2001 From: Kacper Date: Mon, 2 Feb 2026 16:07:53 +0100 Subject: [PATCH 3/5] fix(docker): Address remaining PR #745 review comments - Move Playwright install after node_modules copy to use pinned version - Use local playwright binary instead of npx to avoid registry fetch - Add --user automaker -w /app flags to docker exec commands - Change bold text to proper heading in README (MD036 lint fix) Co-Authored-By: Claude Opus 4.5 --- Dockerfile | 16 +++++++++------- README.md | 6 +++--- docker-compose.override.yml.example | 2 +- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index f5c3511e4..2e745e4cb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -119,13 +119,6 @@ RUN curl -fsSL https://opencode.ai/install | bash && \ ls -la /home/automaker/.local/bin/ && \ (which opencode && opencode --version) || echo "opencode installed (may need auth setup)" -# Install Playwright Chromium browser for AI agent verification tests -# This adds ~300MB to the image but enables automated testing mode out of the box -# Clean up npx cache after installation to reduce image size -RUN npx playwright install chromium && \ - echo "=== Playwright Chromium installed ===" && \ - ls -la /home/automaker/.cache/ms-playwright/ || echo "Playwright browsers installed" && \ - rm -rf /home/automaker/.npm/_npx USER root # Add PATH to profile so it's available in all interactive shells (for login shells) @@ -155,6 +148,15 @@ COPY --from=server-builder /app/apps/server/package*.json ./apps/server/ # Copy node_modules (includes symlinks to libs) COPY --from=server-builder /app/node_modules ./node_modules +# Install Playwright Chromium browser for AI agent verification tests +# This adds ~300MB to the image but enables automated testing mode out of the box +# Using the locally installed playwright ensures we use the pinned version from package-lock.json +USER automaker +RUN ./node_modules/.bin/playwright install chromium && \ + echo "=== Playwright Chromium installed ===" && \ + ls -la /home/automaker/.cache/ms-playwright/ || echo "Playwright browsers installed" +USER root + # Create data and projects directories RUN mkdir -p /data /projects && chown automaker:automaker /data /projects diff --git a/README.md b/README.md index 0c21245b7..95beefe1d 100644 --- a/README.md +++ b/README.md @@ -344,7 +344,7 @@ The Docker image includes **Playwright Chromium pre-installed** for AI agent ver **No additional setup required** - Playwright verification works out of the box. -**Optional: Persist browsers for manual updates** +#### Optional: Persist browsers for manual updates By default, Playwright Chromium is pre-installed in the Docker image. If you need to manually update browsers or want to persist browser installations across container restarts (not image rebuilds), you can mount a volume. @@ -352,7 +352,7 @@ By default, Playwright Chromium is pre-installed in the Docker image. If you nee ```bash # After adding the volume mount for the first time -docker exec automaker-server npx playwright install chromium +docker exec --user automaker -w /app automaker-server npx playwright install chromium ``` Add this to your `docker-compose.override.yml`: @@ -371,7 +371,7 @@ volumes: **Updating browsers manually:** ```bash -docker exec automaker-server npx playwright install chromium +docker exec --user automaker -w /app automaker-server npx playwright install chromium ``` ### Testing diff --git a/docker-compose.override.yml.example b/docker-compose.override.yml.example index d1f0c2167..e92ce119d 100644 --- a/docker-compose.override.yml.example +++ b/docker-compose.override.yml.example @@ -27,7 +27,7 @@ services: # - playwright-cache:/home/automaker/.cache/ms-playwright # # To update Playwright browsers manually: - # docker exec automaker-server npx playwright install chromium + # docker exec --user automaker -w /app automaker-server npx playwright install chromium environment: # Set root directory for all projects and file operations # Users can only create/open projects within this directory From 8226699734d22615fba2c7796d5a53599376bf7c Mon Sep 17 00:00:00 2001 From: Shirone Date: Sun, 15 Feb 2026 18:01:45 +0100 Subject: [PATCH 4/5] fix(docker): add @playwright/test to server devDependencies The Dockerfile's playwright install step requires the binary in node_modules/.bin/, but playwright was only a UI dependency. This adds @playwright/test to server devDependencies so the Docker build can successfully run `./node_modules/.bin/playwright install chromium`. Fixes the "playwright: not found" error during Docker image build. Co-Authored-By: Claude Opus 4.6 --- apps/server/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/server/package.json b/apps/server/package.json index ed005c54b..4a7a75a8b 100644 --- a/apps/server/package.json +++ b/apps/server/package.json @@ -45,6 +45,7 @@ "yaml": "2.7.0" }, "devDependencies": { + "@playwright/test": "1.57.0", "@types/cookie": "0.6.0", "@types/cookie-parser": "1.4.10", "@types/cors": "2.8.19", From a08ba1b517278bb1cea2a2cd23ecaaf2bc6299a5 Mon Sep 17 00:00:00 2001 From: Shirone Date: Sun, 15 Feb 2026 18:13:06 +0100 Subject: [PATCH 5/5] fix: address PR #745 review comments - .gitignore: add missing trailing newline - Dockerfile: remove misleading || echo fallback in Playwright install - index.ts: truncate long paths from beginning instead of end in warning box - verify-claude-auth.ts: use effectiveAuthMethod to prevent undefined authType - agent-context-parser.ts: handle claude-opus alias as Opus 4.6 - thinking-level-selector.tsx: improve model prop documentation Co-Authored-By: Claude Opus 4.6 --- .gitignore | 2 +- Dockerfile | 2 +- apps/server/src/index.ts | 8 +++++++- apps/server/src/routes/setup/routes/verify-claude-auth.ts | 5 +++-- .../views/board-view/shared/thinking-level-selector.tsx | 3 ++- apps/ui/src/lib/agent-context-parser.ts | 2 +- 6 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index d77398636..871c98964 100644 --- a/.gitignore +++ b/.gitignore @@ -96,4 +96,4 @@ data/credentials.json data/ .codex/ .mcp.json -.planning \ No newline at end of file +.planning diff --git a/Dockerfile b/Dockerfile index 2e745e4cb..a68901e4d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -154,7 +154,7 @@ COPY --from=server-builder /app/node_modules ./node_modules USER automaker RUN ./node_modules/.bin/playwright install chromium && \ echo "=== Playwright Chromium installed ===" && \ - ls -la /home/automaker/.cache/ms-playwright/ || echo "Playwright browsers installed" + ls -la /home/automaker/.cache/ms-playwright/ USER root # Create data and projects directories diff --git a/apps/server/src/index.ts b/apps/server/src/index.ts index 4f49d1172..85ff01458 100644 --- a/apps/server/src/index.ts +++ b/apps/server/src/index.ts @@ -211,7 +211,13 @@ const BOX_CONTENT_WIDTH = 67; pathsCheckedInfo = ` ║ ║ ║ ${'Paths checked:'.padEnd(BOX_CONTENT_WIDTH)}║ -${pathsChecked.map((p) => `║ ${p.substring(0, BOX_CONTENT_WIDTH - 4).padEnd(BOX_CONTENT_WIDTH - 4)} ║`).join('\n')}`; +${pathsChecked + .map((p) => { + const maxLen = BOX_CONTENT_WIDTH - 4; + const display = p.length > maxLen ? '...' + p.slice(-(maxLen - 3)) : p; + return `║ ${display.padEnd(maxLen)} ║`; + }) + .join('\n')}`; } } diff --git a/apps/server/src/routes/setup/routes/verify-claude-auth.ts b/apps/server/src/routes/setup/routes/verify-claude-auth.ts index 405ef9a64..7df27c3dc 100644 --- a/apps/server/src/routes/setup/routes/verify-claude-auth.ts +++ b/apps/server/src/routes/setup/routes/verify-claude-auth.ts @@ -322,11 +322,12 @@ export function createVerifyClaudeAuthHandler() { }); // Determine specific auth type for success messages + const effectiveAuthMethod = authMethod ?? 'api_key'; let authType: 'oauth' | 'api_key' | 'cli' | undefined; if (authenticated) { - if (authMethod === 'api_key') { + if (effectiveAuthMethod === 'api_key') { authType = 'api_key'; - } else if (authMethod === 'cli') { + } else if (effectiveAuthMethod === 'cli') { // Check if CLI auth is via OAuth (Claude Code subscription) or generic CLI try { const indicators = await getClaudeAuthIndicators(); diff --git a/apps/ui/src/components/views/board-view/shared/thinking-level-selector.tsx b/apps/ui/src/components/views/board-view/shared/thinking-level-selector.tsx index 5164e4fac..3a69d5879 100644 --- a/apps/ui/src/components/views/board-view/shared/thinking-level-selector.tsx +++ b/apps/ui/src/components/views/board-view/shared/thinking-level-selector.tsx @@ -9,7 +9,8 @@ interface ThinkingLevelSelectorProps { selectedLevel: ThinkingLevel; onLevelSelect: (level: ThinkingLevel) => void; testIdPrefix?: string; - /** Optional model ID to filter available thinking levels (e.g., Opus 4.6 only shows None/Adaptive) */ + /** Model ID is required for correct thinking level filtering. + * Without it, adaptive thinking won't be available for Opus 4.6. */ model?: string; } diff --git a/apps/ui/src/lib/agent-context-parser.ts b/apps/ui/src/lib/agent-context-parser.ts index 996b397b7..11c2a91ea 100644 --- a/apps/ui/src/lib/agent-context-parser.ts +++ b/apps/ui/src/lib/agent-context-parser.ts @@ -34,7 +34,7 @@ export const DEFAULT_MODEL = 'claude-opus-4-6'; */ export function formatModelName(model: string): string { // Claude models - if (model.includes('opus-4-6')) return 'Opus 4.6'; + if (model.includes('opus-4-6') || model === 'claude-opus') return 'Opus 4.6'; if (model.includes('opus')) return 'Opus 4.5'; if (model.includes('sonnet')) return 'Sonnet 4.5'; if (model.includes('haiku')) return 'Haiku 4.5';