From 6f4f65ba149f0323475d81a9a169b6abad7e6016 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 3 Apr 2026 17:10:28 +0000 Subject: [PATCH] Fix copy dictation instructions button and tests - Rename button label from 'Copy full instructions' to 'Copy dictation instructions' - Fix Playwright test URL from non-existent /tools/creating-workflows/ to /guides/agentic-authoring/ - Fix content assertion from 'Fix text-to-speech errors' to 'Fix Speech-to-Text Errors' - Fix route intercept patterns from **/*.instructions.md to **/SKILL.md - Remove stale debug screenshot/console.log from test Agent-Logs-Url: https://github.com/github/gh-aw/sessions/b142f158-b904-4978-8a06-05b0d92eabc2 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .../content/docs/guides/agentic-authoring.mdx | 2 +- .../docs/reference/custom-agent-for-aw.mdx | 2 +- docs/tests/copy-button.spec.ts | 34 ++++++++----------- 3 files changed, 17 insertions(+), 21 deletions(-) diff --git a/docs/src/content/docs/guides/agentic-authoring.mdx b/docs/src/content/docs/guides/agentic-authoring.mdx index 52174fe12bd..7e9fcea9753 100644 --- a/docs/src/content/docs/guides/agentic-authoring.mdx +++ b/docs/src/content/docs/guides/agentic-authoring.mdx @@ -90,6 +90,6 @@ Copy the instructions, paste into your AI chat, then describe your workflow goal ### Dictation -When creating agentic workflows using speech-to-text, use the [dictation instructions prompt](https://raw.githubusercontent.com/github/gh-aw/main/skills/dictation/SKILL.md) to correct terminology mismatches and formatting issues. +When creating agentic workflows using speech-to-text, use the [dictation instructions prompt](https://raw.githubusercontent.com/github/gh-aw/main/skills/dictation/SKILL.md) to correct terminology mismatches and formatting issues. This prompt corrects terminology (e.g., "ghaw" → "gh-aw", "work flow" → "workflow"), transforms casual speech into imperative task descriptions, removes filler words, and adds implicit context. Load it into your AI assistant before or after dictating. diff --git a/docs/src/content/docs/reference/custom-agent-for-aw.mdx b/docs/src/content/docs/reference/custom-agent-for-aw.mdx index fc75f3dbe99..ce83bf53d85 100644 --- a/docs/src/content/docs/reference/custom-agent-for-aw.mdx +++ b/docs/src/content/docs/reference/custom-agent-for-aw.mdx @@ -119,7 +119,7 @@ Copy the instructions into your AI chat interface, describe your workflow goal, ## Dictating Agentic Workflows -When creating agentic workflows using speech-to-text (dictation), you may encounter terminology mismatches and formatting issues common to voice recognition systems. To help correct these issues, use the [dictation instructions prompt](https://raw.githubusercontent.com/github/gh-aw/main/skills/dictation/SKILL.md) or . +When creating agentic workflows using speech-to-text (dictation), you may encounter terminology mismatches and formatting issues common to voice recognition systems. To help correct these issues, use the [dictation instructions prompt](https://raw.githubusercontent.com/github/gh-aw/main/skills/dictation/SKILL.md) or . This prompt corrects terminology (e.g., "ghaw" → "gh-aw"), removes filler words, and transforms dictated sentences into clear, imperative task descriptions. Load it into your AI assistant before or after dictating to improve accuracy. diff --git a/docs/tests/copy-button.spec.ts b/docs/tests/copy-button.spec.ts index eb011fdf968..4dca97e09ae 100644 --- a/docs/tests/copy-button.spec.ts +++ b/docs/tests/copy-button.spec.ts @@ -6,18 +6,14 @@ test.describe('Copy Entire File Button', () => { await context.grantPermissions(['clipboard-read', 'clipboard-write']); // Navigate to the agentic authoring page - await page.goto('/gh-aw/tools/creating-workflows/'); - - // Debug: print URL and take screenshot - console.log('Current URL:', page.url()); - await page.screenshot({ path: 'test-debug-screenshot.png', fullPage: true }); + await page.goto('/gh-aw/guides/agentic-authoring/'); // Wait for the page to be fully loaded await page.waitForLoadState('networkidle'); - // Find the "Copy full instructions" button + // Find the "Copy dictation instructions" button const copyButton = page.locator('.copy-entire-file-btn', { - hasText: 'Copy full instructions', + hasText: 'Copy dictation instructions', }); // Ensure the button is visible @@ -41,12 +37,12 @@ test.describe('Copy Entire File Button', () => { // Verify the clipboard contains the dictation instructions expect(clipboardContent).toContain('# Dictation Instructions'); - expect(clipboardContent).toContain('Fix text-to-speech errors'); + expect(clipboardContent).toContain('Fix Speech-to-Text Errors'); expect(clipboardContent).toContain('Project Glossary'); // Wait for the button to reset to original text await expect(copyButton.locator('.btn-text')).toHaveText( - 'Copy full instructions', + 'Copy dictation instructions', { timeout: 3000 } ); }); @@ -56,19 +52,19 @@ test.describe('Copy Entire File Button', () => { await context.grantPermissions(['clipboard-read', 'clipboard-write']); // Navigate to the agentic authoring page - await page.goto('/gh-aw/tools/creating-workflows/'); + await page.goto('/gh-aw/guides/agentic-authoring/'); // Wait for the page to be fully loaded await page.waitForLoadState('networkidle'); // Intercept the fetch request and make it fail - await page.route('**/*.instructions.md', (route) => { + await page.route('**/SKILL.md', (route) => { route.abort('failed'); }); - // Find the "Copy full instructions" button + // Find the "Copy dictation instructions" button const copyButton = page.locator('.copy-entire-file-btn', { - hasText: 'Copy full instructions', + hasText: 'Copy dictation instructions', }); // Ensure the button is visible @@ -98,7 +94,7 @@ test.describe('Copy Entire File Button', () => { // Wait for the button to reset to original text await expect(copyButton.locator('.btn-text')).toHaveText( - 'Copy full instructions', + 'Copy dictation instructions', { timeout: 4000 } ); }); @@ -108,22 +104,22 @@ test.describe('Copy Entire File Button', () => { await context.grantPermissions(['clipboard-read', 'clipboard-write']); // Navigate to the agentic authoring page - await page.goto('/gh-aw/tools/creating-workflows/'); + await page.goto('/gh-aw/guides/agentic-authoring/'); // Wait for the page to be fully loaded await page.waitForLoadState('networkidle'); // Intercept the fetch request and return 404 - await page.route('**/*.instructions.md', (route) => { + await page.route('**/SKILL.md', (route) => { route.fulfill({ status: 404, body: 'Not Found', }); }); - // Find the "Copy full instructions" button + // Find the "Copy dictation instructions" button const copyButton = page.locator('.copy-entire-file-btn', { - hasText: 'Copy full instructions', + hasText: 'Copy dictation instructions', }); // Ensure the button is visible @@ -152,7 +148,7 @@ test.describe('Copy Entire File Button', () => { // Wait for the button to reset to original text await expect(copyButton.locator('.btn-text')).toHaveText( - 'Copy full instructions', + 'Copy dictation instructions', { timeout: 4000 } ); });