Skip to content

Feature Request: Add inline editing to the Git diff view (VS Code-style) #1464

Description

@kha84

Is your feature request related to a problem? Please describe.

When reviewing file diffs (Working Tree vs. HEAD) within the jupyterlab-git extension, the diff view is currently read-only. To make changes or correct mistakes, I am forced to switch to the standard file editor, manually locate the relevant line numbers, and edit the file there. This breaks the workflow, requires context switching between tabs, and is inefficient for quickly iterating on changes while reviewing the diff. It is difficult to maintain focus on the Git view when minor edits are needed.

Describe the solution you'd like

I would like to see an Editable Diff Mode introduced, similar to the functionality available in VS Code and VSCodium.

Specifically:

  • When viewing the diff of a file, there should be a way to enable an "Edit Mode" or toggle that makes the diff content interactive.
  • In this mode, users should be able to click directly into the diff lines, modify the text inline, and have those changes immediately reflected in the underlying file.
  • This allows for quick corrections and iterations without leaving the Git tab or losing the visual context of the diff.
  • Ideally, this mirrors the VS Code experience where the diff view supports inline editing, making the Git integration feel seamless and powerful within JupyterLab.

Describe alternatives you've considered

  • Manual Navigation: Currently, I have to open the file in the Jupyter editor and navigate to the specific line numbers shown in the diff. This is error-prone and slow.
  • External Tools: Using an external Git GUI or command-line tools to make changes, which defeats the purpose of having an integrated extension in JupyterLab.
  • "Open at Line" Button: A button that opens the file at the diff line number would be a minor improvement, but it still requires switching tabs and does not provide the seamless inline editing experience that keeps the workflow contained.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions