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

Issue with closing a document while a collaborator is editing #260

Open
jzhang20133 opened this issue Mar 22, 2024 · 0 comments
Open

Issue with closing a document while a collaborator is editing #260

jzhang20133 opened this issue Mar 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jzhang20133
Copy link
Collaborator

Description

When a collaborator is still typing into an RTC notebook or just finished typing within 1 second, if another collaborator attempts to close this notebook from their JupyterLab view, a dialog window or pop up window will show up to the user to block closing the file. This experience is pretty clunky.

Screenshot 2024-03-21 at 1 26 41 PM

If clicking save as and choose same file name, it will pop up a dialog saying difference between file on disk and this file.

Screenshot 2024-03-21 at 1 53 29 PM Screenshot 2024-03-21 at 1 53 43 PM

Reproduce

This problem can be reproduce in a collaboration setting AND by a singer user:

Single user (A) case:

  1. Open a notebook file and type in some words.
  2. After finishing typing, within 1 seconds, try to close the notebook file.
  3. You will see the a pop up.

Two user case:

If also have another collaborator user B,

  1. Open a notebook file together
  2. User B keeps typing the same letter repeatedly.==
  3. User A try to close the file
  4. User A will see this pop up window as long as User B is typing. If User A follow the dialog and overwrite the change in disk with notebook file change, it might cause User B to lose content that User B just typed in.

Expected behavior

User should be able to close file without seeing a pop up. No changes should ever be lost.

Suspects

There is a save_interval delay between notebook file is changed and persisting it to disk. I think a separate call to the Contents REST API must be happening when the document is close? This would cause competing "saves".

When user happens to close the file at that time, a content difference is detected between these competing "save" calls and leads to the pop up.

@jzhang20133 jzhang20133 added the bug Something isn't working label Mar 22, 2024
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
Development

No branches or pull requests

1 participant