redhat-developer / vscode-rsp-ui

A unified UI for all RSP servers and RSP server-providers to integrate with
Eclipse Public License 2.0
38 stars 21 forks source link

"Create New Server..." command should not show in Extension View title area #265

Closed akaroml closed 1 year ago

akaroml commented 1 year ago

Type: Bug

  1. Go to the extension view
  2. Click "..." and select "Check for Extension Updates"
  3. Observe the title bar where a button appears with the hover info "Create New Server..."

Please refer to the screen recording for detailed steps. https://user-images.githubusercontent.com/16755094/223619431-71dee15e-e237-4ecb-8333-947216e24406.mov

And a screenshot too: Screenshot 2023-03-08 at 17 14 53

That button is actually a contribution from the Remote Server Protocol UI The contribution is unrelated to Extension View, but it shows up in the view title area for unknown reasons.

This was originally reported as Microsoft/vscode#176464 but they suggested to report to the extension author.

VS Code version: Code - Insiders 1.77.0-insider (bbc87d8ec2453f12c0066e1c30b41cd5bd2aa021, 2023-03-07T05:25:27.031Z) OS version: Darwin x64 22.3.0 Modes: Sandboxed: Yes

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz (16 x 2300)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|2, 3, 5| |Memory (System)|32.00GB (0.27GB free)| |Process Argv|--crash-reporter-id 46932cee-d454-454c-8cd2-509eb89e7e8b| |Screen Reader|no| |VM|0%|
Extensions (62) Extension|Author (truncated)|Version ---|---|--- codespaces|Git|1.13.10 copilot|Git|1.77.9225 vscode-pull-request-github|Git|0.60.0 vscode-graphql|Gra|0.8.6 vscode-graphql-syntax|Gra|1.1.0 file-downloader|min|1.0.12 mindaro|min|2.0.120230216 vscode-azureappservice|ms-|0.24.7 vscode-azurefunctions|ms-|1.10.3 vscode-azureresourcegroups|ms-|0.6.1 vscode-azurevirtualmachines|ms-|0.6.4 vscode-cosmosdb|ms-|0.19.3 vscode-docker|ms-|1.24.0 dotnet-interactive-vscode|ms-|1.0.4157011 vscode-aks-tools|ms-|1.3.11 vscode-kubernetes-tools|ms-|1.3.11 python|ms-|2023.4.0 vscode-pylance|ms-|2023.3.10 jupyter|ms-|2023.2.1000592019 vscode-jupyter-cell-tags|ms-|0.1.6 vscode-jupyter-slideshow|ms-|0.1.5 remote-containers|ms-|0.283.0 remote-ssh|ms-|0.98.0 remote-ssh-edit|ms-|0.84.0 remote-wsl|ms-|0.76.1 vscode-remote-extensionpack|ms-|0.24.0 anycode-c-sharp|ms-|0.0.5 anycode-cpp|ms-|0.0.5 anycode-go|ms-|0.0.5 anycode-java|ms-|0.0.5 anycode-kotlin|ms-|0.0.5 anycode-php|ms-|0.0.6 anycode-python|ms-|0.0.5 anycode-rust|ms-|0.0.6 anycode-typescript|ms-|0.0.5 azure-account|ms-|0.11.3 remote-explorer|ms-|0.2.0 remote-server|ms-|1.0.0 vscode-github-issue-notebooks|ms-|0.0.128 java|red|1.16.2023030303 vscode-commons|red|0.0.6 vscode-community-server-connector|red|0.26.4 vscode-rsp-ui|red|0.23.17 vscode-server-connector|red|0.26.1 vscode-xml|red|0.24.0 vscode-yaml|red|1.11.0 sonarlint-vscode|Son|3.15.1 ms-teams-vscode-extension|Tea|4.2.4 intellicode-api-usage-examples|Vis|0.2.7 vscodeintellicode|Vis|1.2.30 vscode-boot-dev-pack|vmw|0.2.1 vscode-spring-boot|vmw|1.44.0 vscode-azurespringcloud|vsc|0.6.0 vscode-gradle|vsc|3.12.2023030400 vscode-java-debug|vsc|0.49.2023022723 vscode-java-dependency|vsc|0.21.2023030400 vscode-java-pack|vsc|0.25.2023021400 vscode-java-test|vsc|0.38.2023030203 vscode-lombok|vsc|1.1.0 vscode-maven|vsc|0.40.2023030703 vscode-spring-boot-dashboard|vsc|0.11.1 vscode-spring-initializr|vsc|0.11.2023030203
robstryker commented 1 year ago

So.... this is a really weird bug.

The code in our package.json is:

    "menus": {
      "view/title": [
        {
          "command": "server.createServer",
          "when": "view =~ '/(servers)/'",
          "group": "navigation"
        }
      ],

Me and @rgrunber are only able to replicate this if we manually change that to view =~ extensions or something like that. There's no obvious reason why this action should be showing up in the extensions view in any normal situation. We're matching on the view having an id or a name of 'servers'. Neither the extensions nor the extensions.marketplace views have ids that match that string.

For now, I'll be adjusting it to view == servers and see if that fixes the issue for you. I'll be doing a snap release today anyway so might as well push this out and see if it fixes anything.

rgrunber commented 1 year ago

The most I could find is at https://github.com/microsoft/vscode/blob/deedbd33f5dc57795e11da7c2a26b5a05a93485b/src/vs/workbench/services/extensionManagement/common/extensionManagementServerService.ts#L32-L48

https://github.com/microsoft/vscode/blob/deedbd33f5dc57795e11da7c2a26b5a05a93485b/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts#L152-L155

I think these contributions could set the id of the extension view. Maybe some extension management server had an id with 'server' in it ?

robstryker commented 1 year ago

Maybe it's related to this:

https://github.com/redhat-developer/vscode-rsp-ui/issues/264

Seems vscode is changing how their 'when' clauses function.