[go: up one dir, main page]

Skip to content

Hide GitLab Duo Chat button in Web IDE when Duo features are disabled

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Release notes

Improved Web IDE user experience by hiding the GitLab Duo Chat button when Duo features are disabled at instance, group, or project level. As shown below in a clean installation which does not have GitLab DUO enabled

image.png

Problem to solve

In GitLab 18.3, the GitLab Duo Chat button appears in the Web IDE sidebar even when GitLab Duo features are disabled through various configuration methods. This creates several issues:

Current Problematic Behavior:

  1. Always visible button: The Duo Chat button is visible in the Web IDE regardless of instance/group/project Duo settings
  2. Flickering visibility: When Duo settings are modified, the button occasionally exhibits inconsistent behaviour:
    • Initially present when Web IDE loads
    • Disappears when a file is opened
    • Flickers briefly when switching between files
    • Reappears when all files are closed
  3. Non-functional feature: Clicking the button results in initialisation errors when Duo is disabled
  4. Confusing user experience: Users see a feature that appears available but doesn't work

Affected Scenarios:

  • Air-gapped environments: Where Duo cannot function due to lack of internet connectivity
  • Organizations with disabled Duo: Instances where administrators have intentionally disabled Duo features
  • Compliance requirements: Banking and high-security environments that need to ensure AI features are completely hidden

Configuration Methods That Should Hide the Button:

  • Instance-level: duo_features_enabled: false or lock_duo_features_enabled: true
  • Database settings: duo_core_features_enabled: false in ai_settings table
  • Admin UI: "Always off" setting in GitLab Duo configuration
  • Feature flags: Various Duo-related feature flags when disabled

Proposal

Primary Solution: Respect Duo Configuration Settings

  • Check Duo availability settings before rendering the Chat button in Web IDE
  • Hide the button completely when Duo features are disabled at any level (instance/group/project)
  • Ensure consistent behavior across all Web IDE contexts (file open/closed states)

Implementation Details:

  1. Server-side check: Verify Duo availability during Web IDE initialization
  2. Client-side consistency: Ensure button visibility remains consistent regardless of file context
  3. Hierarchical respect: Honor the most restrictive setting in the instance → group → project hierarchy
  4. Feature flag integration: Respect relevant Duo feature flags

Alternative Solutions:

  • Option 1: Show disabled state with tooltip explaining why it's unavailable
  • Option 2: Provide admin setting to control Web IDE Duo Chat visibility independently
  • Option 3: Add user preference to hide Duo Chat in Web IDE

Recommended approach: Implement the primary solution as it provides the cleanest user experience and respects administrator intentions.

Intended users

  • System Administrators managing GitLab instances with disabled Duo features
  • Developers working in air-gapped or high-security environments
  • Compliance teams ensuring AI features are properly disabled when required
  • End users who should not see non-functional features in their interface

Feature Usage Metrics

  • Track instances where Duo Chat button would be hidden due to disabled settings
  • Monitor reduction in Duo Chat initialization errors in Web IDE
  • Measure user confusion/support tickets related to non-functional Duo Chat button

Does this feature require an audit event?

No, this feature does not require an audit event as it only affects UI visibility and does not change any security controls, access permissions, or data handling. The underlying Duo feature availability controls remain unchanged.

Additional Context

This issue was discovered after upgrading from GitLab 17.11 to 18.3, where GitLab Duo Chat was automatically enabled in the Web IDE as part of the Duo Core inclusion. The flickering behaviour suggests there are race conditions or context-dependent visibility checks that are not working correctly.

Related to air-gapped environment improvements tracked in:

Edited by 🤖 GitLab Bot 🤖