Add the duo_chat_goal_command feature flag

What does this MR do and why?

This MR adds the duo_chat_goal_command feature flag. It is the single switch that will gate the /goal command for Duo Agentic Chat, a long-running goal the chat keeps working toward once started.

The /goal feature lands across several merge requests: slash command registration, goal mode in the composer, a badge on the user message, and telemetry. None of these is useful on its own, so they all need one shared flag to stay dark until the full set is complete.

This MR adds only the flag definition and pushes it to the frontend. It has no consumer yet. The first consumer is the /goal command registration, tracked in issue 628227, a follow-up MR opened on top of this branch.

Changes:

  • New file ee/config/feature_flags/wip/duo_chat_goal_command.yml, generated with bin/feature-flag --ee. Type is wip because the feature is incomplete across multiple MRs, and default_enabled is false.
  • One line added to push_frontend_feature_flags in ee/lib/ee/gitlab/gon_helper.rb, next to the existing dap_web_search and duo_chat_flow_commands pushes.

The flag can be read two ways on the frontend: as glFeatures.duoChatGoalCommand in Vue components through glFeatureFlagsMixin(), and as gon.features.duoChatGoalCommand in plain modules. The chat's plugin descriptors are module-level objects with no component instance, so they need the gon.features form.

introduced_by_url in the flag YAML is left empty on purpose, so Danger can suggest it, which is the normal flow for bin/feature-flag.

No changelog entry: this change sits behind a default-off feature flag, and the project's rules say to skip changelogs for those.

References

Screenshots or screen recordings

Not applicable. This MR only adds a feature flag and pushes it to the frontend. There is no user-visible change with the flag either on or off.

How to set up and validate locally

  1. In a rails console, check the flag is registered and off by default:
    Feature.enabled?(:duo_chat_goal_command) # => false
  2. Enable it for yourself:
    Feature.enable(:duo_chat_goal_command)
  3. Load any GitLab page and check gon.features.duoChatGoalCommand in the browser console. It is true once the flag is enabled, and false while it is disabled.
  4. Nothing changes visually in either state. This MR only adds the switch; no code reads it yet.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading
Loading