From cde6436e5df8fe22ccf99afb755f2883fc977288 Mon Sep 17 00:00:00 2001 From: Sanket Saikia Date: Fri, 26 Jun 2026 22:08:31 +0530 Subject: [PATCH] fix(lightspeed): keep MCP settings panel open in fullscreen mode and fix display mode selector focus Signed-off-by: Sanket Saikia --- .../.changeset/chilled-carrots-boil.md | 8 ++++++++ .../src/components/LightSpeedChat.tsx | 17 +++++++++++++---- .../src/components/LightspeedChatBoxHeader.tsx | 1 + 3 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 workspaces/lightspeed/.changeset/chilled-carrots-boil.md diff --git a/workspaces/lightspeed/.changeset/chilled-carrots-boil.md b/workspaces/lightspeed/.changeset/chilled-carrots-boil.md new file mode 100644 index 0000000000..2fa296dc4a --- /dev/null +++ b/workspaces/lightspeed/.changeset/chilled-carrots-boil.md @@ -0,0 +1,8 @@ +--- +'@red-hat-developer-hub/backstage-plugin-lightspeed': patch +--- + +Fix MCP settings panel and options dropdown behavior: + +- Keep MCP settings panel open during navigation in fullscreen mode +- Prevent options dropdown from auto-focusing first item on open diff --git a/workspaces/lightspeed/plugins/lightspeed/src/components/LightSpeedChat.tsx b/workspaces/lightspeed/plugins/lightspeed/src/components/LightSpeedChat.tsx index a5e7350270..fbeae27632 100644 --- a/workspaces/lightspeed/plugins/lightspeed/src/components/LightSpeedChat.tsx +++ b/workspaces/lightspeed/plugins/lightspeed/src/components/LightSpeedChat.tsx @@ -1111,7 +1111,9 @@ export const LightspeedChat = ({ const onNewChat = useCallback(() => { (async () => { - setIsMcpSettingsOpen(false); + if (!isFullscreenMode) { + setIsMcpSettingsOpen(false); + } if (conversationId !== TEMP_CONVERSATION_ID) { setMessages([]); setFileContents([]); @@ -1342,7 +1344,9 @@ export const LightspeedChat = ({ const onSelectActiveItem = useCallback( (_: MouseEvent | undefined, selectedItem: string | number | undefined) => { - setIsMcpSettingsOpen(false); + if (!isFullscreenMode) { + setIsMcpSettingsOpen(false); + } setNewChatCreated(false); const newConvId = String(selectedItem); setConversationId((c_id: string) => { @@ -1365,6 +1369,7 @@ export const LightspeedChat = ({ scrollToBottomRef, setCurrentConversationId, setIsMcpSettingsOpen, + isFullscreenMode, ], ); @@ -1779,7 +1784,9 @@ export const LightspeedChat = ({ selectedModel={selectedModel} models={models} onSelect={item => { - setIsMcpSettingsOpen(false); + if (!isFullscreenMode) { + setIsMcpSettingsOpen(false); + } onNewChat(); handleSelectedModel(item); }} @@ -1947,7 +1954,9 @@ export const LightspeedChat = ({ { - setIsMcpSettingsOpen(false); + if (!isFullscreenMode) { + setIsMcpSettingsOpen(false); + } onNewChat(); handleSelectedModel(item); }} diff --git a/workspaces/lightspeed/plugins/lightspeed/src/components/LightspeedChatBoxHeader.tsx b/workspaces/lightspeed/plugins/lightspeed/src/components/LightspeedChatBoxHeader.tsx index 5762bc4d21..cc18b4cdfb 100644 --- a/workspaces/lightspeed/plugins/lightspeed/src/components/LightspeedChatBoxHeader.tsx +++ b/workspaces/lightspeed/plugins/lightspeed/src/components/LightspeedChatBoxHeader.tsx @@ -176,6 +176,7 @@ export const LightspeedChatBoxHeader = ({