feat: support missing default namespace state in status bar

Description

This MR adds UI support for the SUGGESTIONS_NO_DEFAULT_NAMESPACE state check that will be introduced in the Language Server (gitlab-org/editor-extensions/gitlab-lsp!3059 (merged)). When users haven't selected a default GitLab Duo namespace, the extension now displays an appropriate status bar icon and tooltip message.

Changes Made

  1. Added SUGGESTIONS_NO_DEFAULT_NAMESPACE to the VisibleCodeSuggestionsState enum
  2. Added status bar UI configuration for the missing namespace state with:
    • Disabled icon (gitlab-code-suggestions-disabled)
    • Tooltip message explaining the issue and how to resolve it

How It Works

  1. The Language Server detects when a user hasn't selected a default namespace via the SUGGESTIONS_NO_DEFAULT_NAMESPACE state check
  2. The state is broadcast to the VS Code extension via FeatureStateChangeNotificationType
  3. The LanguageServerPolicy receives the state and engages when the check is active
  4. The status bar item updates to show the disabled icon with the tooltip message
  5. Users are informed they need to select a default namespace in their GitLab preferences

Related to https://gitlab.com/gitlab-org/editor-extensions/gitlab-lsp/-/work_items/1907

How has this been tested?

To test this MR with your local gdk, follow these steps:

  1. Checkout this branch in your gdk's gitlab repo and this branch in your language server repo https://gitlab.com/gitlab-org/editor-extensions/gitlab-lsp/-/tree/1907-handle-missing-default-namespace
  2. Compile both the vscode extension and language server
  3. Start extension host
  4. Open a cloned project for your gdk instance in your editor
  5. Open a code file in your editor to trigger code suggestions
  6. Verify that code suggestions are disabled and when you hover over the status bar item you see a tooltip message indicating you need to select a default namespace
  • 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.

Screenshots (if appropriate)

Screenshot 2026-04-07 at 11.50.21 AM.png

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 Mohammed Osumah

Merge request reports

Loading
Loading