-
Notifications
You must be signed in to change notification settings - Fork 399
Description
Problem
In my JupyterLite deployment, users commonly open the lab either to (a) open a new "session" (with fresh files), (b) to open existing files from a git repo (using litegitpuller) or URL (using jupyterlab-open-url-parameter). For these use cases, it is important to provide fresh sessions where old files don't clash with downloading new ones.
At the moment, I provide these fresh sessions by only using the memory storage driver, i.e. all changes are lost when the window is refreshed. However, this can of course lead to annoying losses of information.
I'm hoping to setup a lite session system that would function as follows:
- When a new tab is opened, the contents drive creates a fresh unique directory, e.g. /sessions/ or /sessions/
- The file browser UI navigates to this directory by default
- Any upload e.g. by the above mentioned extensions also place their contents into this directory
- I use persistent storage drivers so that old session directories exist even after a window reload
- The user is of course free to rename the session directories as they please
Proposed Solution
Would it be possible to create a fresh directory when a new browser tab with JupyterLite is opened? This is probably relatively easy since the upload extensions already hook into the contents API.
Would it be possible to create this directory before any other contents extension runs?
Would be possible for the upload extensions to use this new "default" directory?