fix: playground not dimming unused using statements#10815
Open
Copilot wants to merge 4 commits into
Open
Conversation
Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Investigate missing information mapping for unused using in playground
fix: playground not dimming unused May 27, 2026
using statements
Member
|
/azp run typespec - pr tools |
|
Azure Pipelines successfully started running 1 pipeline(s). |
commit: |
Member
|
@copilot add changelog |
Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Contributor
Author
Added a changelog entry for |
Member
|
/azp run typespec - pr tools |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
You can try these changes here
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The playground wasn't fading out unused
usingdeclarations the way the VS Code extension does, even though the language server was already detecting them correctly.Root cause: The language server running in the playground (for completions, hover, semantic tokens, etc.) was sending LSP diagnostics with
DiagnosticTag.Unnecessaryfor unusedusingstatements, butsendDiagnosticsinservices.tswas a no-op — those tags were never forwarded to Monaco.Changes
packages/playground/src/services.ts— ImplementsendDiagnosticsto filter diagnostics that carry visual tags and apply them as MonacoHint-severity markers under a separate"lsp-tags"owner. UsingHintavoids duplicating the error/warning squiggles already managed by the playground's own compilation pass.DiagnosticTagvalues from LSP map directly toMarkerTagvalues in Monaco (Unnecessary = 1,Deprecated = 2).packages/playground/src/react/playground.tsx— Fix a pre-existing bug whereCompletionItemTag.Deprecated(value1, fromvscode-languageserver) was used as a Monaco marker tag. This coincidentally equalsMarkerTag.Unnecessary(faded text) rather than the intendedMarkerTag.Deprecated(strikethrough). Replaced withMarkerTag.Deprecatedand removed thevscode-languageserverimport.