Automatically start workspace if started and not running#583
Automatically start workspace if started and not running#583EhabY merged 2 commits intocoder:mainfrom
Conversation
mtojek
left a comment
There was a problem hiding this comment.
I presume it will be hard to cover with unit tests since it is mainly in remote.ts?
Indeed, and this is heavily using the VS Code API where there are no existing tests for (yet). Currently working a design that would allows us to mock this for tests :) |
97c6288 to
96109ed
Compare
|
Ah wait we added this dialog because VS Code was starting user's workspaces automatically on reconnect which users did not want, since it continually kept their workspace up without asking. It basically bypasses cost controls by circumventing auto-stop. We should only automatically start the workspace if the connection is explicitly started by user action (rather than automatic reconnect). |
|
BTW there is an issue for this: #331 |
|
And the original issue for adding the dialog: #309 An alternative (and more ideal) fix to the "start workspace?" dialog would be if we could make VS Code ask before reconnecting if the workspace is off, but not sure if that is possible so we went with the "start workspace?" dialog instead. |
|
Oh nice catch, I wasn't sure if we wanted to reconnect on explicit actions only. I think I can potentially make it automatically only using the "play" button. We can use some memento trickery to detect if this is a "first connect" so that when users press "play" it's automatic, but I am not sure if we can fix it for the recents menu.. |
|
Yeah the recents menu might be a bust, I think we would have to replace the remote extension with our own so we fully control the whole lifecycle. Memento is a neat idea! |
Closes #582
Now it'll attempt to start the workspace when clicking on the "play" button or reloading a window that is already connected.
Currently when building we show a terminal with the build progress, this is good, but we can potentially also show a progress indicator between the different steps.