Skip to content

Notify Duo Chat beta users that Chat is in GA

Roy Liu requested to merge 442655-duo-chat-ga-alert into master

What does this MR do and why?

Resolves #442655.

Add alert for Duo Chat GA for members of paid group for gitlab.com.

MR acceptance checklist

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

Screenshots or screen recordings

Alert
Screenshot_2024-04-16_at_3.20.20_PM

How to set up and validate locally

  1. Setup GDK to simulate SaaS
  2. Enable alert Feature Flag: echo "Feature.enable :duo_chat_ga_alert" | gdk rails c
  3. To enable the GitLab Duo Chat app, apply the patch
Click to expand
diff --git a/ee/app/views/layouts/_tanuki_bot_chat.html.haml b/ee/app/views/layouts/_tanuki_bot_chat.html.haml
index afcf4adf750d..e60228e9db12 100644
--- a/ee/app/views/layouts/_tanuki_bot_chat.html.haml
+++ b/ee/app/views/layouts/_tanuki_bot_chat.html.haml
@@ -1,4 +1,4 @@
-- return unless ::Gitlab::Llm::TanukiBot.enabled_for?(user: current_user, container: nil)
+-# - return unless ::Gitlab::Llm::TanukiBot.enabled_for?(user: current_user, container: nil)
 - resource_id = Gitlab::ApplicationContext.current_context_attribute(:ai_resource).presence
 
 #js-tanuki-bot-chat-app{ data: { user_id: current_user.to_global_id, resource_id: resource_id } }
diff --git a/ee/app/views/layouts/nav/_ask_duo_button.html.haml b/ee/app/views/layouts/nav/_ask_duo_button.html.haml
index 0fb891548fe0..344e33e54477 100644
--- a/ee/app/views/layouts/nav/_ask_duo_button.html.haml
+++ b/ee/app/views/layouts/nav/_ask_duo_button.html.haml
@@ -1,13 +1,13 @@
-- if ::Gitlab::Llm::TanukiBot.show_breadcrumbs_entry_point?(user: current_user, container: (@group || @project))
-  - label = s_('DuoChat|GitLab Duo Chat')
-  = render Pajamas::ButtonComponent.new(variant: :default,
-    category: :secondary,
-    icon: 'tanuki-ai',
-    size: 'medium',
-    button_options: { class: 'js-tanuki-bot-chat-toggle gl-ml-3 gl-display-none gl-md-display-inline', data: { track_action: 'click_button', track_label: 'tanuki_bot_breadcrumbs_button' }, aria: { label: label }}) do
-    = label
-  = render Pajamas::ButtonComponent.new(variant: :default,
-    category: :secondary,
-    icon: 'tanuki-ai',
-    size: 'medium',
-    button_options: { class: 'js-tanuki-bot-chat-toggle has-tooltip gl-ml-3 gl-md-display-none', title: label, data: { track_action: 'click_button', track_label: 'tanuki_bot_breadcrumbs_button', placement: 'left' }, aria: { label: label }})
+-# - if ::Gitlab::Llm::TanukiBot.show_breadcrumbs_entry_point?(user: current_user, container: (@group || @project))
+- label = s_('DuoChat|GitLab Duo Chat')
+= render Pajamas::ButtonComponent.new(variant: :default,
+  category: :secondary,
+  icon: 'tanuki-ai',
+  size: 'medium',
+  button_options: { class: 'js-tanuki-bot-chat-toggle gl-ml-3 gl-display-none gl-md-display-inline', data: { track_action: 'click_button', track_label: 'tanuki_bot_breadcrumbs_button' }, aria: { label: label }}) do
+  = label
+= render Pajamas::ButtonComponent.new(variant: :default,
+  category: :secondary,
+  icon: 'tanuki-ai',
+  size: 'medium',
+  button_options: { class: 'js-tanuki-bot-chat-toggle has-tooltip gl-ml-3 gl-md-display-none', title: label, data: { track_action: 'click_button', track_label: 'tanuki_bot_breadcrumbs_button', placement: 'left' }, aria: { label: label }})
  1. Create a group that is on a paid plan such as premium or ultimate (Admin can set the plan for groups in /admin/groups/<your_group>/edit)
  2. Go to Group, sub-group and project overview pages
  3. Alert should be visible
  4. Click the primary CTA should trigger the Duo Chat drawer to render and dismiss the alert
  5. Click the close button also dismisses alert

To clear a callout for the dismissed alert, run Users::Callout.last.destroy in rails console

Edited by Roy Liu

Merge request reports