Introduce the duo_chat_goal_command feature flag and gate the /goal surfaces

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

Problem

The /goal feature work needs to ship in slices, but there is no feature flag to gate behind yet. Other slices cannot merge safely without exposing unfinished UI.

Proposal

Create a new duo_chat_goal_command feature flag (wip type, disabled by default) and push it to the frontend so both Vue components and plain JS modules can read it. Hide every /goal surface while the flag is off.

  • Add ee/config/feature_flags/wip/duo_chat_goal_command.yml.
  • Make it readable as glFeatures.duoChatGoalCommand in components and gon.features?.duoChatGoalCommand in plain modules.
  • Add Jest coverage for both flag states.

Acceptance criteria

  • Add ee/config/feature_flags/wip/duo_chat_goal_command.yml with type: wip, default_enabled: false, group: group::duo chat, milestone: '19.5', feature_issue_url pointing to &23107, and rollout_issue_url pointing to the [FF] rollout issue (#628226).
  • Add push_frontend_feature_flag(:duo_chat_goal_command, current_user) to push_frontend_feature_flags in ee/lib/ee/gitlab/gon_helper.rb, beside the existing dap_web_search and duo_chat_flow_commands pushes.
  • Make the flag readable in components as glFeatures.duoChatGoalCommand via glFeatureFlagsMixin(), and in plain modules (plugin descriptors are module-level objects with no component instance) as gon.features?.duoChatGoalCommand.
  • With the flag off, nothing changes: /goal stays out of the suggestions menu, no Goal entry appears in the + dropdown, and no goal badge shows anywhere.
  • Add Jest coverage for both flag states.

References

Part of epic &23107.

Edited by 🤖 GitLab Bot 🤖