vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Remote explorer help and feedback section shows prompt

Open mjbvz opened this issue 3 years ago • 3 comments

  1. Using vscode.dev with the remote repositories and codespaces extensions installed
  2. Open the remote explorer
  3. Make sure Remote Repositories is selected
  4. Click on Get started under help and feedback

Bug A picker opens

Screen Shot 2022-05-25 at 5 54 41 PM

I'm already in the Remote repositories section though so it should just take me to that extension's help

Version: 1.68.0-insider Commit: d891b49fc0f8fc5e00591657ca225975952b09ca User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36 Embedder: vscode.dev

mjbvz avatar May 26 '22 00:05 mjbvz

@joyceerhl the remote explorer always shows the picker if there's no remoteAuthority in the IWorkbenchEnvironmentService. This is so that when you are not connected to a remote we can always show the picker, no matter what is selected in the Remote Explorer dropdown.

Remote Repositories doesn't cause a remoteAuthority to get set. Is there some other way I can distinguish between a Remote Repositories window and a local window without hardcoding a file scheme?

alexr00 avatar Jun 09 '22 15:06 alexr00

@joyceerhl do you have a suggestion for https://github.com/microsoft/vscode/issues/150426#issuecomment-1151310921?

alexr00 avatar Dec 07 '22 13:12 alexr00

Sorry I missed this--would getVirtualWorkspaceLocation help? https://github.com/microsoft/vscode/blob/2804f9884442d6c0f88d3ee0706f65e2ea4e2ade/src/vs/workbench/contrib/remote/browser/remoteIndicator.ts#L217

joyceerhl avatar Dec 08 '22 17:12 joyceerhl

I need something that will give me the remoteName that is listed in the remoteHelp of the extension. In this case that's virtualfs. getVirtualWorkspaceLocation gives me github. Any chance that the remoteName could be changed?

alexr00 avatar Dec 09 '22 08:12 alexr00

virtualfs seems referenced in the remote indicator: https://github.com/microsoft/vscode/blob/0e20196eae2e98186c881b00de5eb6a9715264bf/src/vs/workbench/contrib/remote/browser/remoteIndicator.ts#L257 but we treat any resource that's not file:// or vscode-remote:// https://github.com/microsoft/vscode/blob/0e20196eae2e98186c881b00de5eb6a9715264bf/src/vs/platform/workspace/common/virtualWorkspace.ts#L11 as virtualfs so it seems a little inappropriate for Remote Repositories to claim virtualfs as the remoteName. (cc @aeschli in case I missed something WRT virtualfs in the remote indicator)

getVirtualWorkspaceLocation(this.workspaceContextService.getWorkspace()) should evaluate to { scheme: 'vscode-vfs', authority: 'github' }. Maybe remoteName should be vscode-vfs instead, and then you could check getVirtualWorkspaceLocation(this.workspaceContextService.getWorkspace()).scheme?

joyceerhl avatar Dec 09 '22 21:12 joyceerhl

@joyceerhl that sounds good to me!

alexr00 avatar Dec 12 '22 10:12 alexr00

You can use getVirtualWorkspaceAuthority()

@alexr00 Maybe using remoteName for that is not super clean. The cleanest would be to add a second property virtualWorkspace

aeschli avatar Dec 12 '22 10:12 aeschli

That makes sense to me, so then the proposed fixes here are

  1. Remote Repositories to declare "virtualWorkspace": "vscode-vfs" in its remoteHelp contribution rather than remoteName
  2. Remote Help to pick up the value of virtualWorkspace and match it to getVirtualWorkspaceLocation(this.workspaceContextService.getWorkspace()).scheme

joyceerhl avatar Dec 12 '22 19:12 joyceerhl

This seems fine to me.

alexr00 avatar Dec 14 '22 12:12 alexr00