aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-common
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-08-25 00:29:03 +0200
committerChristophe Besson <cbesson@gmail.com>2026-08-25 00:29:03 +0200
commit06c101154d544290d27f18d6fc08fb5f58a4e5d5 (patch)
treebbcb6b863bdc7b722e5605bf3ff975cdfa022ee0 /packages/meshbay-common
parenta41be5c5d6212f4eadc54bc17354311b0655a5a4 (diff)
downloadmeshbay-06c101154d544290d27f18d6fc08fb5f58a4e5d5.tar.gz
fix(hub): poll for a root count change instead of trusting one fetch
Point 1 (directory list not updating without a full page reload) turned out to still reproduce after the earlier onRefreshIndex fix — that one addressed the Videos/Music root pickers (nodeDirs), but this section's own list reads a different field entirely (ops.list_groups returns the *runtime* root set, groups_ctx[gid]["roots"]) that only gets replaced once _reload_config_inner's retarget actually finishes. /api/reload itself is fire-and-forget on the node by design (ops.start_reload's own docstring — a brand-new group's initial scan can take minutes, the caller must not block on it), so a single loadNodeInfo() call right after can land in the gap before that replacement happens and show the pre-change count. Both the add and remove handlers now poll /api/groups (up to ~4s, every 400ms) until the root count actually matches what the action should have produced, rather than fetching once and hoping the timing worked out.
Diffstat (limited to 'packages/meshbay-common')
0 files changed, 0 insertions, 0 deletions