Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store information about recently used kernels or launcher items more generally? #16181

Open
krassowski opened this issue Apr 17, 2024 · 0 comments

Comments

@krassowski
Copy link
Member

Problem

The launcher and the kernel selection dialog can be hard to use when multiple kernels are installed. This was previously reported in #3795 for launcher (20 馃憤 as of the day of writing) but also discussed in extensions such as jupyterlab-conda-store (conda-incubator/conda-store-ui#255).

Proposed Solution

The mockup in #3795 (comment) proposes adding a new section for "Recent" items. Regardless of whether we decide to have this functionality in core, and whether this will be a new section, or an option to change sort order, we would need to store the information about when each kernel/launcher item was most recently used; this may be difficult to achieve in extensions though as kernels can be selected or started in various ways.

Additional context

PR #15483 included in JupyterLab 4.2 introduced a manager for recently opened/closed documents:

export interface IRecentsManager extends IDisposable {
/**
* Get the recently opened documents.
*/
readonly recentlyOpened: RecentDocument[];
/**
* Get the recently closed items.
*/
readonly recentlyClosed: RecentDocument[];
/**
* Signal emitted when either of the list changes.
*/
readonly changed: ISignal<IRecentsManager, void>;
/**
* Check if the recent item is valid, remove if it from both lists if it is not.
*/
validate(recent: RecentDocument): Promise<boolean>;
/**
* Add a new path to the recent list.
*/
addRecent(
document: Omit<RecentDocument, 'root'>,
event: 'opened' | 'closed'
): void;
/**
* Remove the document from recents list.
*/
removeRecent(document: RecentDocument, event: 'opened' | 'closed'): void;
}

We could reuse it to also record info about the launcher items, or we could have a different plugin for this purpose (which might be better from the point of plugin dependency graph).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants