diff --git a/packages/application-extension/src/index.ts b/packages/application-extension/src/index.ts index 109fd19fc..fac2a0af9 100644 --- a/packages/application-extension/src/index.ts +++ b/packages/application-extension/src/index.ts @@ -159,10 +159,12 @@ const opener: JupyterFrontEndPlugin = { id: '@retrolab/application-extension:opener', autoStart: true, requires: [IRouter, IDocumentManager], + optional: [ISettingRegistry], activate: ( app: JupyterFrontEnd, router: IRouter, - docManager: IDocumentManager + docManager: IDocumentManager, + settingRegistry: ISettingRegistry | null ): void => { const { commands } = app; @@ -178,9 +180,12 @@ const opener: JupyterFrontEndPlugin = { const file = decodeURIComponent(path); const ext = PathExt.extname(file); - app.restored.then(() => { + app.restored.then(async () => { // TODO: get factory from file type instead? if (ext === '.ipynb') { + // TODO: fix upstream? + await settingRegistry?.load('@jupyterlab/notebook-extension:panel'); + await Promise.resolve(); docManager.open(file, NOTEBOOK_FACTORY, undefined, { ref: '_noref' });