feat(app): Tauri window and the Windows build

M5 step 5, first part. app/shell is a Tauri 2 crate (jarvis.exe): one
window over app/ui whose invoke("admin") goes to AdminApi::call. Its
WebView2 data sits next to the location file; closing the window stops
the services and waits for a cancelled start (AdminApi::shutdown).

app/shell/package.sh cross-builds it on Linux (x86_64-pc-windows-gnu)
and lays out Jarvis/ with WebView2Loader.dll and python-src/
(voice_worker, jarvis). The worker's default sources are python-src next
to the executable when present, else the repository's src/.

The bot screen now shows the masked token right after saving.

Checked on the win-ci VM: the window and wizard, PC check, uv and worker
venv installed, a cancel leaving no uv/Python process, the token stored
DPAPI-encrypted, a start failing with its reason, logs, error copy, zip
export, closing the window ending the process, nothing under %APPDATA% or
%LOCALAPPDATA%; the core's unit tests on Windows (156/157, the one
Linux-path assumption fixed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-11-12 18:16:02 +09:00
parent 81ba5e3521
commit ac8c30022d
17 changed files with 7752 additions and 7 deletions

View File

@@ -255,6 +255,20 @@ Plain HTML, CSS and an ES module, no build step, dark theme after `DESIGN.md`. A
the commands on 127.0.0.1; every command needs the random token it prints (`#token=` in the page
URL), so other local programs cannot drive it.
## Window and Windows build (`app/shell/`)
- `jarvis.exe` (crate `jarvis-shell`, Tauri 2 on the WebView2 Windows already has) opens one window
with the screens (`app/ui`) and passes `invoke("admin", {command, args})` to `AdminApi::call`.
`--location FILE` replaces the default location file (`%APPDATA%\JarvisBot\location.json`).
The window's own browser data goes next to the location file (`webview/`), nothing under
`%LOCALAPPDATA%`. Closing the window stops the services and waits until a start in progress is
cancelled (`AdminApi::shutdown`), so nothing the app started keeps running.
- `app/shell/package.sh <folder>` builds it on Linux (`x86_64-pc-windows-gnu`, mingw-w64) and lays
out `Jarvis/`: `jarvis.exe`, `WebView2Loader.dll` and `python-src/` (the `voice_worker` and
`jarvis` packages, no caches or specs). The worker's default sources are `python-src` next to the
executable when it is there, else the repository's `src/`; the install reads its requirement
files from the same place. The installer (NSIS) comes later; the folder runs as it is.
## Tests
`cargo test`: data folder layout, location file and the environment override, a refused relative
@@ -278,5 +292,9 @@ commands (first run: folder then token, the token never returned whole, the wiza
step until finished, log files and the zip from the folder choice on, settings and logs through
their modules, the dashboard before anything runs), the invite link's permissions and the Message
Content flags. The screens are checked in a browser against the development server with the real
services (wizard, dashboard start, restart and stop, settings save, chat channels, logs, export). Windows-only paths (DPAPI, `%APPDATA%`) are
checked on the Windows VM in the Windows build step.
services (wizard, dashboard start, restart and stop, settings save, chat channels, logs, export). On Windows (the win-ci VM, `x86_64-pc-windows-gnu` build): the unit tests (DPAPI, data folder,
downloads, install steps, logs; the Unix-only process tests excepted), and the window by hand: the
wizard's folder, PC check and install (`uv` and the worker venv installed, a cancel leaving no
`uv` or Python process), the token stored DPAPI-encrypted, a start failing with its reason, the
log screen, error copy, zip export, and closing the window ending the process with nothing written
to `%APPDATA%` or `%LOCALAPPDATA%`.