From 72a753bd63aaeb4c552db3c16404ff331f86a9fb Mon Sep 17 00:00:00 2001 From: rsi-rohithmr Date: Wed, 1 Oct 2025 16:33:30 +0530 Subject: [PATCH 1/2] Update 4_MoreOptionsToolbarMenu_autosnap.md --- docs/6-Image-Viewer/4_MoreOptionsToolbarMenu_autosnap.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/6-Image-Viewer/4_MoreOptionsToolbarMenu_autosnap.md b/docs/6-Image-Viewer/4_MoreOptionsToolbarMenu_autosnap.md index fe32197..3d96adf 100644 --- a/docs/6-Image-Viewer/4_MoreOptionsToolbarMenu_autosnap.md +++ b/docs/6-Image-Viewer/4_MoreOptionsToolbarMenu_autosnap.md @@ -182,6 +182,7 @@ seen below). Allows you to open the current image in a separate window. + ![mo7](./img_as/mo7_E.png) **Fullscreen Mode (Toggle Button)** From a4e3be2c1ffce320e82078dfcc0bba223d0f32f9 Mon Sep 17 00:00:00 2001 From: rsi-rohithmr Date: Wed, 1 Oct 2025 17:39:55 +0530 Subject: [PATCH 2/2] AWD --- .github/workflows/comment-run-enhanced-flow.yml | 10 ++++++++++ AutoSnap/tracewrightt/src/screenshot_helper.ts | 13 +++++++++++++ 2 files changed, 23 insertions(+) diff --git a/.github/workflows/comment-run-enhanced-flow.yml b/.github/workflows/comment-run-enhanced-flow.yml index e463fb1..031b231 100644 --- a/.github/workflows/comment-run-enhanced-flow.yml +++ b/.github/workflows/comment-run-enhanced-flow.yml @@ -139,6 +139,7 @@ jobs: enhanced-flow-ci-run.log enhanced-flow-log.txt changed-files-*.txt + changed-files-screenshots.txt token_usage_summary.txt AutoSnap/enhanced-flow-log.txt AutoSnap/token_usage_summary.txt @@ -177,6 +178,15 @@ jobs: set -e git config user.name "github-actions[bot]" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + # Prefer explicit list if available + if [ -f changed-files-screenshots.txt ]; then + echo "Using changed-files-screenshots.txt for staging..." + sed -e 's/\r$//' changed-files-screenshots.txt | while IFS= read -r f; do + if [ -n "$f" ] && [ -f "$f" ]; then + git add -- "$f" + fi + done + fi # Stage images from common output locations if [ -d AutoSnap/screenshots ]; then find AutoSnap/screenshots -type f \ diff --git a/AutoSnap/tracewrightt/src/screenshot_helper.ts b/AutoSnap/tracewrightt/src/screenshot_helper.ts index 0a24854..c9b6069 100644 --- a/AutoSnap/tracewrightt/src/screenshot_helper.ts +++ b/AutoSnap/tracewrightt/src/screenshot_helper.ts @@ -11,6 +11,8 @@ import { Page } from '@playwright/test'; export async function forceScreenshotWithRetries(cmd: string, page: Page, aiUtils?: any): Promise { const MAX_RETRIES = 1; let lastError: Error | null = null; + const fs = require('fs'); + const path = require('path'); // Extract the screenshot path from the command string for logging and fallback use. const pathMatch = cmd.match(/path:\s*['"]([^'"]+)['"]/); @@ -99,6 +101,17 @@ export async function forceScreenshotWithRetries(cmd: string, page: Page, aiUtil // If the command succeeds, we log it and update markdown immediately console.log(`✅ Success on attempt ${attempt}! Screenshot saved to ${screenshotPath}`); + + // Append repo-relative screenshot path to a changed files list for CI commit step + try { + const repoRoot = process.cwd(); + const relative = path.relative(repoRoot, String(screenshotPath)).replace(/\\/g, '/'); + const listPath = path.join(repoRoot, 'changed-files-screenshots.txt'); + fs.appendFileSync(listPath, `${relative}\n`, { encoding: 'utf8' }); + console.log(`📝 Appended screenshot to list: ${relative}`); + } catch (appendErr) { + console.warn('⚠️ Could not append screenshot path to list:', appendErr); + } // Update markdown file path immediately after successful screenshot if (aiUtils && aiUtils.updateSingleImagePath) {