From 13341c2d55deb5b8ecbba74c1abb8756c5890fb2 Mon Sep 17 00:00:00 2001 From: Alireza Heidari <8046843+itisAliRH@users.noreply.github.com> Date: Mon, 6 Jul 2026 13:23:55 +0200 Subject: [PATCH] fix: deduplicate toolbox count fallback --- client/src/components/Panels/ToolBox.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/client/src/components/Panels/ToolBox.vue b/client/src/components/Panels/ToolBox.vue index 556b50e9ac5..6a77c03f6c4 100644 --- a/client/src/components/Panels/ToolBox.vue +++ b/client/src/components/Panels/ToolBox.vue @@ -17,6 +17,7 @@ import { buildToolEntries, buildToolLabel, buildToolSection, + countUniqueToolsInList, countUniqueToolsInPanel, FAVORITES_KEYS, filterPanelByToolIds, @@ -180,6 +181,8 @@ const defaultSectionsById = computed | null>(() => return Object.keys(validSections).length > 0 ? validSections : null; }); +const myToolsDefaultSectionsById = computed(() => defaultSectionsById.value || localSectionsById.value); + // Use composable for favorites and recent tools — we only need the bits that // drive the search-results split (favorites get their own section in mixed // results). The full My-Tools landing state lives inside `MyToolsLanding.vue`. @@ -189,7 +192,10 @@ const { favoritesCollapsed, favoriteToolIdSet, recentToolIdsToShowSet } = useToo const { favoriteResults, nonFavoriteResults, hasMixedResults } = useFavoriteSearchResults(results, favoriteToolIdSet); const toolsCount = computed(() => - countUniqueToolsInPanel(defaultSectionsById.value || localSectionsById.value, toolsList.value.length), + countUniqueToolsInPanel( + defaultSectionsById.value || localSectionsById.value, + countUniqueToolsInList(toolsList.value), + ), ); const resultsSet = computed(() => new Set(results.value)); @@ -436,7 +442,7 @@ function onLabelToggle(labelId: string) {