feat(diagnostics): Add Feature State Diagnostics

Description

Note some previous iterations that made this MR smaller (and more focused):

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 LanguageServerFeatureStateProvider which sets the state of the manager (AllFeaturesState).
  • Upon setting state, the AllFeaturesState object is passed to the FeatureStateDiagnosticsRenderer. The renderer takes the data from the LS and renders it on to the diagnostics page screen when the user triggers the GitLab: Diagnostics command.
    • 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.
  • The provider and renderer are instantiated for both the Desktop (Extension.ts) and WebIde (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/browser or src/common has 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

Merge request reports

Loading