Sidebar Chat button Quality of Life improvement. (#155)

This commit is contained in:
Alan Met
2026-06-01 03:52:10 +01:00
committed by GitHub
parent 411cb872cc
commit 864e7ad558
3 changed files with 33 additions and 12 deletions

View File

@@ -1025,16 +1025,10 @@ function initializeEventListeners() {
});
}
// "Chats" sidebar section header:
// • Click the auto-injected chevron (section-management.js adds it)
// or the empty area of the title → toggle collapse of the list.
// • Click the "Chats" text label → open the Chats tab of the library.
// We stop propagation on the label so section-management.js's
// section-title click handler (which toggles collapse) doesn't also
// fire when the user is trying to open the library.
const chatsSectionLabel = el('chats-section-label');
if (chatsSectionLabel) {
chatsSectionLabel.addEventListener('click', (e) => {
// Manage Chats — opens Full Library modal (decoupled from Chats accordion toggle)
const chatsLibraryBtn = el('chats-library-btn');
if (chatsLibraryBtn) {
chatsLibraryBtn.addEventListener('click', (e) => {
e.stopPropagation();
if (sessionModule) sessionModule.openLibrary('chats');
});