aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/static
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-08-30 10:50:51 +0200
committerChristophe Besson <cbesson@gmail.com>2026-08-30 10:50:51 +0200
commit397727d2bf3f24c81ddda1e7a9eda197d7ed3b9e (patch)
tree9f93cfe2637e425505f70bee5a27db71af2839a6 /packages/meshbay-hub/src/meshbay_hub/static
parenta2215bb071c4e1ce11c616d26df8fd4e7a8fdf57 (diff)
downloadmeshbay-397727d2bf3f24c81ddda1e7a9eda197d7ed3b9e.tar.gz
fix(hub): wire the Files refresh button on the Search page
The refresh button (added in 1cb9054, left of the breadcrumb home icon) was gated on `onRefreshIndex`, which the Search page's embedded FilesPanel did not pass — so it never showed on the one page it was asked for. The Search page now passes an `onRefreshIndex` that re-runs its all-groups index fetch (the only cache it has); the existing progress bar is the feedback. Unchanged in the normal group Files view. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018BMLQjqFGCize2KtNBT79v
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/search-page.js8
1 files changed, 6 insertions, 2 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 e36532f..fced022 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/search-page.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/search-page.js
@@ -190,6 +190,9 @@ function SearchPage({ token, username, userId, groups, onPlayQueue, userPrefs })
const [indexedGroups, setIndexedGroups] = useState(new Map());
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.
+ const [refreshTick, setRefreshTick] = useState(0);
const [query, setQuery] = useState('');
const [viewMode, setViewMode] = useState('files');
const [videoEntry, setVideoEntry] = useState(null);
@@ -232,7 +235,7 @@ function SearchPage({ token, username, userId, groups, onPlayQueue, userPrefs })
})();
return () => { cancelled = true; };
- }, [groups, token]);
+ }, [groups, token, refreshTick]);
// -- Connection management --
@@ -551,7 +554,8 @@ function SearchPage({ token, username, userId, groups, onPlayQueue, userPrefs })
onPreview=${onPreview}
showGroup=${true}
readOnly=${true}
- getTransport=${getTransport} />
+ getTransport=${getTransport}
+ onRefreshIndex=${() => setRefreshTick((n) => n + 1)} />
`}
${viewMode === 'videos' && hasResults && html`