diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-09-15 00:30:47 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-09-15 02:21:01 +0200 |
| commit | 027e7d55f3bb57ba5150fd77e8f0114a0baf8d5c (patch) | |
| tree | 0c6630df8ad7cfaa18e40e0a09c3d983368c3353 /packages/meshbay-hub/src/meshbay_hub/static/search-page.js | |
| parent | e12570f9d1aa2645e6bb223b1417fa0e81957b65 (diff) | |
| download | meshbay-027e7d55f3bb57ba5150fd77e8f0114a0baf8d5c.tar.gz | |
fix(ui): Search says nothing about groups it leaves out
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XuNrwLf5EFWCMHzfoEvnpm
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/search-page.js')
| -rw-r--r-- | packages/meshbay-hub/src/meshbay_hub/static/search-page.js | 18 |
1 files changed, 5 insertions, 13 deletions
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 }) </p> `} - ${!fetching && progress.unlisted.length > 0 && html` - <p class="search-unreachable"> - ${t('search.unlisted', { n: progress.unlisted.length })} - </p> - `} - ${viewMode === 'files' && hasResults && html` <${FilesPanel} groupId="search" |