From 807e420331ed446dffe7167953911fd939c2fa7c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 4 Jul 2026 07:36:43 +0000 Subject: [PATCH 1/3] Initial plan From cc36b07b4d4d92a13002ad8da6925f331d09c7bb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 4 Jul 2026 07:52:04 +0000 Subject: [PATCH 2/3] Fix docs tester search environment and add responsive search regression test Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .../daily-multi-device-docs-tester.lock.yml | 4 +-- .../daily-multi-device-docs-tester.md | 13 ++++++---- docs/playwright.config.ts | 6 ++--- docs/tests/search-dialog.spec.ts | 26 +++++++++++++++++++ 4 files changed, 39 insertions(+), 10 deletions(-) create mode 100644 docs/tests/search-dialog.spec.ts diff --git a/.github/workflows/daily-multi-device-docs-tester.lock.yml b/.github/workflows/daily-multi-device-docs-tester.lock.yml index 99f50e15cd0..a59d717424b 100644 --- a/.github/workflows/daily-multi-device-docs-tester.lock.yml +++ b/.github/workflows/daily-multi-device-docs-tester.lock.yml @@ -1,4 +1,4 @@ -# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"28d5e12e263c818171ccfce3636887a1968d97f75f62baf0fc7aa4756f0cd7d3","body_hash":"09681b188b196d76d4a274d165483a7a327abca0f95bf4cf5cee6766dd608b27","strict":true,"agent_id":"pi","agent_model":"copilot/gpt-5.4","engine_versions":{"pi":"0.80.3"}} +# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"462b9b1421ff01414dc6d7916ecd683a3ad4d7bd8033e584730bcc298d4ed6d2","body_hash":"901ed62dc2711cf715002837630edc274a17a6d2d4bf9032c8693a1094fc3e92","strict":true,"agent_id":"pi","agent_model":"copilot/gpt-5.4","engine_versions":{"pi":"0.80.3"}} # gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GH_AW_OTEL_GRAFANA_AUTHORIZATION","GH_AW_OTEL_GRAFANA_ENDPOINT","GH_AW_OTEL_SENTRY_AUTHORIZATION","GH_AW_OTEL_SENTRY_ENDPOINT","GITHUB_TOKEN"],"actions":[{"repo":"actions/cache/restore","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/cache/save","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/checkout","sha":"9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0","version":"v7.0.0"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.27.22","digest":"sha256:55f06588411008b7148eb64b8dfe28602a0cce3675b36c6b190b54aca138468e","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.27.22@sha256:55f06588411008b7148eb64b8dfe28602a0cce3675b36c6b190b54aca138468e"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.22","digest":"sha256:afb9ff9140b17d38871dfb9dbac5ff8689ea634c2f91c435da2825192d4881c1","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.22@sha256:afb9ff9140b17d38871dfb9dbac5ff8689ea634c2f91c435da2825192d4881c1"},{"image":"ghcr.io/github/gh-aw-firewall/cli-proxy:0.27.22","digest":"sha256:e23e1604241f579b418e6522d938285b57ada31bc27742a65c90ee2250b1755c","pinned_image":"ghcr.io/github/gh-aw-firewall/cli-proxy:0.27.22@sha256:e23e1604241f579b418e6522d938285b57ada31bc27742a65c90ee2250b1755c"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.27.22","digest":"sha256:3cdcc1e2b4b4fe602ba69fd3e21aac7ac512d5c1fce24df4ce69dc4f98164b59","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.27.22@sha256:3cdcc1e2b4b4fe602ba69fd3e21aac7ac512d5c1fce24df4ce69dc4f98164b59"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.32","digest":"sha256:63e46b56dfd70895a701b6fc6dd0189e11e2d875f327f1781e81b31848735477","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.3.32@sha256:63e46b56dfd70895a701b6fc6dd0189e11e2d875f327f1781e81b31848735477"},{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:529d02eb970b1161aa25c593a9c3df57fdfad5a8add328cb3b6eccef66f3183b","pinned_image":"ghcr.io/github/gh-aw-node@sha256:529d02eb970b1161aa25c593a9c3df57fdfad5a8add328cb3b6eccef66f3183b"},{"image":"ghcr.io/github/github-mcp-server:v1.5.0","digest":"sha256:e25564dccc9110a70a77b9df560cbde11aa392fcb5f08b9abe5c4ebc6d146ea4","pinned_image":"ghcr.io/github/github-mcp-server:v1.5.0@sha256:e25564dccc9110a70a77b9df560cbde11aa392fcb5f08b9abe5c4ebc6d146ea4"}]} # This file was automatically generated by gh-aw. DO NOT EDIT. To debug this workflow, load the skill at https://github.com/github/gh-aw/blob/main/debug.md # @@ -572,7 +572,7 @@ jobs: EXPR_GITHUB_RUN_ID: ${{ github.run_id }} EXPR_GITHUB_WORKSPACE: ${{ github.workspace }} name: Start docs server - run: "LOG_FILE=\"/tmp/gh-aw/agent/docs-server-$EXPR_GITHUB_RUN_ID.log\"\nPID_FILE=\"/tmp/gh-aw/agent/docs-server-$EXPR_GITHUB_RUN_ID.pid\"\ncd \"$EXPR_GITHUB_WORKSPACE/docs\"\nnohup npm run dev -- --host 0.0.0.0 --port 4321 > \"$LOG_FILE\" 2>&1 &\nPID=$!\necho $PID > \"$PID_FILE\"\necho \"Server PID: $PID\"\necho \"Server log: $LOG_FILE\"\n" + run: "LOG_FILE=\"/tmp/gh-aw/agent/docs-server-$EXPR_GITHUB_RUN_ID.log\"\nPID_FILE=\"/tmp/gh-aw/agent/docs-server-$EXPR_GITHUB_RUN_ID.pid\"\ncd \"$EXPR_GITHUB_WORKSPACE/docs\"\nnpm run build\nnohup npm run preview -- --host 0.0.0.0 --port 4321 > \"$LOG_FILE\" 2>&1 &\nPID=$!\necho $PID > \"$PID_FILE\"\necho \"Server PID: $PID\"\necho \"Server log: $LOG_FILE\"\n" - env: EXPR_GITHUB_RUN_ID: ${{ github.run_id }} name: Wait for server readiness diff --git a/.github/workflows/daily-multi-device-docs-tester.md b/.github/workflows/daily-multi-device-docs-tester.md index 0997919d2aa..152a907edf2 100644 --- a/.github/workflows/daily-multi-device-docs-tester.md +++ b/.github/workflows/daily-multi-device-docs-tester.md @@ -34,12 +34,14 @@ tools: cli-proxy: true github: mode: gh-proxy - timeout: 120 # Playwright navigation on Astro dev server can take >60s; increase to 120s + timeout: 120 # Multi-device runs include docs build + preview startup playwright: mode: cli bash: - "npm install*" + - "npm run build*" - "npm run dev*" + - "npm run preview*" - "npx astro*" - "npx playwright*" - "playwright-cli*" # CLI-mode playwright commands @@ -99,7 +101,8 @@ pre-agent-steps: LOG_FILE="/tmp/gh-aw/agent/docs-server-$EXPR_GITHUB_RUN_ID.log" PID_FILE="/tmp/gh-aw/agent/docs-server-$EXPR_GITHUB_RUN_ID.pid" cd "$EXPR_GITHUB_WORKSPACE/docs" - nohup npm run dev -- --host 0.0.0.0 --port 4321 > "$LOG_FILE" 2>&1 & + npm run build + nohup npm run preview -- --host 0.0.0.0 --port 4321 > "$LOG_FILE" 2>&1 & PID=$! echo $PID > "$PID_FILE" echo "Server PID: $PID" @@ -158,11 +161,11 @@ This workflow has `strict: true` — it will fail if no safe output is produced. ## Your Mission -Start the documentation development server and perform comprehensive multi-device testing. Test layout responsiveness, accessibility, interactive elements, and visual rendering across all device types. Use a single Playwright browser instance for efficiency. +Start the documentation preview server and perform comprehensive multi-device testing. Test layout responsiveness, accessibility, interactive elements, and visual rendering across all device types. Use a single Playwright browser instance for efficiency. ## Step 1: Verify Server Availability -The workflow pre-agent steps already installed docs dependencies and started the Astro dev server. +The workflow pre-agent steps already installed docs dependencies, built the docs site, and started the Astro preview server. Quickly verify it is reachable before testing: ```bash @@ -190,7 +193,7 @@ Playwright is pre-installed as `@playwright/cli`. Use `playwright-cli ` **⚠️ CRITICAL: Navigation Timeout Prevention** -The Astro development server uses Vite, which loads many JavaScript modules per page. Using the default `waitUntil: 'load'` will cause 60s timeouts because the browser waits for all modules to finish. **Use `waitUntil: 'domcontentloaded'`** for navigation: +Use `waitUntil: 'domcontentloaded'` for navigation to keep checks fast and consistent: ```bash playwright-cli browser_run_code --code "async (page) => { diff --git a/docs/playwright.config.ts b/docs/playwright.config.ts index 3a67fd52914..31775353104 100644 --- a/docs/playwright.config.ts +++ b/docs/playwright.config.ts @@ -45,9 +45,9 @@ export default defineConfig({ // Ensure the command always runs relative to the docs folder, regardless // of the caller's current working directory. cwd: configDir, - // Keep startup lighter than a full prebuild, but ensure the homepage slide - // preview asset exists before the dev server starts. - command: 'npm run build:slides && npm run dev --silent -- --host 127.0.0.1 --port 4321', + // Search is only available in production builds, so run tests against a + // built preview server. + command: 'npm run build && npm run preview -- --host 127.0.0.1 --port 4321', url: 'http://localhost:4321/gh-aw/', reuseExistingServer: !process.env.CI, timeout: 180 * 1000, diff --git a/docs/tests/search-dialog.spec.ts b/docs/tests/search-dialog.spec.ts new file mode 100644 index 00000000000..f7ed4244b17 --- /dev/null +++ b/docs/tests/search-dialog.spec.ts @@ -0,0 +1,26 @@ +import { test, expect } from '@playwright/test'; + +const VIEWPORTS = [ + { name: 'desktop', width: 1366, height: 768 }, + { name: 'tablet', width: 834, height: 1194 }, +]; + +for (const viewport of VIEWPORTS) { + test(`search dialog is usable and dismissible on ${viewport.name}`, async ({ page }) => { + await page.setViewportSize({ width: viewport.width, height: viewport.height }); + await page.goto('/gh-aw/'); + await page.waitForLoadState('networkidle'); + + await page.getByRole('button', { name: 'Search' }).click(); + + const openDialog = page.locator('dialog[open]'); + await expect(openDialog).toBeVisible(); + await expect(openDialog.locator('input, textarea, [role="combobox"]')).toBeVisible(); + + await page.keyboard.press('Escape'); + await expect(openDialog).toHaveCount(0); + + await page.getByRole('link', { name: 'Quick Start with CLI' }).click(); + await expect(page).toHaveURL(/\/gh-aw\/setup\/quick-start\//); + }); +} From 78ff4c62f67773096d4ef391dbe3dd42bfeae35d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 4 Jul 2026 08:01:40 +0000 Subject: [PATCH 3/3] Tighten search dialog regression selectors and reopen coverage Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- docs/tests/search-dialog.spec.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/tests/search-dialog.spec.ts b/docs/tests/search-dialog.spec.ts index f7ed4244b17..bddb010b87a 100644 --- a/docs/tests/search-dialog.spec.ts +++ b/docs/tests/search-dialog.spec.ts @@ -15,11 +15,20 @@ for (const viewport of VIEWPORTS) { const openDialog = page.locator('dialog[open]'); await expect(openDialog).toBeVisible(); - await expect(openDialog.locator('input, textarea, [role="combobox"]')).toBeVisible(); + await expect(openDialog.getByRole('search').getByRole('textbox', { name: 'Search' })).toBeVisible(); await page.keyboard.press('Escape'); await expect(openDialog).toHaveCount(0); + await page.getByRole('button', { name: 'Search' }).click(); + const reopenedDialog = page.locator('dialog[open]'); + await expect(reopenedDialog).toBeVisible(); + await expect( + reopenedDialog.getByRole('search').getByRole('textbox', { name: 'Search' }) + ).toBeVisible(); + await page.keyboard.press('Escape'); + await expect(reopenedDialog).toHaveCount(0); + await page.getByRole('link', { name: 'Quick Start with CLI' }).click(); await expect(page).toHaveURL(/\/gh-aw\/setup\/quick-start\//); });