coder / vscode-coder

Open any Coder workspace in VS Code with a single click.
MIT License
66 stars 15 forks source link

Add support for connections to multiple deployments #292

Closed code-asher closed 4 months ago

code-asher commented 4 months ago

This is broadly three parts, as described by the commits, but the main gist is that the SSH blocks are now scoped (with the deployment URL in the host name), and the individual config files referenced in those config blocks are also scoped (with the deployment URL in the directory), and the connection process has been decoupled from the credentials in VS Code's memory and coupled to the credentials in the associated config directory instead. More context in each commit message; it might even make sense to review by commit.

Existing hosts should not be affected, only new connections will be scoped by deployment. Existing hosts (ones without the deployment in the host) will continue using the old config block and directories. But it will not be possible to add new hosts using the old style; new connections will always be scoped.

I should also clarify that this specifically is for supporting the "Recents" menu that may contain connections from multiple deployments and for reconnections (say you connect and then log into a different deployment while the other connection is still up). It does not let you log into multiple deployments and see all the workspaces from all of them at once.

In other words it closes https://github.com/coder/vscode-coder/issues/173 but not https://github.com/coder/vscode-coder/issues/102.

code-asher commented 4 months ago

I'm gonna want to review more of how this codebase is set up, though. All the individual function calls seemed to make sense, but I feel like there's probably some finer nuances that I'm missing (especially with the VSCode APIs)

I feel that, it is really tough to do code review in an unfamiliar repository. I appreciate your reviews all the same though!