microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.51k stars 28.98k forks source link

Settings deep-linking issues when extensions update #223389

Closed joshspicer closed 2 months ago

joshspicer commented 2 months ago

Testing #223027

I'm not able to get this feature working on my linux host 😓 Attached a video for clarity.

https://github.com/user-attachments/assets/2afdd792-de8e-4773-aff2-88d0aa9fa4ed

Repro steps

Tested on Ubuntu 24.04

  1. Install and launch VS Code Insiders
  2. Install Remote - SSH pre-release (or try with a different setting)
  3. Open default browser in Ubuntu 22.04 (Firefox)
  4. Paste in a deep link (eg: vscode-insiders://settings/remote.SSH.permitPtyAllocation)
    1. I also tried following a link on a mock website, source:
      <head><title>Title></title></head>
      <body>
      <a href="vscode-insiders://settings/remote.SSH.permitPtyAllocation">CLICK ME</a>
      </body>
  5. Note that VS Code launches but we aren't deep linked into settings

These steps work successfully for me on my MacOS host

joshspicer commented 2 months ago

When I look at the issue reporter's "Include my system information" output, I can see hte --open-url in the processe's args, though I haven't gotten the setting UI to pop up.

Image

alexr00 commented 2 months ago

I can't repro that it never works on Ubuntu, but I can repro that some settings work and some do not.

alexr00 commented 2 months ago

It's not linux specific. The issue is that the collection of exsiting settings is cached, so if you install an extension that provides another setting after already opening a URL then we think the setting doesn't exist.

alexr00 commented 2 months ago

To verify:

  1. Open a URL as described in the TPI
  2. Install an extension that contributes a setting
  3. Open a URL for your new setting. Verify that the settings editor opens to the correct setting.
  4. Open a URL with a made up setting. Verify that the settings editor shows, but doesn't try to filter to the fake setting.
alexr00 commented 2 months ago

Great find btw. This also unearthed an event that is simply not fired anymore.

andreamah commented 2 months ago

@joshspicer could you verify that this has been fixed since you already have the environment configured? :)

joshspicer commented 2 months ago

Testing on insiders at commit 3b9aee0a96e6a812963418b08316c175e1386d16, still seeing a bit of odd behavior when the editor is completely closed. cc/ @alexr00

Let me know if I can provide a better set of repro steps

https://github.com/user-attachments/assets/401a1f90-5b49-483e-9d73-5404b1a816f2

alexr00 commented 2 months ago

Here's what's happening:

For reference later, here's where we process extension points:

https://github.com/microsoft/vscode/blob/059d46b7edf2f84aeb6d31a7f98bf6381058bc2f/src/vs/workbench/services/extensions/electron-sandbox/nativeExtensionService.ts#L136-L141

joshspicer commented 2 months ago

Working well for me now! I see the empty settings page first pop up, and a moment later the proper setting correctly fills in!