Skip to content

Conversation

@jtpio
Copy link
Member

@jtpio jtpio commented Sep 1, 2025

Fixes #50
Replaces #52

  • Add a setting to index files from the frontend directly (enabling the use in JupyterLite)
  • Keep the server extension as the default
  • Add a depth setting to control the max search depth
  • JupyterLite deployment on GitHub Pages
jupyterlab-quickopen-depth-frontend.mp4

@jtpio jtpio added the enhancement New feature or request label Sep 1, 2025
@github-actions
Copy link

github-actions bot commented Sep 1, 2025

Binder 👈 Launch a Binder on branch jupyterlab-contrib/jupyterlab-quickopen/support-jupyterlite

@jtpio
Copy link
Member Author

jtpio commented Sep 1, 2025

The build JupyterLite archive seems to be working fine, with the frontend indexing set by default:

jupyterlab-quickopen-lite.mp4

@jtpio jtpio marked this pull request as ready for review September 1, 2025 15:56
@jtpio jtpio requested a review from Copilot September 1, 2025 16:08
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds frontend-driven file indexing support to enable JupyterLite compatibility while maintaining the existing server-based indexing as the default. It restructures the codebase to use a provider pattern and adds depth control for search operations.

  • Adds a frontend provider using JupyterLab's Contents API for JupyterLite environments
  • Introduces configurable search depth limits for both frontend and server indexing
  • Creates a JupyterLite demo deployment with GitHub Pages integration

Reviewed Changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/widget.ts Extracted QuickOpenWidget class from index.ts with updated provider interface
src/tokens.ts Enhanced provider interface with options object and depth parameter
src/serverProvider.ts Renamed from defaultProvider.ts, updated to use new options interface
src/index.ts Refactored to use provider pattern with dynamic provider switching
src/handler.ts Removed unused API handler utilities
src/frontendProvider.ts New frontend implementation using Contents API for JupyterLite
schema/plugin.json Added indexingMethod and depth configuration settings
jupyterlab_quickopen/handler.py Added depth parameter support to server endpoint
demo/* Added JupyterLite demo configuration files
.github/workflows/deploy.yml Added GitHub Pages deployment workflow

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Member

@martinRenou martinRenou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I only have a small question, otherwise it looks great :)

}

try {
const listing = await this._contentsManager.get(dirPath, {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is for JupyterLite support?

Long-term, we may want to extend the contentsManager implementation so that we don't need to make the recursive gets here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, indeed, this one is only for the frontend provider, so the provider making the calls to the contents API one by one.

we may want to extend the contentsManager implementation

You mean extending it directly in Jupyterlite? If so yes, that could be an option. Also the quickopen provider is defined in its own plugin, so it could be replaced by another plugin provided by JupyterLite.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean extending it directly in Jupyterlite

I guess I mean that if the more advanced handler for recursive get gets into jupyterlab-server, then the contentsManager API will be updated to expose this new recursive get. Then JupyterLite will have to implement it and we can get rid of the recursion here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I guess this FrontendQuickOpenProvider is mostly to enable the use of the extension in JupyterLite, and have everything available in the same jupyterlab-quickopen extension.

If we decide to propose this extension for incorporation into core JupyterLab, we can expose the provider token and drop that custom FrontendQuickOpenProvider, since JupyterLite will be able to provide its own.

@jtpio
Copy link
Member Author

jtpio commented Sep 2, 2025

Getting this in a new release.

@jtpio jtpio merged commit 5804d31 into main Sep 2, 2025
7 checks passed
@jtpio jtpio deleted the support-jupyterlite branch September 2, 2025 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JupyterLite support

3 participants