diff --git a/app/src/pages/Conversations.tsx b/app/src/pages/Conversations.tsx index 2c203b8a5..fc741fcef 100644 --- a/app/src/pages/Conversations.tsx +++ b/app/src/pages/Conversations.tsx @@ -57,6 +57,7 @@ import { persistReaction, setActiveThread, setSelectedThread, + setThreadSidebarVisible, THREAD_NOT_FOUND_MESSAGE, updateThreadTitle, } from '../store/threadSlice'; @@ -187,10 +188,16 @@ const Conversations = ({ const dispatch = useAppDispatch(); const navigate = useNavigate(); const location = useLocation(); - const { threads, selectedThreadId, messages, isLoadingMessages, messagesError, activeThreadId } = - useAppSelector(state => state.thread); + const { + threads, + selectedThreadId, + threadSidebarVisible = false, + messages, + isLoadingMessages, + messagesError, + activeThreadId, + } = useAppSelector(state => state.thread); - const [showSidebar, setShowSidebar] = useState(false); const [inputValue, setInputValue] = useState(''); const [attachments, setAttachments] = useState([]); const fileInputRef = useRef(null); @@ -1224,7 +1231,7 @@ const Conversations = ({ labelTabs.find(tab => tab.value === selectedLabel)?.label ?? selectedLabel; const isSidebar = variant === 'sidebar'; - const effectiveShowSidebar = showSidebar; + const effectiveShowSidebar = threadSidebarVisible; // Stable title resolver used by both the sidebar thread list and the header. const resolveThreadDisplayTitle = (threadId: string | null): string => { @@ -1405,7 +1412,7 @@ const Conversations = ({