vscode-remote-release
vscode-remote-release copied to clipboard
Using `code` command to open new tab opens more than 1 tabs at once
- VSCode Version: 1.69.1
- Local OS Version: Windows 11 FireFox 102.0.1
- Remote OS Version:
- Remote Extension/Connection Type: Server
- Logs:
Steps to Reproduce:
- Setup code-server, serve-local and open multiple instances in browser tabs
- In any of them, open terminal in code, run
code /any/path - Multiple browser tabs are opened, as many as currently opened code browser tabs.
Thanks for the issue, I can readily reproduce this. It also doesn't happen in remote SSH.
I would guess for desktop we just get deduplication for free since, when each window tries to open the folder URI, the main process just focuses the existing window for each additional request. However, in the web this doesn't happen. I think the way to fix this would be to either introduce some kind of deduplication in the remote extension host CLI server, or having some small "lock" in session storage on the vscode.dev side to prevent tabs from opening the duplicate windows. The latter is probably easier since I'm not sure there's a way to say "this command should be delivered only once."
@alexdima is this accurate / do you have any other recommendations?
This was fixed in https://github.com/microsoft/vscode/commit/677b083284ed89d2d237c583dbb6a3d6a8edc2e4