fix(desktop): find the sidecar in a macOS app bundle and fit the startup screen (UF-004, UF-017)

- The packaged macOS app stayed on "Starting Waggle…": the shell looked
  for node, service.js, native/ and node_modules/ next to the executable,
  the Windows layout, while a macOS bundle keeps them in
  Contents/Resources/resources. bundled_resources_dir() checks both.
- The startup screen used min-height 100vh on an unstyled body, which
  showed scroll bars, and a fixed light text colour that is invisible in
  the light theme. It is now styled from index.html, fixed to the window,
  with a dark text colour for the light theme.
This commit is contained in:
shumeiko.it
2026-10-24 19:10:23 +02:00
parent 276808cd69
commit 1f536151d8
4 changed files with 64 additions and 20 deletions

View File

@@ -32,7 +32,7 @@ Baseline: commit `b20b138` of `git.os-dev.tech/oleg.m/waggle-os`.
| UF-001 | Vendored PptxGenJS runtime is missing from the repository | Fixed | Build, git |
| UF-002 | Setup instructions skip the package build step | Open | Docs, build |
| UF-003 | `npm run dev:web` cannot authenticate against the sidecar | Workaround | Web UI, sidecar |
| UF-004 | Packaged macOS and Linux apps likely cannot find the sidecar | Open | Desktop shell |
| UF-004 | Packaged macOS and Linux apps cannot find the sidecar | Fixed on macOS, open on Linux | Desktop shell |
| UF-005 | Live Stripe webhook secret in git history | Open | Security |
| UF-006 | Conflicting license files in weaver and optimizer | Open | Licensing |
| UF-007 | Onboarding Industry dropdown opens invisibly under the scrim | Fixed | Web UI |
@@ -45,7 +45,7 @@ Baseline: commit `b20b138` of `git.os-dev.tech/oleg.m/waggle-os`.
| UF-014 | Timeline "Edit" button has no action | Open | Web UI |
| UF-015 | Ctrl+Shift+digit app shortcuts never fire | Open | Web UI |
| UF-016 | Tailwind `dark:` variants never apply | Open | Web UI |
| UF-017 | Startup text is invisible in the light theme | Open | Web UI |
| UF-017 | Startup text is invisible in the light theme | Fixed | Web UI |
| UF-018 | Default model shown in the top bar disagrees with Model Pilot | Open | Web UI, models |
| UF-019 | Memory count pluralization: "1 Memories" | Open | Web UI |
| UF-020 | WhatsApp connector bundles GPL-3.0 code into the sidecar | Fixed | Licensing |
@@ -98,13 +98,13 @@ Baseline: commit `b20b138` of `git.os-dev.tech/oleg.m/waggle-os`.
- What we did: built the UI with `npm run build` and opened it through the sidecar on `http://localhost:3333`, the same way the Playwright suite and `install.sh` run it. No code changes.
- Recommendation: set `changeOrigin: false` for the `/api` and `/health` proxies so `Host` stays `localhost:8080`, or allow the dev-server origin explicitly. Confirm the security intent of the bootstrap check first. Update the README accordingly.
### UF-004. Packaged macOS and Linux apps likely cannot find the sidecar
- Status: Open (found by reading the code; not yet confirmed by launching a packaged build)
### UF-004. Packaged macOS and Linux apps cannot find the sidecar
- Status: Fixed on macOS (confirmed on 2026-10-24 by launching a packaged build: the window stays on "Starting Waggle…"); open on Linux
- Found: 2026-09-27
- Where: `app/src-tauri/src/service.rs`, functions `resolve_node_path` and `resolve_service_script`
- Symptom: expected error on start of a packaged macOS or Linux build: the shell cannot locate `node` or `resources/service.js`.
- Cause: both functions look for resources next to the executable (`std::env::current_exe()`). That matches the Windows NSIS layout only. On macOS resources live in `Contents/Resources`, on Linux under `/usr/lib/<app>`. The code never uses Tauri's `resource_dir()`. CI builds the macOS app but never launches it.
- What we did: nothing yet. Planned in work package P1.3d.
- What we did: `bundled_resources_dir()` in `service.rs` looks next to the executable first (Windows) and then in the app bundle's `Contents/Resources/resources` (macOS), for `node`, `service.js`, `native/` and `node_modules/`. The Linux layout follows with the Linux packages in P1.3d.
- Recommendation: resolve resources through `app.path().resource_dir()` and add a CI smoke test that launches packaged macOS and Linux builds.
### UF-005. Live Stripe webhook secret in git history
@@ -198,9 +198,10 @@ Entries UF-010 to UF-019 come from the UI audit `anti-slop/audit-001-2026-10-14.
- Recommendation: use `darkMode: ["selector", '[data-theme="dark"]']` or set `.dark` together with `data-theme`.
### UF-017. Startup text is invisible in the light theme
- Status: Open (code)
- Status: Fixed
- Where: `apps/web/src/main.tsx:12`
- Symptom: the "Starting Waggle…" text has a fixed colour `#f6f1e4`, while the light theme background is `#f7f1e4`.
- What we did: the startup screen takes its styles from `index.html`, with a dark text colour for the light theme. It is also fixed to the window, so the unstyled body no longer shows scroll bars around it.
- Recommendation: use a theme token for the startup text.
### UF-018. Default model shown in the top bar disagrees with Model Pilot