Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LSP request failure toasts cannot be turned off #1449

Closed
dibarbet opened this issue Mar 19, 2024 · 9 comments
Closed

LSP request failure toasts cannot be turned off #1449

dibarbet opened this issue Mar 19, 2024 · 9 comments
Labels
info-needed Issue requires more information from poster

Comments

@dibarbet
Copy link
Member

dibarbet commented Mar 19, 2024

Not sure if this is an issue here or on the vscode side (or intentional behavior) - but toast notifications due to a failed LSP request cannot be turned off.

To repro

  1. Clone and open the vscode extension samples LSP sample - https://github.com/microsoft/vscode-extension-samples/tree/main/lsp-sample
  2. add a line to throw an error in the completion request
  3. run the extension and trigger completion
  4. note the failure toast, and attempt to turn off the notifications for the extension
image
  1. dismiss the failure, re-invoke completion and note that the toast continues to show up.

Was reported in dotnet/vscode-csharp#6977
We're attempting to fix the issues causing the request to fail, but it seems like a bug that the notifications cannot be turned off.

@dbaeumer
Copy link
Member

@bpasero is there anything special I need to do. When I press the Manage Extension button I get this:

Image

@dbaeumer dbaeumer added the info-needed Issue requires more information from poster label Mar 20, 2024
@bpasero
Copy link
Member

bpasero commented Mar 20, 2024

@dbaeumer errors are excempted from notification ignore. Only info and warning can be ignored.

@dibarbet
Copy link
Member Author

errors are excempted from notification ignore.

I thought it might be something like that. If that is the behavior, being able to configure the notification ignore from an error notification can be a little misleading.

@bpasero
Copy link
Member

bpasero commented Mar 20, 2024

Yeah I do understand, will think about it. I am not a big fan of just not showing this action based on severity because it may still be hard for a user to understand what conditions there are to hide it.

@dbaeumer
Copy link
Member

I will close the issue then.

@garrettlondon1
Copy link

@bpasero @dbaeumer Thank you for your consideration of this issue.

Please review dotnet/vscode-csharp#6977 , as this is an extension which uncontrollably throws errors.

From a Accessibility perspective, not giving users the ability to disable errors, or extension authors ability, leaves VS code in a state where errors are coming up all the time, even in Zen Mode

Would you please consider reopening this ticket, as it is a huge accessibility pain and am unable to work properly with the C# extension in VS Code.

@dbaeumer
Copy link
Member

IMO hiding errors from the user is not the right thing to do, since they usually shouldn't happen frequently

@dibarbet if this happens often with the CSharp server you might want to think about handling them special in the middleware of override handleFailedRequest on the client side. I would even considering add something to the client option to have a handler for them. Would this help?

@dibarbet
Copy link
Member Author

@dibarbet if this happens often with the CSharp server you might want to think about handling them special in the middleware of override handleFailedRequest on the client side. I would even considering add something to the client option to have a handler for them. Would this help?

Ah, I can definitely try that. We are planning on fixing the errors on the server side, but it requires some small architectural changes we need to work through. Suppressing them on the client side seems like a good short term workaround. I think (not having tried) that the middleware would probably be good enough, considering it should only be short term.

@dbaeumer
Copy link
Member

You should be able to do that in the middleware. If not ping me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

4 participants