Repository: vscode
Issue: Extension `Uninstall` not behaving as expected regarding local or remote uninstall
Labels: polish,extensions

## Steps to Reproduce

(originally reported in https://github.com/microsoft/vscode/issues/207724)

1. Uninstall an extension from the local view (greyed out) by clicking it and selecting Uninstall (screenshot 1),
2. It then shows it being uninstalled both in the local view, remote view and in the extension info window itself (screenshot 2).
3. Reload VS Code.
4. Now it shows it in the local view, but not in the remote view. And in the extension window itself one is able to click Uninstall again (screenshot 3).

This makes no sense as it was uninstalled in screenshot 2. It should have been gone completely and screenshot 3 should never have shown it.

**Screenshot 1**
![image](https://github.com/microsoft/vscode/assets/30827238/61f8cda1-ad91-4b2a-95d3-6e7b120dedf6)

**Screenshot 2**
![image](https://github.com/microsoft/vscode/assets/30827238/00697e88-33c9-49ce-9360-faf73d89a22a)

**Screenshot 3**
![image](https://github.com/microsoft/vscode/assets/30827238/45df84da-7c16-4049-aefe-a6130ad7d240)

## Solution proposal
@sandy081 asked me to open an issue https://github.com/microsoft/vscode/issues/207724#issuecomment-2064612389:

> I can see the confusion here. Opening an extension always opens the active one. In this case the extension on the remote one was opened. But I agree it should open the extension that user clicks on. Can you please file a separate issue for this so that we can track this separately.

**_My recommendation_** though would possibly be that the actual `Uninstall` button and its dropdown should be improved. There are a few options:
1. Have the button default uninstall both locally and remotely.
2. Have it say `Uninstall (local`) or `Uninstall (remote: remote_name_here)` so people know where it is uninstalled.
3. No matter 1) or 2), add drop-down items to the menu to uninstall from other places than the default button action.

VS Code version: Code 1.88.1 (e170252f762678dec6ca2cc69aba1570769a5d39, 2024-04-10T17:41:02.734Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Remote OS version: Linux x64 5.4.0-177-generic

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|12th Gen Intel(R) Core(TM) i5-1245U (12 x 2496)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: enabled_on<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_graphite: disabled_off<br>video_decode: enabled<br>video_encode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: enabled|
|Load (avg)|undefined|
|Memory (System)|31.64GB (16.73GB free)|
|Process Argv|--crash-reporter-id 59df0552-792a-4e7c-92f1-327caa3dd76d|
|Screen Reader|no|
|VM|0%|

|Item|Value|
|---|---|
|Remote|SSH: vm|
|OS|Linux x64 5.4.0-177-generic|
|CPUs|Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz (8 x 2394)|
|Memory (System)|31.32GB (25.69GB free)|
|VM|21%|
</details><details><summary>Extensions (40)</summary>

Extension|Author (truncated)|Version
---|---|---
yang|mar|0.1.3
jupyter-keymap|ms-|1.1.2
remote-containers|ms-|0.354.0
remote-ssh|ms-|0.110.1
remote-ssh-edit|ms-|0.86.0
remote-wsl|ms-|0.88.0
vscode-remote-extensionpack|ms-|0.25.0
remote-explorer|ms-|0.4.3
remote-server|ms-|1.5.1
vscode-openapi|42C|4.25.3
lit-html|bie|1.11.1
markdown-preview-github-styles|bie|2.0.4
vscode-fish|bma|1.0.38
ruff|cha|2024.20.0
vale-vscode|chr|0.19.0
vscode-markdownlint|Dav|0.55.0
vscode-eslint|dba|2.4.4
gitlens|eam|14.9.1
prettier-vscode|esb|10.4.0
code-runner|for|0.12.2
go|gol|0.41.4
path-autocomplete|ion|1.25.0
restructuredtext|lex|190.3.0
vscode-azureresourcegroups|ms-|0.8.6
vscode-cosmosdb|ms-|0.21.0
vscode-docker|ms-|1.29.0
vscode-kubernetes-tools|ms-|1.3.16
debugpy|ms-|2024.4.0
python|ms-|2024.4.1
vscode-pylance|ms-|2024.4.1
azure-account|ms-|0.11.6
vscode-thunder-client|ran|2.21.15
vscode-yaml|red|1.14.0
vscode-direnv|Rub|0.0.2
code-spell-checker|str|3.0.1
vscode-stylelint|sty|1.4.0
even-better-toml|tam|0.19.2
shellcheck|tim|0.37.1
simple-rst|tro|1.5.4
vscode-proto3|zxh|0.5.5


</details><details>
<summary>A/B Experiments</summary>

```
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
vscorecescf:30445987
vscod805:30301674
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
vscaat:30438848
c4g48928:30535728
azure-dev_surveyonecf:30548226
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
h48ei257:31000450
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
8082a590:30971561
fegfb526:30981948
bg6jg535:30979843
ccp2r3:30993541
dsvsc020:30976470
pythonait:31006305
gee8j676:31009558
showvideot:31016892
chatpanelc:31018788
dsvsc021:30996838
724cj586:31013169
pythoncenvpt:31022790

```

</details>

<!-- generated by issue reporter -->