feat(diagnostics): Add Feature State Diagnostics
Description
Note some previous iterations that made this MR smaller (and more focused):
- Rename: refactor: FeatureStateManager to LSFeatureState... (!2487 - merged)
- Rename follow up: refactor: Update file name/paths for LS Feature... (!2490 - merged)
- Extension Config change: feat: Add enabled user setting to LS sync (!2485 - merged)
This MR updates the LanguageServerFeatureStateProvider. This provider now manages and provides feature state information to the Diagnostics page. The path of data flows as follows (to better understand where/why changes are being made):
- Data enters from the LS in the
LanguageClientWrapper - This is handled by the
LanguageServerFeatureStateProviderwhich sets thestateof the manager (AllFeaturesState). - Upon setting state, the
AllFeaturesStateobject is passed to theFeatureStateDiagnosticsRenderer. The renderer takes the data from the LS and renders it on to the diagnostics page screen when the user triggers theGitLab: Diagnosticscommand.- Note: in the renderer, there are two commands that are filtered out that are found in the FeatureState's for code suggestions:
UNSUPPORTED_LANGUAGE,DISABLED_LANGUAGE. Because the file is a markdown file, these would already be false (unless a user specifically adds markdown to the supported language list.
- Note: in the renderer, there are two commands that are filtered out that are found in the FeatureState's for code suggestions:
- The provider and renderer are instantiated for both the
Desktop(Extension.ts) andWebIde(Browser.ts) version of the extension. - Tests have been added for all new files and updated where it makes the most sense
😄
Related Issues
Resolves [VS Code]: Feature State Diagnostics Section (#1760 - closed).
How has this been tested?
-
If src/browserorsrc/commonhas been modified, please consider interoperability with the Web IDE. See Running the Extension in WebIDE. -
Consider an end-to-end test for significant new features that aren't covered by integration tests.
These are some simple tests that can be done to test this portion of the diagnostics page
In the video, I disable Duo/CodeSuggestions and auth/de-auth an account.
Screen_Recording_2025-03-24_at_12.19.24_PM
Screenshots (if appropriate)
What CHANGELOG entry will this MR create?
-
fix:Bug fix fixes - a user-facing issue in production - included in changelog -
feature:New feature - a user-facing change which adds functionality - included in changelog -
BREAKING CHANGE:(fix or feature that would cause existing functionality to change) - should bump major version, mentioned in the changelog -
None - other non-user-facing changes
Edited by Dylan Bernardi