diff --git a/.github/workflows/comment-run-enhanced-flow.yml b/.github/workflows/comment-run-enhanced-flow.yml index 031b231..fe65f8e 100644 --- a/.github/workflows/comment-run-enhanced-flow.yml +++ b/.github/workflows/comment-run-enhanced-flow.yml @@ -183,7 +183,7 @@ jobs: 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" + git add -f -- "$f" fi done fi diff --git a/AutoSnap/tracewrightt/src/screenshot_helper.ts b/AutoSnap/tracewrightt/src/screenshot_helper.ts index c9b6069..37bd1dc 100644 --- a/AutoSnap/tracewrightt/src/screenshot_helper.ts +++ b/AutoSnap/tracewrightt/src/screenshot_helper.ts @@ -105,7 +105,15 @@ export async function forceScreenshotWithRetries(cmd: string, page: Page, aiUtil // 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 isAbsolute = typeof screenshotPath === 'string' && (screenshotPath.startsWith('/') || /:\\|:\//.test(screenshotPath)); + // If path is relative, resolve it against the current markdown file directory when available + let absolutePath = String(screenshotPath); + if (!isAbsolute) { + const currentMdPath = aiUtils && aiUtils.getCurrentMdFilePath ? aiUtils.getCurrentMdFilePath() : null; + const baseDir = currentMdPath ? path.dirname(currentMdPath) : repoRoot; + absolutePath = path.resolve(baseDir, absolutePath); + } + const relative = path.relative(repoRoot, absolutePath).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}`); diff --git a/spanish/6-Image-Viewer/4_MoreOptionsToolbarMenu.md b/spanish/6-Image-Viewer/4_MoreOptionsToolbarMenu.md index e66bc24..c9c3dfd 100644 --- a/spanish/6-Image-Viewer/4_MoreOptionsToolbarMenu.md +++ b/spanish/6-Image-Viewer/4_MoreOptionsToolbarMenu.md @@ -158,7 +158,6 @@ Permite alterar as configuraƧƵes do Visualizador de Imagens para vĆ”rias categ - **Finalidade:** Controla a visibilidade do menu do viewport. - **Funcionalidade:** Os usuĆ”rios podem ativar ou desativar esta configuração para ocultar ou mostrar automaticamente o menu do viewport, proporcionando um espaƧo de trabalho mais limpo. Quando ativada, o menu permanece oculto atĆ© que o usuĆ”rio interaja com ele. - ![More%20Settings.png](./img/More%20Settings.png) **Abrir em Janela Separada**