Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix reconnection errors in some multi-window workflows (#5817)
Addresses #5750. The underlying issue is somewhat complicated. Basically: - The list of running sessions is stored in ephemeral storage, scoped to the workspace. - Ephemeral storage is shared among all active windows. - We rely on the fact that ephemeral storage goes away when the app quits in order to prevent reconnection to old sessions. - It is possible however in multi-window scenarios to close and reopen a window in a workspace *without ever quitting Positron itself*. In this scenario, we can try to reconnect to non-existent sessions. The fix is to manually clear out the sessions from ephemeral storage on close/quit. This is not related to the 1.95 merge. ### QA Notes This does not reproduce reliably with the steps in #5750. Here are steps that will cause it to reproduce every time in builds prior to this change. 1. Open a workspace (Workspace 1). 2. Using the Open in New Window gesture on the Project drop down in the upper right, open a different workspace (Workspace 2) in a new window. 3. Start Python and/or R in Workspace 2 and run a few commands. 4. Close Workspace 2, but leave the Workspace 1 window open. 5. In Workspace 1, once again use Open in New Window to open Workspace 2. In Step 5, you will see the window attempt to connect to the sessions that you started in Step 3, but get HTTP 404 since those sessions are not running any more. Also note that the purpose of this machinery is to reconnect to sessions on reload/re-navigate, so double check that that still works.
- Loading branch information