Skip to content

Env-switch feedback and recovery #1032

Description

@notluquis

Following the WebContentsView review, four related gaps in the environment-switch and session-load flow leave the user with no feedback or no way out. All verified against master (e050646).

  • _restartServerInPythonEnvironment (sessionwindow.ts around line 1119) does _disposeSession().then(...) with no .catch. If the old server's stop() rejects (a wedged server), the "Restarting server" spinner stays up forever with no recovery. Add a catch that shows a recovery screen with a Go-to-Welcome link.
  • The env popup Restart button handler (around line 1071) calls the restart without _showProgressView first, unlike the SetSessionPythonPath path. The user sees a blank themed background for the multi-second restart, and a failure renders through _setProgress into a progress view that was never attached, so the error is invisible. Show progress on this path too.
  • Highest impact: the initial local-session load failure (around line 222) reports through _setProgress into a detached progress view, so a bad default env (first run or a restored session) shows a blank content area with no error and no way forward. Use _showProgressView here.
  • There is no in-flight guard on the switch, so a second switch dispatched while the first is still running can stack two lab views and orphan a server. Add a simple "switch in progress" guard.

Reproduce

Highest-impact path (F3, initial local load failure):

  1. Configure the default Python environment so it cannot start a server (for example remove jupyterlab from it, or point it at a broken interpreter).
  2. Launch JupyterLab Desktop so it tries to start a local session with that environment, or restore a session that used it.
  3. The server fails to start.
  4. See a blank area under the title bar with no error message and no way forward.

Restart-button path (F2): open the environment selector in the title bar and click its Restart button. The lab view is removed and the window shows a blank themed background for the multi-second restart, with no spinner; a failure during it shows nothing.

Stuck-spinner path (F1): pick a different environment from the selector while the current server is wedged so its shutdown does not complete. The "Restarting server" spinner stays up forever.

Expected behavior

A visible progress spinner during every restart, and on any failure a "Failed to create session" or "Failed to restart server" screen with a link back to the Welcome page. A second switch dispatched while one is in flight is ignored (F12).

Context

  • Operating System and version: all
  • JupyterLab-Desktop version: master (e050646)

Screenshots (before)

Initial local load failure (F3): the session fails to start and the window is just a title bar over a blank area, no error, no way out.

Image

Restart with no feedback (F2): clicking the popup's Restart button leaves the content blank during the multi-second restart.

Image

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions