Currently it is possible for other extensions to get the document (or it's copy - by default) if there is a collaborative session for it. However, it is not currently possible to create the document room when it does not exist. This would be useful to allow server-side execution for notebooks which are not currently open (e.g. user clicks from context menu in the file browser on the notebook and chooses to execute it).
Proposed Solution
Add a new public API for creating the notebook. This could be as simple as a new argument to the existing get_document, a boolean create which would default to false.
Problem
Currently it is possible for other extensions to get the document (or it's copy - by default) if there is a collaborative session for it. However, it is not currently possible to create the document room when it does not exist. This would be useful to allow server-side execution for notebooks which are not currently open (e.g. user clicks from context menu in the file browser on the notebook and chooses to execute it).
Proposed Solution
Add a new public API for creating the notebook. This could be as simple as a new argument to the existing
get_document
, a booleancreate
which would default to false.Additional context
https://github.com/jupyterlab/jupyter-collaboration/blob/bcc36e1a451aaa5dbfbe020db72070149bd934bd/projects/jupyter-server-ydoc/jupyter_server_ydoc/app.py#L136-L145