From b0face8c7e700d851d16d45d13b3c6e3d0337525 Mon Sep 17 00:00:00 2001 From: Rhuan Barreto Date: Mon, 13 Apr 2026 23:03:13 +0200 Subject: [PATCH] fix: address valid AI quality findings in docs and init-project MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix truncated Portuguese word 'coment' → 'comentários' in the Sentry study translation, and improve plugin auto-install observability by logging errors via logDebug when catch blocks fall through to manual instructions. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../sentry-pr-review-friction-and-adr-pack.mdx | 14 +++++++------- src/helpers/init-project.ts | 16 ++++++++++++---- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/docs/src/content/docs/pt-br/studies/sentry-pr-review-friction-and-adr-pack.mdx b/docs/src/content/docs/pt-br/studies/sentry-pr-review-friction-and-adr-pack.mdx index 09765ac8..040f3722 100644 --- a/docs/src/content/docs/pt-br/studies/sentry-pr-review-friction-and-adr-pack.mdx +++ b/docs/src/content/docs/pt-br/studies/sentry-pr-review-friction-and-adr-pack.mdx @@ -21,13 +21,13 @@ Leia a publicação canônica (metodologia, métricas, índice de ADRs) em: Alinhado à [metodologia](https://studies.archgate.dev/studies/sentry-pr-review-friction/methodology/) do estudo publicado: -| Conjunto de dados | Contagem | -| -------------------------- | -------------------------------------------------- | -| PRs mesclados | 500 | -| PRs fechados sem merge | 500 | -| PRs abertos amostrados | 251 | -| Análise profunda de coment | 60 PRs de alto atrito (50 mesclados + 10 fechados) | -| Comentários coletados | 965 no total (604 não-bot) | +| Conjunto de dados | Contagem | +| ------------------------------- | -------------------------------------------------- | +| PRs mesclados | 500 | +| PRs fechados sem merge | 500 | +| PRs abertos amostrados | 251 | +| Análise profunda de comentários | 60 PRs de alto atrito (50 mesclados + 10 fechados) | +| Comentários coletados | 965 no total (604 não-bot) | Os dados vêm da API do GitHub (veja a página de metodologia para comandos `gh` exatos, pontuação de atrito e limitações). diff --git a/src/helpers/init-project.ts b/src/helpers/init-project.ts index d837a611..ed967b50 100644 --- a/src/helpers/init-project.ts +++ b/src/helpers/init-project.ts @@ -5,6 +5,7 @@ import { generateExampleAdr } from "./adr-templates"; import { configureClaudeSettings } from "./claude-settings"; import { configureCopilotSettings } from "./copilot-settings"; import { configureCursorSettings } from "./cursor-settings"; +import { logDebug } from "./log"; import { createPathIfNotExists, projectPaths } from "./paths"; import { writeRulesShim } from "./rules-shim"; import { configureVscodeSettings } from "./vscode-settings"; @@ -230,7 +231,11 @@ async function tryInstallPlugin(editor: EditorTarget): Promise { const { loadCredentials } = await import("./credential-store"); const credentials = await loadCredentials(); if (!credentials) { - return { installed: false }; + return { + installed: false, + detail: + "No stored credentials found; plugin installation was not attempted.", + }; } if (editor === "cursor") { @@ -244,8 +249,9 @@ async function tryInstallPlugin(editor: EditorTarget): Promise { try { await installCursorPlugin(credentials.token); return { installed: true, autoInstalled: true }; - } catch { + } catch (error) { // Fall through to manual instructions + logDebug("Failed to auto-install Cursor plugin:", error); } } @@ -274,8 +280,9 @@ async function tryInstallPlugin(editor: EditorTarget): Promise { try { await installCopilotPlugin(); return { installed: true, autoInstalled: true }; - } catch { + } catch (error) { // Fall through to manual instructions + logDebug("Failed to auto-install Copilot plugin:", error); } } @@ -291,8 +298,9 @@ async function tryInstallPlugin(editor: EditorTarget): Promise { try { await installClaudePlugin(); return { installed: true, autoInstalled: true }; - } catch { + } catch (error) { // Fall through to manual instructions + logDebug("Failed to auto-install Claude plugin:", error); } }