Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spurious "File Changed" dialog in JupyterLab 4.1+/Notebook 7.1+ #337

Merged
merged 4 commits into from
Aug 22, 2024

Conversation

krassowski
Copy link
Member

@krassowski krassowski commented Aug 18, 2024

@krassowski krassowski added the bug Something isn't working label Aug 18, 2024
@krassowski krassowski changed the title Fix spurious "File Changed" dialog in JupyterLab 4.1/Notebook 7.1 Fix spurious "File Changed" dialog in JupyterLab 4.1+/Notebook 7.1+ Aug 18, 2024
Copy link
Contributor

Binder 👈 Launch a Binder on branch krassowski/jupyter_collaboration/fix-spurious-save-dialog

Copy link
Collaborator

@davidbrochart davidbrochart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@davidbrochart
Copy link
Collaborator

Now that we use the file hash, we could use it to check if the server was the one who saved the file last, instead of using timestamps (see jupyter-server/jupyter_server#1367 (comment) and jupyterlab/jupyterlab#14031 (comment)). This could be done in another PR.

self._contents_manager.get(
self.path,
content=False,
require_hash=True, # TODO require version supporting hash
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will address this one before merging.

As only 2.11.1 added `require_hash` argument
@krassowski krassowski merged commit 1b74c43 into jupyterlab:main Aug 22, 2024
20 checks passed
@krassowski krassowski deleted the fix-spurious-save-dialog branch August 28, 2024 12:29
@shrutiagarwal13
Copy link

Hi team,
I tried installing jupyter-collaboration v3.0.0beta3 with JupyterLab 4.1.0, and jupyter-collaboration v3.0.0beta6 with JupyterLab 4.2.5, hoping to resolve the 'File Changed' dialog issue. However, I am still encountering this problem. Any insights or suggestions would be greatly appreciated!

Attaching the screenshot for reference:
image

@krassowski
Copy link
Member Author

@shrutiagarwal13 you need JupyterLab 4.3.0b1 and jupyter-ydoc v3.0.0a4. If it does not work with these versions and jupyter-collaboration pre-release let me know.

@shrutiagarwal13
Copy link

@krassowski thanks for reaching out. While the issue occurs less frequently now, I still encounter errors in certain scenarios, as shown in the attached screen recording. This tends to happen when pressing 'Ctrl+S' multiple times.

The following package versions are installed:

$ pip list | grep jupyter
jupyter_client               8.6.1
jupyter-collaboration        3.0.0b3
jupyter-collaboration-ui     1.0.0b6
jupyter_core                 5.7.2
jupyter-docprovider          1.0.0b6
jupyter-events               0.10.0
jupyter-lsp                  2.2.5
jupyter-resource-usage       1.1.0
jupyter_server               2.14.0
jupyter_server_fileid        0.9.3
jupyter-server-mathjax       0.2.6
jupyter_server_proxy         4.4.0
jupyter_server_terminals     0.5.3
jupyter-server-ydoc          1.0.0b6
jupyter-telemetry            0.1.0
jupyter-tensorboard-proxy    0.2.1
jupyter-vscode-proxy         1.0.0
jupyter-ydoc                 3.0.0a4
jupyterhub                   4.1.5
jupyterlab                   4.3.0b1
jupyterlab_git               0.50.1
jupyterlab-logout            1.0.0
jupyterlab_pygments          0.3.0
jupyterlab-s3-browser        0.12.0
jupyterlab_server            2.27.1
jupyterlab-theme-toggler     1.0.0
jupyterlab_widgets           3.0.13
JLab_Collab_Error3.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants