From 3c924b8deec6a53a237c9a97e15fb9b426e6e1e8 Mon Sep 17 00:00:00 2001 From: Maruf Hasan <170166811+MarufHasan-dev@users.noreply.github.com> Date: Sun, 7 Jun 2026 20:29:04 +0600 Subject: [PATCH] fix: hide Select buttons in Memory/Skills tabs when list is empty (#2906) * fix: hide Select buttons in memory/skills tabs when list is empty * fix: disable Select buttons instead of hiding them when list is empty * fix: dim disabled Select button and remove focus outline * fix: reload skills after single deletion so count and toolbar stay in sync * fix: lower minimized-dock z-index from 10020 to 100 so modals stack above it * Revert "fix: lower minimized-dock z-index from 10020 to 100 so modals stack above it" This reverts commit 5b092ee6cd11d2a2bb79f74a9aa2a81b6b3aaa72. --- static/js/memory.js | 6 ++++++ static/js/skills.js | 9 +++++++-- static/style.css | 3 ++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/static/js/memory.js b/static/js/memory.js index 6f3e57012..1df76a37a 100644 --- a/static/js/memory.js +++ b/static/js/memory.js @@ -608,6 +608,9 @@ export function renderMemoryList() { memoryList.innerHTML = ''; if (filtered.length === 0) { + const selectBtn = document.getElementById('memory-select-btn'); + if (selectBtn) selectBtn.disabled = true; + if (selectMode) exitSelectMode(); const searchTerm = document.getElementById('memory-search')?.value?.trim() || ''; const _smiley = '' + uiModule.emptyStateIcon('smiley') + ''; if (searchTerm || activeCategory !== 'all') { @@ -627,6 +630,9 @@ export function renderMemoryList() { return; } + const selectBtn = document.getElementById('memory-select-btn'); + if (selectBtn) selectBtn.disabled = false; + filtered.forEach(memory => { const item = document.createElement('div'); item.className = 'memory-item'; diff --git a/static/js/skills.js b/static/js/skills.js index f9c522afd..1a0c9701b 100644 --- a/static/js/skills.js +++ b/static/js/skills.js @@ -621,10 +621,16 @@ function renderSkillsList() { const showBuiltin = false; if (!sorted.length && !showBuiltin) { + const selectBtn = document.getElementById('skills-select-btn'); + if (selectBtn) selectBtn.disabled = true; + if (_selectMode) _exitSelectMode(); container.innerHTML = `