From 027e7d55f3bb57ba5150fd77e8f0114a0baf8d5c Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Tue, 15 Sep 2026 00:30:47 +0200 Subject: fix(ui): Search says nothing about groups it leaves out Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01XuNrwLf5EFWCMHzfoEvnpm --- .../meshbay-hub/src/meshbay_hub/static/search-page.js | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'packages/meshbay-hub/src/meshbay_hub/static/search-page.js') diff --git a/packages/meshbay-hub/src/meshbay_hub/static/search-page.js b/packages/meshbay-hub/src/meshbay_hub/static/search-page.js index a77e8c3..45a436e 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/search-page.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/search-page.js @@ -193,7 +193,6 @@ async function fetchAllIndexes(groups, token, username, userId, onProgress, onBa const total = groups.length; let done = 0; const unreachable = []; - const unlisted = []; const results = new Map(); for (let i = 0; i < groups.length; i += BATCH_SIZE) { @@ -202,7 +201,7 @@ async function fetchAllIndexes(groups, token, username, userId, onProgress, onBa try { const result = await fetchGroupIndex(g.id, token, bundleKey, username, userId); if (result && result.unlisted) { - unlisted.push(g.name || g.id); + // Left out of Search by its operator: not shown, and not down either. } else if (result) { results.set(g.id, { ...result, @@ -217,11 +216,11 @@ async function fetchAllIndexes(groups, token, username, userId, onProgress, onBa unreachable.push(g.name || g.id); } done++; - onProgress({ done, total, unreachable: [...unreachable], unlisted: [...unlisted] }); + onProgress({ done, total, unreachable: [...unreachable] }); })); onBatch(new Map(results)); } - return { results, unreachable, unlisted }; + return { results, unreachable }; } // -- SearchPage --------------------------------------------------------------- @@ -303,8 +302,7 @@ function photoUnits(entries) { function SearchPage({ token, username, userId, groups, onPlayQueue, userPrefs }) { const [indexedGroups, setIndexedGroups] = useState(new Map()); - const [progress, setProgress] = useState( - { done: 0, total: 0, unreachable: [], unlisted: [] }); + const [progress, setProgress] = useState({ done: 0, total: 0, unreachable: [] }); const [fetching, setFetching] = useState(false); // Bumped by the Files breadcrumb refresh button — re-runs the all-groups // index fetch below, the only "cache" this page has. @@ -356,7 +354,7 @@ function SearchPage({ token, username, userId, groups, onPlayQueue, userPrefs }) (async () => { setFetching(true); - setProgress({ done: 0, total: groups.length, unreachable: [], unlisted: [] }); + setProgress({ done: 0, total: groups.length, unreachable: [] }); await fetchAllIndexes( groups, token, username, userId, @@ -741,12 +739,6 @@ function SearchPage({ token, username, userId, groups, onPlayQueue, userPrefs })

`} - ${!fetching && progress.unlisted.length > 0 && html` -

- ${t('search.unlisted', { n: progress.unlisted.length })} -

- `} - ${viewMode === 'files' && hasResults && html` <${FilesPanel} groupId="search" -- cgit v1.2.3