From 0bdce359c0bf19fa98f1b7f9975be32704abe1f0 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Fri, 25 Sep 2026 10:47:37 +0200 Subject: feat(client): fetch the media apps, the player, settings and search on first use apps.js registers Videos, Music, Photos and every settings pane through lazy.js; the group page does the same for the video player and the settings panel, and the shell for the search page. The first download goes from 49 modules / 386 KB gzip to 37 / 289 KB; opening Music now fetches music-app.js and media-tiles.js and nothing of Videos. test_first_load_is_lean holds the eager graph; test_spa_imports checks that every on-demand load names an export that exists. Co-Authored-By: Claude Opus 5.5 --- docs/MESHBAY_DESIGN.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'docs/MESHBAY_DESIGN.md') diff --git a/docs/MESHBAY_DESIGN.md b/docs/MESHBAY_DESIGN.md index f260d6e..13e0cab 100644 --- a/docs/MESHBAY_DESIGN.md +++ b/docs/MESHBAY_DESIGN.md @@ -2449,7 +2449,12 @@ There is no folder-browsing protocol and this does not add one. 1. **`-app.js`** exporting a component with the standard props shape. 2. **Register it** in the registry. `key` is the wire identifier: it must match the node's allow-list and it is the row the application's directories are stored - under. **One identifier per application, everywhere.** + under. **One identifier per application, everywhere.** Register the + component — and its settings pane — through `lazy(() => import('./-app.js'), + 'Name')` (`lazy.js`), not a static import: the module is then fetched the first + time the tab is opened instead of with the first page, and + `test_first_load_is_lean.py` (add the file to its `ON_DEMAND` set) refuses a + static import that would bring it back. 3. **`-app-settings.js`** if it has anything to configure. Do not import the settings page — that is the cycle in §9.1. 4. **Add the key to the node's allow-list**, and — if the application keeps -- cgit v1.2.3