feat: surface sandbox state in diagnostics and duo quick pick menu

Description

Surfaces the sandbox feature state from the Language Server in the VS Code UI. The LS reports sandboxing state via $/gitlab/featureStateChange - this MR reads and displays that state in the UI.

Changes:

  • Diagnostics output - adds a "GitLab Duo Agent Sandboxing" section to the diagnostics renderer showing sandbox-disabled-by-usersandbox-unsupported-platform, and sandbox-missing-dependencies checks
  • Status bar / quick pick menu - adds a read-only sandbox status item (enabled/disabled/unsupported/missing deps with platform and dep details) and a separate "Enable/Disable Agent Sandboxing" toggle item in the Duo quick pick menu
  • Logging - logs sandbox state transitions (enabled=true/false) at debug level in SandboxWarningProvider
  • Shared utilities - extracts formatSandboxPlatformformatSandboxMissingDependenciesparseSandboxMissingDependencies, and sandboxMissingDependencyKey into sandbox_utils.ts for reuse
  • Toggle command - adds gl.toggleSandbox command which calls setDuoSandboxConfiguration, registered in LanguageServerManager

Resolves #2196

How has this been tested?

  1. Checkout this branch
  2. Build the language server and vscode extension
    • bun run watch -- --editor=vscode
    • npm run watch:desktop
  3. Run the extension development host
  4. Run command Gitlab: Diagnostics to view the Diagnostics page
    • You should see the Agent Sandboxing status
  5. Click on the Duo status bar item to show the quick pick menu
    • You should see the sandbox status menu item
    • You should see the sandbox toggle menu item if the sandbox check passes for supported platform and dependencies checks
    • Click the sandbox toggle item to disable/enable sandboxing
  • 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-05-28 at 10.13.58 AM.png

Screenshot 2026-05-28 at 10.28.05 AM.png

Screenshot 2026-05-28 at 10.28.13 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

Closes #2196

Edited by Mohammed Osumah

Merge request reports

Loading
Loading