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

"Two collaborative sessions" warning when one user opens the same file twice, with different schemas, in the same session #371

Open
JasonWeill opened this issue Oct 14, 2024 · 3 comments

Comments

@JasonWeill
Copy link
Contributor

Description

When I open a file twice, with two different schemas in the same Lab session with Collaboration enabled, I see a warning:

Two collaborative sessions are accessing the file (name) simultaneously. Opening a document with multiple views simultaneously is not supported. Please close one view; otherwise, you might lose some of your progress.

Screenshot 2024-02-26 at 11 42 20 AM (1)

Reproduce

  1. Create a notebook, foo.ipynb. Save it. Leave it open.
  2. Right-click on foo.ipynb in the file browser. Hover over "Open With", and click "Editor."
  3. The notebook opens in what looks like a text file editor. The warning message above appears.

Expected behavior

Either the open operation fails entirely with a message that the file is already open, or the file opens without a warning of any sort.

Personally, I think it would be acceptable to, when Jupyter Collaboration is installed, reject opening the same file more than once, with different schemas.

Context

This warning was first seen in #245, when creating a new file.

Opening the same notebook in two separate browser tabs/windows does not cause this error.

@JasonWeill JasonWeill added the bug Something isn't working label Oct 14, 2024
@davidbrochart davidbrochart removed the bug Something isn't working label Oct 15, 2024
@davidbrochart
Copy link
Collaborator

I don't think this is a bug. It's fine to open the same file twice as long as changes are made on only one view.

@JasonWeill
Copy link
Contributor Author

When opening the same file a second time, is it feasible to detect that the file is already open in a read/write editor, and force the second editor to be read-only?

@davidbrochart
Copy link
Collaborator

I think that would complicate the picture. I would rather make it possible to collaborate between different views, as I tried to explain in jupyter-server/jupyter_ydoc#15.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants