diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-10-02 10:20:09 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-10-02 10:20:09 +0200 |
| commit | e4f61771131be635b9e81a19203a00707b4b19df (patch) | |
| tree | d80e4edafbeade3c27137e6753140e6585a26b9b /packages/meshbay-hub/src/meshbay_hub/static/transport.js | |
| parent | e941cc4c39c38a12220153ea572bd4c7bb92fde0 (diff) | |
| download | meshbay-e4f61771131be635b9e81a19203a00707b4b19df.tar.gz | |
feat(mnp): sharing a folder is decided on the node's machine only (MNP 6.0)
root_add, root_update and group_attach leave MNP: adding a directory and
switching writable/removable go through the loopback API (native dialog in
the desktop app) or the CLI. The operator's Settings tab still lists the
roots from any browser, read-only. The desktop app refuses to sign those
ops; a loopback flag change now reaches open pages (publish_roots).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/transport.js')
| -rw-r--r-- | packages/meshbay-hub/src/meshbay_hub/static/transport.js | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/transport.js b/packages/meshbay-hub/src/meshbay_hub/static/transport.js index f9e1370..e60f673 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/transport.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/transport.js @@ -193,8 +193,7 @@ function _aborted() { // table, then on Chat's directory, where it meant the pane went on showing an // unsaved-looking draft after a save that had worked. const BROADCAST_ACK_TYPES = new Set([ - 'root_update_ack', 'root_eject_ack', 'root_plug_ack', - 'root_add_ack', 'root_remove_ack', + 'root_eject_ack', 'root_plug_ack', 'root_remove_ack', 'app_directories_ack', 'chat_directory_ack', 'chat_link_preview_ack', 'chat_epoch_ack', 'search_listed_ack', ]); @@ -220,9 +219,9 @@ 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_add', 'root_remove', 'root_update', 'root_eject', 'root_plug', + 'root_remove', 'root_eject', 'root_plug', 'app_directories', 'chat_directory', 'chat_link_preview', 'chat_epoch', - 'search_listed', 'member_unpin', 'gek_rotate', 'group_attach', + 'search_listed', 'member_unpin', 'gek_rotate', 'group_detach', 'invite_create', 'invite_link_create', 'invite_cancel', ]); @@ -367,9 +366,10 @@ window.addEventListener('hashchange', () => { // The `v: '0.1'` on every other message in this file is the historical value // and is read by nothing; it is left alone deliberately. The range is // negotiated once, at the start, not restated per message. -const MNP_V = '5.0'; -// Not raised with 5.0 (see meshbay_common/__init__.py): the break is confined to -// four signed operations, which a peer on the other side of it refuses to sign. +const MNP_V = '6.0'; +// Not raised with 5.0 or 6.0 (see meshbay_common/__init__.py): each break is +// confined to a few signed operations — 5.0 changed four subjects, 6.0 removed +// root_add, root_update and group_attach — and everything else still works. // Set at 4.0, a flag day. A member now presents a short-lived // MNP-audience token in the handshake, not its hub session token — a node // older than 4.0 expected the session token, and one newer refuses it, so the @@ -2030,11 +2030,11 @@ class MeshBayTransport { this._onMusicbrainzEnabled(Boolean(msg.enabled)); } - // A root's flags changed, or one was ejected, plugged, added or removed. - // Broadcast by the node to every peer, so everyone's table updates without - // waiting for the next index_sync. - if (msg.type === 'root_update_ack' || msg.type === 'root_eject_ack' - || msg.type === 'root_plug_ack' || msg.type === 'root_add_ack' + // 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 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_remove_ack') { if (this._onRootsChanged) this._onRootsChanged(msg); } |