Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions workspaces/lightspeed/.changeset/chilled-carrots-boil.md
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,9 @@ export const LightspeedChat = ({

const onNewChat = useCallback(() => {
(async () => {
setIsMcpSettingsOpen(false);
if (!isFullscreenMode) {
setIsMcpSettingsOpen(false);
}
if (conversationId !== TEMP_CONVERSATION_ID) {
setMessages([]);
setFileContents([]);
Expand Down Expand Up @@ -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) => {
Expand All @@ -1365,6 +1369,7 @@ export const LightspeedChat = ({
scrollToBottomRef,
setCurrentConversationId,
setIsMcpSettingsOpen,
isFullscreenMode,
],
);

Expand Down Expand Up @@ -1779,7 +1784,9 @@ export const LightspeedChat = ({
selectedModel={selectedModel}
models={models}
onSelect={item => {
setIsMcpSettingsOpen(false);
if (!isFullscreenMode) {
setIsMcpSettingsOpen(false);
}
onNewChat();
handleSelectedModel(item);
}}
Expand Down Expand Up @@ -1947,7 +1954,9 @@ export const LightspeedChat = ({
<LightspeedChatBoxHeader
selectedModel={selectedModel}
handleSelectedModel={item => {
setIsMcpSettingsOpen(false);
if (!isFullscreenMode) {
setIsMcpSettingsOpen(false);
}
onNewChat();
handleSelectedModel(item);
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ export const LightspeedChatBoxHeader = ({
<ChatbotHeaderOptionsDropdown
className={styles.dropdown}
isCompact
shouldFocusFirstItemOnOpen={false}
toggleProps={{
'aria-label': t('aria.options.label'),
className: styles.optionsToggle,
Expand Down
Loading