From 117f3d2611780aacda60ca529992ca3111de6634 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Sun, 30 Aug 2026 15:19:15 +0200 Subject: fix(hub): show the Files refresh button only on the Search page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In a real group the node streams every index change to connected clients as it happens (onIndexSync / onIndexDelta), so a manual re-fetch button there just duplicates the live push. The cross-group Search page has no such connection — its file list is a one-shot cached fetch — so the button belongs there and only there. Gated on a new explicit `showRefresh` prop that only search-page.js passes; `onRefreshIndex` stays in commonProps for ChatPanel's own use after an attachment upload. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_018BMLQjqFGCize2KtNBT79v --- packages/meshbay-hub/src/meshbay_hub/static/files-app.js | 11 ++++++----- packages/meshbay-hub/src/meshbay_hub/static/search-page.js | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/meshbay-hub/src/meshbay_hub/static/files-app.js b/packages/meshbay-hub/src/meshbay_hub/static/files-app.js index d2f0727..ab7e254 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/files-app.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/files-app.js @@ -27,7 +27,7 @@ function FilesPanel({ groupId, transportRef, gekRef, status, entries, nodeDirs, nodeRoots, setEntries, setNodeDirs, setNodeRoots, applyIndex, isNodeAdmin, operatorPaired, mayUpload, userId, setError, onPreview, - showGroup, readOnly, getTransport, onRefreshIndex, + showGroup, readOnly, getTransport, onRefreshIndex, showRefresh, }) { const [selecting, setSelecting] = useState(false); const [selected, setSelected] = useState(() => new Set()); @@ -37,9 +37,10 @@ function FilesPanel({ const [currentPath, setCurrentPath] = useState(''); const [refreshing, setRefreshing] = useState(false); - // Force a re-fetch of the group index from the node — the client's file - // list is a view over a cached copy, and there is no other way to pull a - // fresh one on demand. + // Only the cross-group Search page shows this (`showRefresh`): it has no + // live node connection pushing index deltas, so its file list really is + // a one-shot cached fetch. In a real group the node streams every change + // as it happens, so a manual re-fetch would just duplicate that. const doRefresh = useCallback(async () => { if (refreshing || !onRefreshIndex) return; setRefreshing(true); @@ -339,7 +340,7 @@ function FilesPanel({