Skip to content

Create a default folder (for lite sessions #1518

@juntyr

Description

@juntyr

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:

  1. When a new tab is opened, the contents drive creates a fresh unique directory, e.g. /sessions/ or /sessions/
  2. The file browser UI navigates to this directory by default
  3. Any upload e.g. by the above mentioned extensions also place their contents into this directory
  4. I use persistent storage drivers so that old session directories exist even after a window reload
  5. 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions