Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

fix(web): show session action menu only on the active conversation (#21617)

chanx39ec4d59423c
diff --git a/web/src/pages/next-chats/chat/sessions.tsx b/web/src/pages/next-chats/chat/sessions.tsx
index 7e8d34f47f..809769351b 100644
--- a/web/src/pages/next-chats/chat/sessions.tsx
+++ b/web/src/pages/next-chats/chat/sessions.tsx
@@ -36,6 +36,7 @@ import { useChatUrlParams } from '../hooks/use-chat-url';
import { useHandleClickConversationCard } from '../hooks/use-click-card';
import { useSelectDerivedConversationList } from '../hooks/use-select-conversation-list';
import { ConversationDropdown } from './conversation-dropdown';
+import { cn } from '@/lib/utils';
type SessionProps = Pick<
ReturnType<typeof useHandleClickConversationCard>,
@@ -374,6 +375,9 @@ export function Sessions({ handleConversationCardClick }: SessionProps) {
removeTemporaryConversation={removeTemporaryConversation}
>
<MoreButton
+ className={cn(
+ conversationId === x.id ? 'block' : 'hidden',
+ )}
data-testid="chat-detail-session-actions"
data-session-id={x.id}
></MoreButton>