-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Bug description
When I open a .qmd file in JupyterLab using the notebook interface (via Quarto’s extension), the content shown is from an older version, even though the file on disk has been updated (e.g., via git checkout). The text editor shows the correct version. However, the notebook interface displays stale cells. If I save the file from the notebook view, it overwrites the correct disk version with this outdated content.
I believe this is related to the Jupytext integration used internally to parse .qmd into a notebook format. It seems to cache or restore an outdated in-memory version.
What I’ve Tried:
- Closing notebook tabs before using
git checkout - Deleting:
- .ipynb_checkpoints
- ~/.jupyter/lab/workspaces/
- ~/.local/share/jupyter/runtime/
- Browser data: LocalStorage, IndexedDB, Cache, Service Workers
- Opening JupyterLab in incognito/private browser sessions
- Copying the file to a new name (e.g.,
cp notebook.qmd notebook_copy.qmd) — issue still reproduces
None of these steps resolved the issue.
Steps to reproduce
- Create and edit a
.qmdfile with markdown and code cells. - Commit this file to Git.
- Modify and commit a new version.
- Use
git checkoutto switch to the older version (or switch branches). - Open the
.qmdfile in JupyterLab:- In the text editor: the file content is correct (matches disk).
- In notebook view: the content is outdated (shows old version).
- Save the file from the notebook view. This overwrites the correct file with the old content.
Actual behavior
Notebook view shows an older version of the file. Saving from this view reverts the file to outdated content.
Expected behavior
Notebook view should reflect the content on disk, just like the text editor does.
Your environment
- Quarto version: 1.7.31
- JupyterLab version: 4.2.5
- Jupytext version: 1.16.7
- Browser: Chrome Version 136.0.7103.114 (Official Build) (x86_64)
- OS: Ubuntu 22.04