-
Notifications
You must be signed in to change notification settings - Fork 10
Description
The client takes no remedial action when the websockets close. This can be confusing to a user, since the app looks normal.
I think the easiest way of implementing this is to watch the websocket connection client-side, and react to it being closed. The JupyterLab kernel client that we use already supports monitoring a rich set of kernel events that we can just hook into.
To try these out, add this to WidgetApplication.js just after the kernel is created.
this._kernel.statusChanged.connect((sender, msg) => console.log(msg))If you interrupt the server, you can see that the status goes to reconnecting, then, after 2 minutes, the status goes to dead. When the status becomes dead, we want to take some remedial action.
For the actual implementation of the modal, we can probably use the Dialog class from @jupyterlab/apputils.