-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Hitting Command(Ctrl) + S on in an RTC notebook results in a "File Changed" dialog #312
Comments
Same here. I have a docker container (based on python:bullseye) with only Jupyter Lab (v. 4.2.0) and the jupyter-collaboration extension. Observations:
One workaround seems to be to add this snippet to
However, that is just an ad-hoc workaround. A cleaner solution would be nice :-) |
Without collaboration I see the following contents created on disk: {
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 5
} which is stable. With collaboration I see the same initially, but after a few seconds the disk content changes to: {
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "791ff2aa-e215-452e-b171-5e7d4d3902c8",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.8"
}
},
"nbformat": 4,
"nbformat_minor": 5
} the inclusion of random cell id explains why the new hash appears to be random. In other words, collaboration extension updates the disk content in the background after creating a notebook, without refreshing the last held hash for document content. |
Currently saving to disk happens in the background on the jupyter-server side via loader approximately once every second ( Some possible solutions:
To me (b) appears the cleanest solution. If we want the loader to update hash on save it could be either in the same way as the jupyter-collaboration/projects/jupyter-server-ydoc/jupyter_server_ydoc/rooms.py Lines 274 to 282 in 7ea2cd5
or in the way last_modified is updated here:jupyter-collaboration/projects/jupyter-server-ydoc/jupyter_server_ydoc/loaders.py Lines 162 to 167 in 7ea2cd5
|
Hi @ibdafna would you have time to help with review of #337 and jupyterlab/jupyterlab#16695? |
See attached gif
The text was updated successfully, but these errors were encountered: