Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

annotate shows the launch directory's repo, not the file's

Abierto Apto para principiantes
#2,290 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
85/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
git, typescript
Área
cli

Línea de trabajo

Lee packages/server/repo.ts para ver cómo getRepoInfo() recurre a process.cwd() y, después, revisa sus llamadas en packages/server/annotate.ts y apps/pi-extension/server/serverAnnotate.ts. Pasa la ruta de destino: el directorio del archivo en el caso de un solo archivo, la carpeta en el caso de una carpeta y la raíz común del paquete en el caso de varios archivos; mantén el directorio de inicio para las URL y para annotate-last. Añade una prueba en la que el destino esté fuera del repositorio del directorio de inicio y confirma que el chip de repo, el chip de rama y el sufijo de la pestaña muestran el repositorio del destino.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

plannotator annotate takes the repo and branch it shows from the directory the command runs
in, not from the repo that holds the file. When an agent launches a review from a different
directory than the document's, the repo chip, the branch chip and the tab title's repo suffix
(#2061) all name the wrong repository.

Repro

Two repos, one nested in the other (a docs repo holding a code checkout, git-ignored):

~/work/payments-docs/          # repo acme/payments-docs, branch main
~/work/payments-docs/payments/ # repo acme/payments, branch feat/refunds
cd ~/work/payments-docs/payments
plannotator annotate ../specs/refunds.md
  • Expected: acme/payments-docs and main, the repo and branch of refunds.md.
  • Actual: acme/payments and feat/refunds. The tab reads refunds.md · acme/payments.

Nesting isn't required. Any launch from outside the file's repo shows the launch directory's repo,
and a file outside any repo gets the launch directory's repo too.

Cause

packages/server/annotate.ts calls getRepoInfo() with no argument, so it falls back to
process.cwd() (packages/server/repo.ts). The Pi extension does the same in
apps/pi-extension/server/serverAnnotate.ts. Code review already passes its git context's
cwd, so it isn't affected.

Suggestion

Resolve the repo from the target when there is one on disk:

  • One file: the file's directory.
  • A folder: the folder.
  • Several files: the common root the bundle already computes.
  • A URL or annotate-last: keep the launch directory, as today.

The change is one argument at each call site, plus a test with the target outside the launch
directory's repo. Happy to send the PR.

Lenguaje dominante
TypeScript
Estrellas
8.7k
Forks
649
Merge medio
11 h 48 min
PR fusionados (30 d)
552

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de backnotprop/plannotator

Todos los issues de backnotprop/plannotator

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.