From cf418a095b07c8127042390c748e721d1433879b Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Tue, 18 Aug 2026 13:40:15 +0200 Subject: fix(client): downloads stream to disk, and two rough edges on first run MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Downloads were going through RAM.** `_openDownloadTarget` tries a granted folder, then a service worker, then its floor: collect the whole file in the page and hand the browser a blob. Both of the first two are absent in the desktop application — `showDirectoryPicker` does not exist, and Chromium refuses a service worker on a custom scheme — so every download under 512 MB took the floor. A gigabyte of film meant a gigabyte of RAM, and the only visible symptom was a Save As dialog at the *end* rather than the start, which is what the operator noticed and asked about. The main process now streams to disk: it honours "save automatically" with a folder chosen once and no dialog, never overwrites (a colliding name gets a suffix), awaits each write so the renderer cannot outrun the disk and queue the file in memory anyway, and unlinks a cancelled download rather than leaving a truncated file that looks complete to whoever opens it next. Settings now offers the native folder picker instead of saying downloads are unsupported. Measured in the running application: the file on disk grows 256 KB → 512 KB → 768 KB → 1 MB as the chunks arrive, and an aborted download leaves nothing behind. **A permanent scrollbar on sign-in.** `.layout` and `.page-center` each reserved `100vh - 52px`, and `.page-center` sits inside `main`'s 24px vertical padding — so the page overflowed by exactly 48px at every window size. Found by measuring in the app rather than reading the stylesheet: `scrollHeight` 819 against a 771 viewport, then the bottom edge of every element. The centring page brings its own padding, so main's is dropped for it and the duplicated arithmetic goes rather than growing a third term. Now `scrollHeight == innerHeight`, no overflowing elements. **The first-run screen was unstyled.** It used a class name I invented (`auth-page`) that appears nowhere in the stylesheet, so it had no card and the button sat against the input. It now uses the same `page-center` + `login-card` markup as sign-in, which is where the 12px gap comes from. The sign-in link in the nav is hidden until a hub is chosen — it led to a page that could not work. 809 tests pass. Co-Authored-By: Claude Opus 5 --- packages/meshbay-hub/src/meshbay_hub/static/locales/de.js | 1 + packages/meshbay-hub/src/meshbay_hub/static/locales/en.js | 1 + packages/meshbay-hub/src/meshbay_hub/static/locales/es.js | 1 + packages/meshbay-hub/src/meshbay_hub/static/locales/fr.js | 1 + packages/meshbay-hub/src/meshbay_hub/static/locales/it.js | 1 + packages/meshbay-hub/src/meshbay_hub/static/locales/ja.js | 1 + packages/meshbay-hub/src/meshbay_hub/static/locales/nl.js | 1 + packages/meshbay-hub/src/meshbay_hub/static/locales/pl.js | 1 + packages/meshbay-hub/src/meshbay_hub/static/locales/pt-BR.js | 1 + packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js | 1 + 10 files changed, 10 insertions(+) (limited to 'packages/meshbay-hub/src/meshbay_hub/static/locales') diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/de.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/de.js index ff7bd8a..e099edb 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/locales/de.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/de.js @@ -201,6 +201,7 @@ export default { 'firstrun.title': 'Which hub?', 'firstrun.hint': 'A hub holds your account and introduces you to nodes. It never sees your files, your messages or your keys.', 'firstrun.btn': 'Continue', + 'firstrun.checking': 'Checking…', 'firstrun.note': 'There is no default on purpose: this application only trusts a hub for its API, never for the interface, which ships with the application itself.', 'device.this_device': 'This device', 'settings.keys_heading': 'Keys on this device', diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/en.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/en.js index 738a862..a621084 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/locales/en.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/en.js @@ -193,6 +193,7 @@ export default { 'firstrun.title': 'Which hub?', 'firstrun.hint': 'A hub holds your account and introduces you to nodes. It never sees your files, your messages or your keys.', 'firstrun.btn': 'Continue', + 'firstrun.checking': 'Checking…', 'firstrun.note': 'There is no default on purpose: this application only trusts a hub for its API, never for the interface, which ships with the application itself.', 'device.this_device': 'This device', 'settings.keys_heading': 'Keys on this device', diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/es.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/es.js index fb5cb0e..5fb4950 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/locales/es.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/es.js @@ -197,6 +197,7 @@ export default { 'firstrun.title': 'Which hub?', 'firstrun.hint': 'A hub holds your account and introduces you to nodes. It never sees your files, your messages or your keys.', 'firstrun.btn': 'Continue', + 'firstrun.checking': 'Checking…', 'firstrun.note': 'There is no default on purpose: this application only trusts a hub for its API, never for the interface, which ships with the application itself.', 'device.this_device': 'This device', 'settings.keys_heading': 'Keys on this device', diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/fr.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/fr.js index a849730..c9480b6 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/locales/fr.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/fr.js @@ -201,6 +201,7 @@ export default { 'firstrun.title': 'Quel hub ?', 'firstrun.hint': 'Un hub détient votre compte et vous met en relation avec les nœuds. Il ne voit ni vos fichiers, ni vos messages, ni vos clés.', 'firstrun.btn': 'Continuer', + 'firstrun.checking': 'Vérification…', 'firstrun.note': 'Il n’y a volontairement pas de valeur par défaut : cette application ne fait confiance à un hub que pour son API, jamais pour l’interface, qui est livrée avec l’application.', 'device.this_device': 'Cet appareil', 'settings.keys_heading': 'Clés sur cet appareil', diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/it.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/it.js index 17ad3e0..ac7c06c 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/locales/it.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/it.js @@ -200,6 +200,7 @@ export default { 'firstrun.title': 'Which hub?', 'firstrun.hint': 'A hub holds your account and introduces you to nodes. It never sees your files, your messages or your keys.', 'firstrun.btn': 'Continue', + 'firstrun.checking': 'Checking…', 'firstrun.note': 'There is no default on purpose: this application only trusts a hub for its API, never for the interface, which ships with the application itself.', 'device.this_device': 'This device', 'settings.keys_heading': 'Keys on this device', diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/ja.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/ja.js index 47221a6..b5d60ca 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/locales/ja.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/ja.js @@ -195,6 +195,7 @@ export default { 'firstrun.title': 'Which hub?', 'firstrun.hint': 'A hub holds your account and introduces you to nodes. It never sees your files, your messages or your keys.', 'firstrun.btn': 'Continue', + 'firstrun.checking': 'Checking…', 'firstrun.note': 'There is no default on purpose: this application only trusts a hub for its API, never for the interface, which ships with the application itself.', 'device.this_device': 'This device', 'settings.keys_heading': 'Keys on this device', diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/nl.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/nl.js index 617cdcd..304c90a 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/locales/nl.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/nl.js @@ -201,6 +201,7 @@ export default { 'firstrun.title': 'Which hub?', 'firstrun.hint': 'A hub holds your account and introduces you to nodes. It never sees your files, your messages or your keys.', 'firstrun.btn': 'Continue', + 'firstrun.checking': 'Checking…', 'firstrun.note': 'There is no default on purpose: this application only trusts a hub for its API, never for the interface, which ships with the application itself.', 'device.this_device': 'This device', 'settings.keys_heading': 'Keys on this device', diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/pl.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/pl.js index ddbd1a9..98f36ce 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/locales/pl.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/pl.js @@ -207,6 +207,7 @@ export default { 'firstrun.title': 'Which hub?', 'firstrun.hint': 'A hub holds your account and introduces you to nodes. It never sees your files, your messages or your keys.', 'firstrun.btn': 'Continue', + 'firstrun.checking': 'Checking…', 'firstrun.note': 'There is no default on purpose: this application only trusts a hub for its API, never for the interface, which ships with the application itself.', 'device.this_device': 'This device', 'settings.keys_heading': 'Keys on this device', diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/pt-BR.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/pt-BR.js index 18c0921..5db5cd5 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/locales/pt-BR.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/pt-BR.js @@ -199,6 +199,7 @@ export default { 'firstrun.title': 'Which hub?', 'firstrun.hint': 'A hub holds your account and introduces you to nodes. It never sees your files, your messages or your keys.', 'firstrun.btn': 'Continue', + 'firstrun.checking': 'Checking…', 'firstrun.note': 'There is no default on purpose: this application only trusts a hub for its API, never for the interface, which ships with the application itself.', 'device.this_device': 'This device', 'settings.keys_heading': 'Keys on this device', diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js index d868335..b5f16fb 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js @@ -186,6 +186,7 @@ export default { 'firstrun.title': 'Which hub?', 'firstrun.hint': 'A hub holds your account and introduces you to nodes. It never sees your files, your messages or your keys.', 'firstrun.btn': 'Continue', + 'firstrun.checking': 'Checking…', 'firstrun.note': 'There is no default on purpose: this application only trusts a hub for its API, never for the interface, which ships with the application itself.', 'device.this_device': 'This device', 'settings.keys_heading': 'Keys on this device', -- cgit v1.2.3