diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-09-12 15:48:03 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-09-12 15:48:22 +0200 |
| commit | 9cc2909cb4a360c81b471ceab1d9578a7655a88e (patch) | |
| tree | da6da7ff43eed10382e72247ef7c84b142a42ca5 /packages/meshbay-hub | |
| parent | d8885c8df17c60927cb8d1f77ce1745814c6d3b4 (diff) | |
| download | meshbay-9cc2909cb4a360c81b471ceab1d9578a7655a88e.tar.gz | |
fix(packaging): three MSIX first-run regressions found by a real sideload
A second-machine sideload of the MSIX target surfaced three things the
earlier verification round (which only proved the package installs and
runs) had missed:
1. meshbay-node missing from PATH. installer.nsh's customInstall adds
node-runtime\ to HKCU\Environment at install time -- an unelevated
per-user write, never blocked by MSIX's no-elevation rule, only by the
more basic fact that an AppX/MSIX install runs no custom code at all.
packaging/win/ensure-node-path.ps1 (idempotent, no admin verb) plus
main.js's winEnsureNodeOnPath() do it from the app itself instead, once
per launch, shipped to Full and MSIX (not Light, nothing to add there).
Verified live via the Node inspector protocol: the entry was in
HKCU\Environment\Path after a launch, absent before.
2. A daemon that crashes on startup failed silently. spawnNodeDetached()
used stdio: 'ignore', so a real crash reproduced live (a second instance
colliding with the first on 127.0.0.1:18000) left waitForNode()'s
generic 60s timeout as the only failure ever shown. spawnNodeDetachedWatched()
pipes stdio and watches ~2.5s, rejecting immediately with the daemon's
own stderr on an early exit; a survivor has its streams released and
runs fully detached exactly as before. First version bounded the
captured text by line count and a live test showed that cut the actual
OSError line -- two uvicorn/asyncio tracebacks followed it in the real
capture -- so it is bounded by characters instead.
3. No hint that a startup-mode choice exists. The install-time radio page
was the only place this was ever offered, and nothing replaces it now
that no install-time page can exist at all. SetupWelcome (the existing
first-run banner) grew a conditional hint, shown only while a bundled
node is present and neither autostart nor service mode is configured
yet. Considered and rejected: linking straight to the Node page -- its
route is gated on a linked hub node key, false on the exact fresh-install
screen this hint targets, so the link would have been dead on arrival.
New key setup.node_startup_hint, added to all ten locale catalogues.
test_packaging_win.py gained six tests pinning all three (69 total).
Full plan and verification detail: C:\Users\admin\devel\msix-installer.md
section 13 (out of repo).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-hub')
11 files changed, 38 insertions, 0 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/app.js b/packages/meshbay-hub/src/meshbay_hub/static/app.js index ba24822..188b389 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/app.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/app.js @@ -569,10 +569,38 @@ function HomePage({ groups, notifications, onMarkRead, onPurge, allowPublicGroup // ── First-run welcome (Electron-only, shown once on empty home) ───────────── function SetupWelcome({ onDismiss }) { + // An install-time NSIS page used to be the only place this choice was + // ever offered, and an AppX/MSIX install has no install-time page at all + // (no custom actions, full stop, not just no elevation) -- so a build + // running its own bundled node needs to say so somewhere the user will + // actually see it, not just leave the choice sitting unfound on the Node + // page. Shown only while neither startup mode is configured yet; it + // disappears on its own once one is (or stays hidden forever if the + // platform has no node.service at all, e.g. Light, non-Windows, browser). + const [startupHint, setStartupHint] = useState(false); + useEffect(() => { + let cancelled = false; + (async () => { + try { + if (!platform.node.available || !(await platform.node.bundled())) return; + if (!platform.node.service.available) return; + const status = await platform.node.service.status(); + const configured = status.mode === 'service' || Boolean(status.autostart); + if (!cancelled && status.supported !== false && !configured) setStartupHint(true); + } catch { /* best effort -- the Node page itself is the source of truth */ } + })(); + return () => { cancelled = true; }; + }, []); + return html`<div class="page-content"> <h2>${t('setup.welcome_title')}</h2> <p class="page-message" style="margin-bottom:24px"> ${t('setup.welcome_message')}</p> + ${startupHint && html` + <p class="page-message" style="margin-bottom:24px"> + ${t('setup.node_startup_hint')} + </p> + `} <div style="display:flex;gap:8px;flex-wrap:wrap"> <a class="btn btn-primary" href="#/create-group"> ${t('setup.create_group')}</a> 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 a41eeee..2d67bb2 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/locales/de.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/de.js @@ -730,6 +730,7 @@ export default { 'setup.node_started': 'Node gestartet.', 'setup.node_not_installed': 'meshbay-node ist auf diesem Rechner nicht installiert.', 'setup.node_install_hint': 'Installieren Sie es mit Ihrem Paketmanager und kommen Sie hierher zurück.', + 'setup.node_startup_hint': 'Sobald Ihr Node läuft, besuchen Sie jederzeit „Node“ in der Seitenleiste, um es automatisch bei der Anmeldung zu starten oder als Hintergrunddienst auszuführen.', 'setup.skip': 'Überspringen — Gruppe ohne lokalen Node erstellen', 'setup.create_group': 'Erste Gruppe erstellen', 'setup.dismiss': 'Einrichtung überspringen', 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 4561663..88ee3da 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/locales/en.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/en.js @@ -593,6 +593,7 @@ export default { 'setup.node_started': 'Node started.', 'setup.node_not_installed': 'meshbay-node is not installed on this machine.', 'setup.node_install_hint': 'Install it with your package manager, then come back here.', + 'setup.node_startup_hint': 'Once your node is running, visit “Node” in the sidebar any time to have it start automatically at sign-in, or run as a background service.', 'setup.skip': 'Skip — create a group without a local node', 'setup.create_group': 'Create your first group', 'setup.dismiss': 'Skip setup', 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 bbfcfa5..8dabc10 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/locales/es.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/es.js @@ -725,6 +725,7 @@ export default { 'setup.node_started': 'Node iniciado.', 'setup.node_not_installed': 'meshbay-node no está instalado en esta máquina.', 'setup.node_install_hint': 'Instálelo con su gestor de paquetes y vuelva aquí.', + 'setup.node_startup_hint': 'Una vez que su node esté en funcionamiento, visite «Node» en la barra lateral en cualquier momento para que se inicie automáticamente al iniciar sesión, o se ejecute como un servicio en segundo plano.', 'setup.skip': 'Omitir — crear un grupo sin node local', 'setup.create_group': 'Crear su primer grupo', 'setup.dismiss': 'Omitir configuración', 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 b5560fa..3cc1348 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/locales/fr.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/fr.js @@ -728,6 +728,7 @@ export default { 'setup.node_started': 'Node démarré.', 'setup.node_not_installed': 'meshbay-node n\'est pas installé sur cette machine.', 'setup.node_install_hint': 'Installez-le avec votre gestionnaire de paquets, puis revenez ici.', + 'setup.node_startup_hint': 'Une fois votre node en fonctionnement, consultez « Node » dans la barre latérale à tout moment pour le faire démarrer automatiquement à la connexion, ou fonctionner comme un service en arrière-plan.', 'setup.skip': 'Passer — créer un groupe sans node local', 'setup.create_group': 'Créer votre premier groupe', 'setup.dismiss': 'Passer la configuration', 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 358e824..83fe150 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/locales/it.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/it.js @@ -727,6 +727,7 @@ export default { 'setup.node_started': 'Node avviato.', 'setup.node_not_installed': 'meshbay-node non è installato su questa macchina.', 'setup.node_install_hint': 'Lo installi con il suo gestore di pacchetti, poi torni qui.', + 'setup.node_startup_hint': 'Una volta che il node è in esecuzione, visiti «Node» nella barra laterale in qualsiasi momento per farlo avviare automaticamente all\'accesso, o eseguirlo come servizio in background.', 'setup.skip': 'Salta — crea un gruppo senza node locale', 'setup.create_group': 'Crea il suo primo gruppo', 'setup.dismiss': 'Salta la configurazione', 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 e28635a..75728f8 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/locales/ja.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/ja.js @@ -715,6 +715,7 @@ export default { 'setup.node_started': 'Node が起動しました。', 'setup.node_not_installed': 'この端末に meshbay-node がインストールされていません。', 'setup.node_install_hint': 'パッケージマネージャーでインストールし、こちらにお戻りください。', + 'setup.node_startup_hint': 'ノードが起動したら、いつでもサイドバーの「Node」にアクセスして、サインイン時に自動的に起動するか、バックグラウンドサービスとして実行するように設定できます。', 'setup.skip': 'スキップ — ローカル node なしでグループを作成', 'setup.create_group': '最初のグループを作成', 'setup.dismiss': 'セットアップをスキップ', 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 4d35bdc..ae1c168 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/locales/nl.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/nl.js @@ -729,6 +729,7 @@ export default { 'setup.node_started': 'Node gestart.', 'setup.node_not_installed': 'meshbay-node is niet geïnstalleerd op deze machine.', 'setup.node_install_hint': 'Installeer het met uw pakketbeheerder en kom hier terug.', + 'setup.node_startup_hint': 'Zodra uw node actief is, bezoek dan op elk moment \'Node\' in de zijbalk om het automatisch te laten starten bij aanmelding, of als achtergrondservice te laten draaien.', 'setup.skip': 'Overslaan — groep aanmaken zonder lokale node', 'setup.create_group': 'Eerste groep aanmaken', 'setup.dismiss': 'Installatie overslaan', 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 85015b0..b3d1a1d 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/locales/pl.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/pl.js @@ -747,6 +747,7 @@ export default { 'setup.node_started': 'Node uruchomiony.', 'setup.node_not_installed': 'meshbay-node nie jest zainstalowany na tej maszynie.', 'setup.node_install_hint': 'Zainstaluj go za pomocą menedżera pakietów, a potem wróć tutaj.', + 'setup.node_startup_hint': 'Gdy twój node już działa, odwiedź w dowolnym momencie „Node” na pasku bocznym, aby uruchamiał się automatycznie przy logowaniu lub działał jako usługa w tle.', 'setup.skip': 'Pomiń — utwórz grupę bez lokalnego node', 'setup.create_group': 'Utwórz pierwszą grupę', 'setup.dismiss': 'Pomiń konfigurację', 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 9b9e80c..e0ec3fe 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 @@ -726,6 +726,7 @@ export default { 'setup.node_started': 'Node iniciado.', 'setup.node_not_installed': 'meshbay-node não está instalado nesta máquina.', 'setup.node_install_hint': 'Instale-o com seu gerenciador de pacotes e volte aqui.', + 'setup.node_startup_hint': 'Assim que seu node estiver em execução, acesse "Node" na barra lateral a qualquer momento para fazê-lo iniciar automaticamente ao entrar, ou rodar como um serviço em segundo plano.', 'setup.skip': 'Pular — criar um grupo sem node local', 'setup.create_group': 'Criar seu primeiro grupo', 'setup.dismiss': 'Pular configuração', 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 99872f2..01b54c3 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 @@ -702,6 +702,7 @@ export default { 'setup.node_started': 'Node 已启动。', 'setup.node_not_installed': '此机器上未安装 meshbay-node。', 'setup.node_install_hint': '请使用包管理器安装,然后回到此处。', + 'setup.node_startup_hint': '节点运行后,随时可在侧边栏访问"Node",将其设置为登录时自动启动,或作为后台服务运行。', 'setup.skip': '跳过 — 不使用本地 node 创建群组', 'setup.create_group': '创建第一个群组', 'setup.dismiss': '跳过设置', |