From 14911aae21ec4975f7a805b91e3c4867cb41974b Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Mon, 12 Oct 2026 00:17:32 +0200 Subject: feat: let the operator pause and resume a root's indexing (MNP 6.2) A whole-root walk now checks its root before every file: removed or ejected, it stops instead of reading the drive to the end; paused, it finishes from the hash cache alone. A paused root is not watched, not swept by reconcile and survives a restart (roster), its indexed files stay served. Resume runs the reconcile sweep over the root, so entries and their enrichment are kept. Signed root_pause / root_resume over MNP, loopback routes, CLI `root pause|resume`, a pause button on the indexing dock and pause/resume in the roots table of Group settings. Co-Authored-By: Claude Opus 5.5 --- packages/meshbay-hub/src/meshbay_hub/static/transport.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'packages/meshbay-hub/src/meshbay_hub/static/transport.js') diff --git a/packages/meshbay-hub/src/meshbay_hub/static/transport.js b/packages/meshbay-hub/src/meshbay_hub/static/transport.js index ee6645f..c86d668 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/transport.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/transport.js @@ -196,7 +196,7 @@ function _aborted() { // unsaved-looking draft after a save that had worked. const BROADCAST_ACK_TYPES = new Set([ 'root_eject_ack', 'root_plug_ack', 'root_remove_ack', - 'app_directories_ack', 'chat_directory_ack', 'chat_link_preview_ack', + 'root_pause_ack', 'root_resume_ack', 'app_directories_ack', 'chat_directory_ack', 'chat_link_preview_ack', 'chat_epoch_ack', 'chat_purge_ack', 'search_listed_ack', ]); @@ -223,7 +223,7 @@ const ADMIN_OP_TYPES = new Set([ 'tmdb_override', 'tmdb_rematch', 'tmdb_config', 'tmdb_enabled', 'musicbrainz_enabled', 'file_delete', 'dir_delete', 'apps_enabled', 'set_scan_settings', 'member_revoke', - 'root_remove', 'root_eject', 'root_plug', + 'root_remove', 'root_eject', 'root_plug', 'root_pause', 'root_resume', 'app_directories', 'chat_directory', 'chat_link_preview', 'chat_epoch', 'chat_purge', 'search_listed', 'invite_create', 'invite_link_create', 'invite_cancel', ]); @@ -2141,11 +2141,13 @@ class MeshBayTransport { this._onMusicbrainzEnabled(Boolean(msg.enabled)); } - // A root was ejected, plugged or removed. Broadcast by the node to every - // peer, so everyone's table updates without waiting for the next index_sync. + // A root was ejected, plugged, paused, resumed or removed. Broadcast by the + // node to every peer, so everyone's table updates without waiting for the + // next index_sync. // A root added or a flag changed — on the node's own machine, never over // MNP — arrives in the index_delta the node pushes. if (msg.type === 'root_eject_ack' || msg.type === 'root_plug_ack' + || msg.type === 'root_pause_ack' || msg.type === 'root_resume_ack' || msg.type === 'root_remove_ack') { if (this._onRootsChanged) this._onRootsChanged(msg); } -- cgit v1.2.3