jupyter-server / jupyter_ydoc

Jupyter document structures for collaborative editing using Yjs/pycrdt
https://jupyter-ydoc.readthedocs.io
BSD 3-Clause "New" or "Revised" License
29 stars 17 forks source link

Add YDirectory #128

Open davidbrochart opened 1 year ago

davidbrochart commented 1 year ago

Problem

Currently in RTC mode, directories are handled differently than files. The latter use the YDocWebSocketHandler, while the former use HTTP. With https://github.com/jupyterlab/jupyterlab/issues/13527, JupyterLab drives will use the y-websocket, that will allow to drop the HTTP API for directories.

Proposed Solution

I think we should create a new YDirectory document for these "collaborative drives". It will allow listing directories, renaming/deleting files and directories, etc.

hbcarlos commented 1 year ago

I'm improving the IDrive interface and extracting RTC into an extension. Once this is done, we can implement the YDirectory without disruptions in JupyterLab.

davidbrochart commented 11 months ago

Maybe a YDirectory should not be independent from the files that are being edited. The Yjs documentation has an example of file contents "mounted" on the directory document as subdocuments. It would make the "drive" a consistent document for everything stored on disk: listing directories, moving/renaming/deleting files or directories, as well as editing file contents.

cc @ellisonbg @dmonad

davidbrochart commented 10 months ago

I started working on that in https://github.com/jupyter-server/jupyverse/pull/370.