From a55b28065f0b7dfab007dc67b212966ff2cea8d9 Mon Sep 17 00:00:00 2001 From: Chuck Date: Mon, 16 Feb 2026 20:49:41 -0500 Subject: [PATCH] fix(store): consolidate CSS, fix stale cache bug, add missing utilities, fix icon - Consolidate .filter-pill and .category-filter-pill into shared selectors and scope transition to only changed properties - Fix applyStoreFiltersAndSort ignoring fresh server-filtered results by accepting optional basePlugins parameter - Add missing .py-1.5 and .rounded-full CSS utility classes - Replace invalid fa-sparkles with fa-star (FA 6.0.0 compatible) Co-Authored-By: Claude Opus 4.6 --- web_interface/static/v3/app.css | 32 ++++++++----------- web_interface/static/v3/plugins_manager.js | 28 ++++++---------- .../templates/v3/partials/plugins.html | 2 +- 3 files changed, 23 insertions(+), 39 deletions(-) diff --git a/web_interface/static/v3/app.css b/web_interface/static/v3/app.css index 23f627d5..b22a179f 100644 --- a/web_interface/static/v3/app.css +++ b/web_interface/static/v3/app.css @@ -144,6 +144,7 @@ body { .rounded-lg { border-radius: 0.5rem; } .rounded-md { border-radius: 0.375rem; } +.rounded-full { border-radius: 9999px; } .rounded { border-radius: 0.25rem; } .shadow { box-shadow: var(--shadow); } @@ -155,6 +156,7 @@ body { .p-4 { padding: 1rem; } .p-2 { padding: 0.5rem; } .px-4 { padding-left: 1rem; padding-right: 1rem; } +.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; } .py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; } .py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; } .pb-4 { padding-bottom: 1rem; } @@ -667,35 +669,27 @@ button.bg-white { } /* Filter Pill Toggle States */ -.filter-pill { - cursor: pointer; - user-select: none; - transition: all 0.15s ease; -} - -.filter-pill[data-active="true"] { - background-color: var(--color-info-bg); - border-color: var(--color-info); - color: var(--color-info); - font-weight: 600; -} - -.filter-pill[data-active="true"]:hover { - opacity: 0.85; -} - -/* Category Filter Pills */ +.filter-pill, .category-filter-pill { cursor: pointer; user-select: none; - transition: all 0.15s ease; + transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease; } +.filter-pill[data-active="true"], .category-filter-pill[data-active="true"] { background-color: var(--color-info-bg); border-color: var(--color-info); color: var(--color-info); font-weight: 600; +} + +.filter-pill[data-active="true"]:hover, +.category-filter-pill[data-active="true"]:hover { + opacity: 0.85; +} + +.category-filter-pill[data-active="true"] { box-shadow: 0 0 0 1px var(--color-info); } diff --git a/web_interface/static/v3/plugins_manager.js b/web_interface/static/v3/plugins_manager.js index 2d75cbb9..f7a677ce 100644 --- a/web_interface/static/v3/plugins_manager.js +++ b/web_interface/static/v3/plugins_manager.js @@ -5278,10 +5278,11 @@ function setupStoreFilterListeners() { } } -function applyStoreFiltersAndSort() { - if (!pluginStoreCache) return; +function applyStoreFiltersAndSort(basePlugins) { + const source = basePlugins || pluginStoreCache; + if (!source) return; - let plugins = [...pluginStoreCache]; + let plugins = [...source]; const installedIds = new Set( (window.installedPlugins || []).map(p => p.id) ); @@ -5342,7 +5343,7 @@ function applyStoreFiltersAndSort() { // Update result count const countEl = document.getElementById('store-count'); if (countEl) { - const total = pluginStoreCache.length; + const total = source.length; const shown = plugins.length; countEl.innerHTML = shown < total ? `${shown} of ${total} shown` @@ -5481,20 +5482,9 @@ function searchPluginStore(fetchCommitInfo = true) { return; } - // Route through filter/sort pipeline if cache is available, otherwise render directly - if (pluginStoreCache) { - applyStoreFiltersAndSort(); - } else { - renderPluginStore(plugins); - try { - const countEl = document.getElementById('store-count'); - if (countEl) { - countEl.innerHTML = `${plugins.length} available`; - } - } catch (e) { - console.warn('Could not update store count:', e); - } - } + // Route through filter/sort pipeline — pass fresh plugins + // so server-filtered results (query/category) aren't ignored + applyStoreFiltersAndSort(plugins); // Ensure GitHub token collapse handler is attached after store is rendered // The button might not exist until the store content is loaded @@ -5611,7 +5601,7 @@ function renderPluginStore(plugins) {

${escapeHtml(plugin.name || plugin.id)}

${plugin.verified ? 'Verified' : ''} - ${isNewPlugin(plugin.last_updated) ? 'New' : ''} + ${isNewPlugin(plugin.last_updated) ? 'New' : ''} ${isInstalled ? 'Installed' : ''} ${hasUpdate ? 'Update' : ''} ${plugin._source === 'custom_repository' ? `Custom` : ''} diff --git a/web_interface/templates/v3/partials/plugins.html b/web_interface/templates/v3/partials/plugins.html index 701652a7..b861aabe 100644 --- a/web_interface/templates/v3/partials/plugins.html +++ b/web_interface/templates/v3/partials/plugins.html @@ -204,7 +204,7 @@ Verified