Hidden Conversations Sidebar Click Fix
Issue
Version: 0.233.176
Fixed in: 0.233.176
Problem Description
When users clicked on hidden conversations in the sidebar (after enabling "Show Hidden Conversations" via the eye icon), the conversations would not load properly. The conversation would not display in the main chat area.
Root Cause
The application maintains two separate state variables for showing/hiding hidden conversations:
showHiddenConversations- Controls visibility in the main conversation listsidebarShowHiddenConversations- Controls visibility in the sidebar conversation list
When a user:
- Clicked the eye icon in the sidebar (toggles
sidebarShowHiddenConversations = true) - Clicked on a hidden conversation in the sidebar
- The sidebar called
selectConversation(conversationId)in the main conversation module selectConversationtried to find the conversation item in the main list usingquerySelector- The conversation item didn't exist in the main list because
showHiddenConversationswas stillfalse - The function returned early with a "Conversation item not found" warning
Solution
Changes Made
1. chat-sidebar-conversations.js
Added logic to automatically enable hidden conversations in the main list when clicking a hidden conversation in the sidebar:
// If this conversation is hidden, ensure the main conversation list also shows hidden conversations
if (convo.is_hidden && window.chatConversations && window.chatConversations.setShowHiddenConversations) {
window.chatConversations.setShowHiddenConversations(true);
}
2. chat-conversations.js
Created and exported a new function to programmatically control the hidden conversations visibility:
// Helper function to set show hidden conversations state
export function setShowHiddenConversations(value) {
showHiddenConversations = value;
loadConversations();
}
// Added to window.chatConversations global export
window.chatConversations = {
// ... existing exports
setShowHiddenConversations,
};
Technical Details
Files Modified
static/js/chat/chat-sidebar-conversations.js- Added check for hidden conversations before selectionstatic/js/chat/chat-conversations.js- AddedsetShowHiddenConversationsfunction and exportconfig.py- Updated VERSION from "0.233.175" to "0.233.176"
Behavior After Fix
- User clicks eye icon in sidebar → sidebar shows hidden conversations
- User clicks a hidden conversation in the sidebar
- NEW: System automatically enables
showHiddenConversationsin main list - Conversation loads successfully in main chat area
- Hidden conversation is visible in both sidebar and main list
Edge Cases Handled
- Normal conversations: Continue to work as before (no change)
- Hidden conversations with sidebar closed: Eye icon in main list still works independently
- Hidden conversations with both views active: Both lists stay synchronized
- Switching between hidden/visible conversations: Seamless navigation
Testing Recommendations
Manual Testing Steps
- Create or mark several conversations as hidden
- Open sidebar
- Click eye icon in sidebar to show hidden conversations
- Click on a hidden conversation
- Expected: Conversation loads successfully, showing messages and metadata
- Expected: Hidden conversation now visible in main conversation list
- Verify main list eye icon reflects correct state
Regression Testing
- ✅ Normal (non-hidden) conversation clicks still work
- ✅ Main list eye icon toggle still works independently
- ✅ Pin/unpin functionality unaffected
- ✅ Delete conversation functionality unaffected
- ✅ Multi-select mode unaffected
Related Features
- Hidden conversations toggle (eye icon)
- Sidebar conversation list
- Main conversation list
- Conversation selection and loading
User Impact
Positive: Users can now successfully navigate to hidden conversations from the sidebar, improving usability and workflow efficiency.
Breaking Changes: None - this is a bug fix that restores expected functionality.