Skip to content

Improve stash apply handling & error reporting when notebook metadata changes cause conflicts #1422

@Azza-Maalej

Description

@Azza-Maalej

When applying a stash in jupyterlab-git, the action silently fails in the UI if local notebook metadata changes cause conflicts. The browser console shows:

Image

This often happens even without manual edits — opening a notebook can update its metadata and trigger the conflict.

Steps to reproduce:

  1. Stash changes in a branch using JupyterLab Git.
  2. Switch to another branch, make unrelated edits.
  3. Return to the original branch.
  4. Open and close any notebook without doing changes
  5. Click “Apply Stash” — nothing happens in the UI.

Describe the solution you'd like

• Clear error message in the UI with the list of conflicting files.
• Option to stash/discard current changes before retrying.
• Ability to ignore notebook metadata-only changes when applying stash.

Describe alternatives you've considered

  1. Show detailed error dialog instead of silent failure.
  2. Add “ignore notebook metadata changes” option during stash apply.
  3. Prompt to stash/discard current changes if needed.
  • Python package version:
    Name: jupyterlab_git
    Version: 0.51.2
  • Extension version:
    jupyterlab_pygments v0.3.0 enabled OK (python, jupyterlab_pygments)
    jupyter_app_launcher v0.3.2 enabled OK (python, jupyter_app_launcher)
    nbdime-jupyterlab v3.0.2 enabled OK
    @jupyter/docprovider-extension v4.1.0 enabled OK (python, jupyter-docprovider)
    @jupyter/collaboration-extension v4.1.0 enabled OK (python, jupyter-collaboration-ui)
    @jupyter-widgets/jupyterlab-manager v5.0.13 enabled OK (python, jupyterlab_widgets)
    @jupyterhub/jupyter-server-proxy v4.4.0 enabled OK
    @jupyterlab/git v0.51.2 enabled OK (python, jupyterlab-git)
    @jupyter-notebook/lab-extension v7.4.1 enabled OK
    @lckr/jupyterlab_variableinspector v3.2.4 enabled X (python, lckr_jupyterlab_variableinspector)
  • Git version:
    git version 2.43.5
  • Operating System and its version:
    Redhat Entreprise Linux 8

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions