vscode: Banner for workspace trust is not significant enough and themed as info-only

Does this issue occur when all extensions are disabled?: Yes/No

Version: 1.98.0-insider (system setup) Commit: 44028decf1ca81a0cbf99a65ab72cca6735449f2 Date: 2025-02-14T05:04:46.748Z Electron: 34.1.0 ElectronBuildId: 10990655 Chromium: 132.0.6834.194 Node.js: 20.18.1 V8: 13.2.152.38-electron.0 OS: Windows_NT x64 10.0.26120

Problem

NEW users to VS Code and our extension are getting challenges with Workspace Trust creating extensions in restricted mode and thus the commands for the extension are not visible to them. Our users are repeatably getting in to a state where the banner about workspace trust is not discernable as something as important that may be blocking their functionality. It is marked as a security banner (the keyhole badge), but it is ‘info’ themed:

Image

This is very ignorable in the visual of a large screen. Even in our internal team case studies seasoned developers didn’t see this as an important banner.

We have root-caused customer reports (https://github.com/microsoft/vscode-dotnettools/issues/1653) to our extension (that have been coming in at a sustaining pace) to this problem. This creates some new-user onboarding problems users exiting our workflow/funnels in getting in to the tool and our platform extension.

Proposal

We believe the banner should be more ‘alert’ styled and NOT themed with other color areas to remain CONSISTENT with the UX of an alert and not ‘just a button’ something like this:

Image

Is a much more visible cue to take action/understand the repercussions of any prior choice. It changes no functionality but alerts the user better than what exists today and tests well as a visible alert to pay attention to that may affect their experience.

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 1
  • Comments: 21 (16 by maintainers)

Most upvoted comments

As @sbatten already mentioned, the workspace trust feature is not about protection from extensions but rather protection from malicious workspaces and the banner is intended to be informational after a customer has explicitly said they don’t want to trust the authors.

It sounds like folks are getting confused when they aren’t seeing specific commands in the command palette while in restricted mode. @sbatten would it be possible to show all commands, but have the ones they aren’t able to use in restricted mode disabled? I think this would address @denelon’s comments

Maybe launching the modal “every time” if the workspace isn’t “trusted” that would help. I think the problem is I didn’t understand why I was blocked, or more specifically what that means in the context of what I was attempting to do.

I was testing out this very scenario. I was looking for the “new project” in the command palette. When I didn’t see that I had no idea it was because I was in restricted mode. There were other commands that showed up in the list. I was super confused. Maybe something in the list could have brought attention to the fact that not all commands are available when the workspace isn’t trusted. Or maybe disable all commands to indicate the state of being in a not “trusted” workspace.

Image

@kkbrooks I love this suggestion!! I think this would be a great start and after this if we are still getting reports that would be indicative of users still missing banner/struggling to get out of restricted mode.

IMO, there is not sufficient evidence that the workspace trust dialog / banner is being ignored.

For some reasons our new users are ignoring it. I’m sorry you can’t accept that as data. I think this bar, which to me is meant to be alert-driven, is not shown in a way that I have to pay attention to it. It’s themed and if I’m Hello Kitty themed, then it’s going to be pink. It’s hard to determine then what, if any, level of ‘warning’ I should discern from it if it is not standard UX guideline-driven aspects. It’s well accepted that info/warn/error in the ecosystem of tools/dialogs/logs have meaning…and it’s unclear to me what this is meant to convey then if just another themed banner.

I’d also argue then, given the justification, that this banner is not in accordance with the VS Code own UX Guidelines on Workspace status: https://code.visualstudio.com/api/ux-guidelines/status-bar:

displays information and actions that relate to your workspace. Items are placed into two groups: Primary (left) and Secondary (right). Items that relate to the entire workspace (status, problems/warnings, sync) go on the left

We’ll continue to adjust our own extension, but I believe this small request to make it more in-line with the message it is trying to convey (heck it has a security shield even) isn’t a big lift.

Not sure if red it the best choice here - since it is perfectly fine in some situations for users to browse repositories in restricted mode. Maybe yellow-warning is the right tone. Not sure.

fyi @kkbrooks

I think by the letter of the law, we do ‘execute’ here because it’s language code and our LSP kicks in, etc.

Yes, this part is a bit grey and your call. Your LSP would only kick in once trust is granted, but generating the code doesn’t. My understand how this would work:

  1. User opens new window which is untrusted
  2. User tries to run your command. They find it because the extension registers the command in an untrusted workspace.
  3. The new workspace is created without trust and you open the new workspace in a new window.
  4. In the new window, the user is prompted with a huge dialog that asks them to trust the workspace.

Them saying no at this point is not an error case, they may want to review the code and they should not be burdened with such a loud UX.

IMO, there is not sufficient evidence that the workspace trust dialog / banner is being ignored. If I as a user have a repo from some users fork open and I choose not to trust it, I do NOT want to trust the current workspace to access the “new project” command. Making it louder does not solve that problem.