-
Notifications
You must be signed in to change notification settings - Fork 2
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open and shut down terminals #12
Comments
Related is that we need to handle an |
I've looked at this and dealing with the shutdown will be fine. But reopening a closed terminal widget is problematic as in JupyterLite this sends an actual REST API request rather than a mocked one. In JupyterLab the code that gets the list of running terminals is: The standard code path to get the list of terminals is However, the equivalent code to reopen a closed terminal widget is To check this, if I change the last line to const models = await TerminalAPI.listRunning(serviceManager.serverSettings); then it works as expected using the mock socket which is routed to the app.router.get('/api/terminals', ...) I don't know enough about the Jupyter Lab and Lite relationship to know if the workaround above is a reasonable thing to do, or if JupyterLite should be handling this in some other way such as by overriding the |
Thanks @ianthomas23 for investigating this! It looks like this should indeed be fixed in JupyterLab directly with the change you proposed above. Would you like to open a PR? Then we'll need to get this in a JupyterLab 4.3.x release, and make a release of JupyterLite updated to the latest |
Yes, I'll do that tomorrow. |
Corresponding JupyterLab issue jupyterlab/jupyterlab#16920 and PR jupyterlab/jupyterlab#16921. |
Problem
Currently it's possible switch to a running terminal if the widget is already opened in the main area. However it's not possible to re-open a closed terminal widget, or shut down a terminal:
jupyterlite-terminal-open-shutdown.webm
Proposed Solution
Implement these functionalities.
Additional context
Tested with the changes from #11.
The text was updated successfully, but these errors were encountered: