A platform for community discussion. Free, open, simple.
UX: in header dropdown nav mode, keep AI bot header functionality the same (#39202)
Krise9afafb0d259
diff --git a/plugins/discourse-ai/assets/javascripts/discourse/components/ai-bot-header-icon.gjs b/plugins/discourse-ai/assets/javascripts/discourse/components/ai-bot-header-icon.gjsindex fd7f8388679..c04256dcf23 100644--- a/plugins/discourse-ai/assets/javascripts/discourse/components/ai-bot-header-icon.gjs+++ b/plugins/discourse-ai/assets/javascripts/discourse/components/ai-bot-header-icon.gjs@@ -11,7 +11,6 @@ import { AI_CONVERSATIONS_PANEL } from "../services/ai-conversations-sidebar-manexport default class AiBotHeaderIcon extends Component {@service appEvents;@service currentUser;- @service navigationMenu;@service sidebarState;@service siteSettings;@service aiConversationsSidebarManager;@@ -44,10 +43,7 @@ export default class AiBotHeaderIcon extends Component {}get clickShouldRouteOutOfConversations() {- return (- !this.navigationMenu.isHeaderDropdownMode &&- this.sidebarState.currentPanel?.key === AI_CONVERSATIONS_PANEL- );+ return this.sidebarState.currentPanel?.key === AI_CONVERSATIONS_PANEL;}get href() {diff --git a/plugins/discourse-ai/spec/system/ai_bot/homepage_spec.rb b/plugins/discourse-ai/spec/system/ai_bot/homepage_spec.rbindex 61fa1f435bd..97ac23d6659 100644--- a/plugins/discourse-ai/spec/system/ai_bot/homepage_spec.rb+++ b/plugins/discourse-ai/spec/system/ai_bot/homepage_spec.rb@@ -412,12 +412,12 @@ RSpec.describe "AI Bot - Homepage" doSiteSetting.ai_bot_add_to_header = trueend- it "keeps robot icon in the header and doesn't display sidebar back link" do+ it "shows shuffle icon in the header and doesn't display sidebar back link" dovisit "/"expect(header).to have_icon_in_bot_button(icon: "robot")header.click_bot_buttonexpect(ai_pm_homepage).to have_homepage- expect(header).to have_icon_in_bot_button(icon: "robot")+ expect(header).to have_icon_in_bot_button(icon: "shuffle")expect(ai_pm_homepage).to have_no_sidebar_back_linkend