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

Add SCM graph commit-file context menus

Abierto
#6 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
52/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
typescript, vscode

Línea de trabajo

Start in an Extension Development Host by verifying the existing scm/historyItem/context contribution and contribSourceControlHistoryItemMenu, then inspect the current history and file command entry points. Implement and test historyFileContext with real, provider-first, and malformed arguments, followed by E2E coverage for modified, added, deleted, and renamed files. Done means the three actions appear on graph file rows and each opens one expected TabInputTextDiff.

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

Descripción

enhancement

Problem

VSCode's standard SCM graph lets a commit expand to show the files changed in that commit. Diffr currently covers commit-row context menus and file context menus in SCM Changes, editor tabs, and Explorer, but it does not expose the primary compare actions on the nested file rows inside an expanded graph commit.

That leaves a gap: a user should be able to drill into a file inside a commit and compare that exact historical file path against another commit, a branch, a tag, the index, or the working copy.

Desired behavior

Right-clicking a file inside an expanded SCM graph commit should show the primary three Diffr actions:

  • Diffr: Compare with...
  • Diffr: Compare with Working Copy
  • Diffr: Compare with Previous

Command behavior:

  • Side A is always the selected file at the containing commit.
  • Compare with... opens the existing SideB picker and supports commit, branch/tag, index, and working copy targets.
  • Compare with Working Copy opens one native VSCode diff against the current workspace file.
  • Compare with Previous opens one native VSCode diff against the containing commit's first parent, using the previous path for renames when VSCode exposes it.
  • The flow must not open the changed-file picker, because the selected graph row already fixes the path.

Implementation notes

  • First verify the exact VSCode menu contribution point and command argument shape in a real Extension Development Host. Commit rows currently use scm/historyItem/context with contribSourceControlHistoryItemMenu; nested commit-file rows must be proven rather than guessed.
  • Add a pure historyFileContext extractor that scans all command args, ignores a provider-first SourceControl arg, and returns the containing SHA plus selected relative path.
  • Add separate history-file commands so commit-row and normal workspace-file commands keep their current behavior.
  • Deleted files should render a deterministic empty side. Renames should use the old path on the parent side when the SCM graph payload provides it.

Acceptance criteria

  • Right-clicking a file inside an expanded SCM graph commit shows the three Diffr actions.
  • Each action opens exactly one TabInputTextDiff for the selected file.
  • Compare-with can target another commit, branch, tag, index, or working copy.
  • Unit tests cover argument extraction, including provider-first and malformed payloads.
  • E2E tests invoke the commands with the captured real SCM graph file-row args and assert expected URIs and human-readable diff titles.
  • Manual smoke covers modified, added, deleted, and renamed files.

Docs updated

  • docs/specs/spec.md
  • docs/plans/plan.md
Lenguaje dominante
TypeScript
Estrellas
2
Forks
1
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

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.

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.