summaryrefslogtreecommitdiffstats
path: root/docs/apps.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/apps.md')
-rw-r--r--docs/apps.md44
1 files changed, 29 insertions, 15 deletions
diff --git a/docs/apps.md b/docs/apps.md
index ef8cc1a..7ce1e73 100644
--- a/docs/apps.md
+++ b/docs/apps.md
@@ -130,9 +130,10 @@ any app with similar per-group local state.
## 3. Enable/disable: the mechanism
-Same shape as `member_upload` (`meshbay-draft-v6.md` §2.1b) — an
+Same shape as a root's `writable` flag (`refactor-groups.md` §1.1) — an
operator-signed setting, stored on the node, enforced by absence rather than
-by the client's honesty.
+by the client's honesty. It used to be described against `member_upload`,
+which was the group-wide upload switch; that was removed in the same refactor.
**Node side** (`meshbay_node/roster.py`):
```python
@@ -148,8 +149,13 @@ from exactly one place: `webrtc_server.py`'s `_admin_exec_apps_enabled`, after
`_do_apps_enabled` in `webrtc_server.py` validates before it ever issues a
challenge:
- `apps` non-empty — the operator can never lock a group down to nothing.
-- every entry in `WebRTCPeerSession.ALLOWED_APPS` (`{"chat", "files"}` today)
- — **this is the line a new app's node-side registration touches.**
+- every entry in `WebRTCPeerSession.ALLOWED_APPS`
+ (`{"chat", "files", "video", "music", "photo"}` today) — **this is the line
+ a new app's node-side registration touches.**
+- `files` is added to the list if it is absent, at both writers
+ (`_do_apps_enabled` and `ops.set_enabled_apps`, both at the front so the two
+ agree). It is not a toggle: MNP permits root exploration regardless of what
+ this list says, so hiding the tab only ever misled.
The whole set is signed in one message (`apps_enabled`, `OP_APPS_ENABLED` in
`meshbay_common.adminop`) rather than one op per app — ticking several boxes
@@ -158,11 +164,11 @@ sorted, comma-joined app list (`"chat,files"`), built the same way on both
sides so the operator's browser and the node arrive at identical bytes to
sign/verify.
-`enabled_apps` rides in `handshake_ack` and `node_status`, next to
-`member_upload`. Changing it broadcasts `apps_enabled_ack` to everyone already
-connected — `transport.js`'s `onAppsEnabled` — so a disabled tab disappears
-without waiting for a reconnection, the same as `member_upload`'s live
-broadcast.
+`enabled_apps` rides in `handshake_ack` and `node_status`, next to the roots
+table. Changing it broadcasts `apps_enabled_ack` to everyone already connected
+— `transport.js`'s `onAppsEnabled` — so a disabled tab disappears without
+waiting for a reconnection. The root ops (`root_update_ack`, `root_eject_ack`,
+`root_plug_ack`) broadcast the same way, through `onRootsChanged`.
**Client side:** `apps.js`'s `visibleApps(enabledKeys)` filters the registry;
`group-page.js` calls it with `enabledApps` state (from the ack, `null` until
@@ -234,9 +240,17 @@ the only node-side touches, and both are allow-lists, not new wire messages.
machinery again; unlike Videos/Music it needs several root folders per
group rather than one, has a single album-grid view with no third-party
matching step, and reads EXIF locally on the node instead.
-- **The offline/loopback settings path.** `member_upload` can be toggled two
- ways: over a live MNP connection, or (Electron only) via the node's local
- HTTP API when MNP isn't connected (`platform.node.call('PUT', .../member-
- upload')`, `group-settings.js`). `apps_enabled` only has the MNP path today.
- Adding the loopback twin is a `meshbay_node.ui` endpoint plus a
- `group-settings.js` branch, mirroring the existing `member_upload` one.
+- **The offline/loopback settings path.** A root's flags can be changed two
+ ways: over a live MNP connection (any browser, anywhere), or — Electron
+ only, and only when MNP is not connected — via the node's local HTTP API
+ (`platform.node.call('PATCH', '/api/groups/<id>/roots/<name>')`,
+ `SharedDirectoriesTable` in `group-settings.js`). `apps_enabled` only has
+ the MNP path today. Adding the loopback twin is a `meshbay_node.ui` endpoint
+ plus a branch in the table's `run()` helper, mirroring the root ops.
+
+ **MNP is the path that must exist, not the fallback.** The operator of a
+ node is not necessarily sitting at it. The first version of the shared
+ directories table read its roots exclusively from the loopback API, which
+ resolves to "not available" in a browser — so the whole section rendered for
+ nobody on the web, while the controls it replaced had worked there. Any
+ operator-facing setting added here needs the MNP route first.