annotate shows the launch directory's repo, not the file's
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-docsandmain, the repo and branch ofrefunds.md. - Actual:
acme/paymentsandfeat/refunds. The tab readsrefunds.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
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de backnotprop/plannotator
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
backnotprop/plannotator#2317 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
backnotprop/plannotator#2306 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
backnotprop/plannotator#2243 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Annotate documentation omits per-file version history and privacy controlsQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
backnotprop/plannotator#1086 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 53/100
backnotprop/plannotator#2305 ·
Los mantenedores suelen responder en 1 día
Todos los issues de backnotprop/plannotator
Issues similares
-
Shell: serve the home app's Cookie Policy on a hard reloadPosiblemente ocupada @2001anshkaushik la tomó hoy. Abiertofeature module:ai
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
rocketride-org/rocketride-server#2899 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
wazuh/wazuh-dashboard-plugins#9551 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
gofish-graphics/gofish-graphics#1252 ·
Los mantenedores suelen responder en 1 día
-
optimization P3 size:XS
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
josephfung/curia#2366 ·
Los mantenedores suelen responder en 1 día
-
stranded-follow-up sweep trusts any issue whose body carries the marker as the tracking issueAbiertotype:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
nightgauge/nightgauge#2688 ·
Los mantenedores suelen responder en 1 día