B1: alpha installers (NSIS, DMG), identifier com.tyrveil.lutra with data migration
- App identifier com.tyrveil.lutra (D26) in tauri.conf.json and rendezvous::APP_IDENTIFIER; a test keeps them equal. - First normal start copies settings.json, recovery/ and tools/ once from the dev.lutra.desktop directories (staging dir + rename, logged, info notification); old directories stay untouched. - Bundling on: per-user NSIS setup (English, German, Start menu, optional desktop shortcut, uninstaller) and DMG; `cargo xtask bundle` builds the platform's installer, joining the DMG backgrounds into a HiDPI TIFF on macOS. build.rs also writes icons/512x512.png for the .icns. - Installer images from the banner, designed by Amy, generated by `cargo xtask installer-images` (assets/installer/, ASSETS.md rows); approved by Daniel. - docs/install.md (SmartScreen, Gatekeeper, uninstall, data locations), README install section, architecture, development and macOS notes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
071b2a5644
commit
bd225d9e3a
22 changed files with 1367 additions and 17 deletions
|
|
@ -69,7 +69,7 @@ As built in M0:
|
|||
### CLI and single instance (M3.7)
|
||||
|
||||
- **Rendezvous file:** a desktop that owns the single instance serves a second, token-protected control listener on a free port of `127.0.0.1` (`lutra_control::start_with_token`) and writes `<data_dir>/instance.json` = `{port, token, pid, version}` (`lutra_control::rendezvous`). The token is 32 bytes from the OS generator (`getrandom`), hex. The file is written to a temporary file and renamed, so readers never see half a file; on exit the app removes it if it still holds its own token.
|
||||
- **Directory:** `LUTRA_RENDEZVOUS_DIR` if set, else `rendezvous::default_data_dir()`, which computes Tauri's `app_data_dir()` for the identifier `dev.lutra.desktop` without Tauri (`%APPDATA%\dev.lutra.desktop` on Windows, `~/Library/Application Support/dev.lutra.desktop` on macOS, `$XDG_DATA_HOME` or `~/.local/share` + the identifier elsewhere), so the CLI and the desktop agree without sharing a runtime.
|
||||
- **Directory:** `LUTRA_RENDEZVOUS_DIR` if set, else `rendezvous::default_data_dir()`, which computes Tauri's `app_data_dir()` for the identifier `com.tyrveil.lutra` (`rendezvous::APP_IDENTIFIER`) without Tauri (`%APPDATA%\com.tyrveil.lutra` on Windows, `~/Library/Application Support/com.tyrveil.lutra` on macOS, `$XDG_DATA_HOME` or `~/.local/share` + the identifier elsewhere), so the CLI and the desktop agree without sharing a runtime.
|
||||
- **Security:** only the user may read the token. Unix: the file is created with mode `0600`. Windows: it lives in the user's roaming AppData folder, whose inherited ACL grants the user, `SYSTEM` and Administrators only (checked with `icacls` in the M3.7 live check); Lutra sets no ACL of its own. Both listeners bind `127.0.0.1` only. On the token listener the first request must be `app.auth {token}` within 10 s (`AUTH_TIMEOUT`); a wrong token, another method or garbage gets `unauthorized` and the connection is closed. Tokens are compared in constant time. The `--control PORT` listener stays open (no token) for development and agents; it is opt-in and documented as such.
|
||||
- **Second start:** `lutra-desktop [PATH]` without `--control` reads the rendezvous file first. If the listener answers, accepts the token and pings, the start forwards `PATH` (folder → `project.open`, file → `file.open`), calls `app.focus` and exits 0. If the file is missing, unreadable, invalid, or its port refuses or rejects the token, it is stale: this start becomes the instance and replaces the file. Two starts in the same instant can both become instances; the later file wins (accepted, rare).
|
||||
- **Development instances:** a start with `--control PORT` skips the single instance (no forwarding, no rendezvous file) so parallel agents' instances never forward to each other, unless `LUTRA_RENDEZVOUS_DIR` is set, which opts it into the single instance in that directory (used for isolated live checks).
|
||||
|
|
@ -750,13 +750,15 @@ Watched directories: the VFS watcher is non-recursive, so `project.children` wat
|
|||
| Text buffer | `ropey` (MIT) in `crates/text`. | Mature rope with line and UTF-16 helpers. |
|
||||
| Clippy panic lints | `unwrap_used`, `expect_used`, `panic`, `unreachable`, `todo`, `unimplemented`, `indexing_slicing`, `string_slice` are denied workspace-wide; `clippy.toml` allows them in `#[test]`/`#[cfg(test)]`; integration tests in `tests/` and `testkit` allow them at crate level. `missing_docs` is denied too, to back the doc-comment code style. `unsafe_code` is denied; a crate that needs it allows it locally with a doc comment saying why. | AGENTS.md › Never crash. |
|
||||
| Desktop dev mode | Plain `cargo build`/`cargo run -p lutra-desktop` is a Tauri dev build that loads the Vite dev server. `cargo xtask dev [-- ARGS]` starts both. A self-contained build embeds `ui/dist` through the `bundled-ui` feature. | Keeps `cargo build --workspace` independent of the frontend build. |
|
||||
| App identifier | `dev.lutra.desktop` is a placeholder. The final reverse-DNS identifier depends on the project's domain and hosting, which are the owner's decision (execution plan §4); bundling stays off until then. | Tauri requires an identifier to build. |
|
||||
| App identifier | `com.tyrveil.lutra` (owner, D26, 2026-10-31), in `tauri.conf.json` and `rendezvous::APP_IDENTIFIER` (a test keeps them equal). It replaced the placeholder `dev.lutra.desktop`: the first normal start under the new identifier, when its data directory does not exist and an old directory does, copies `settings.json`, `recovery/` and `tools/` from the old directories into a staging folder next to the new data directory, renames it into place, logs the copy to stderr and shows an info notification (`apps/lutra-desktop/src/migrate.rs`). The old directories stay; the rendezvous file and the webview data are not copied. Isolated starts never migrate. | Tauri derives the data directories from the identifier; without the copy, alpha testers would lose their settings, journal and Phpactor download. Staging plus rename makes a half-done copy retry on the next start instead of counting as done. |
|
||||
| Installers | `bundle.active` with `targets` NSIS and DMG; `cargo xtask bundle` runs `cargo tauri build --bundles nsis\|dmg --features bundled-ui` for the current platform and prints the installer and its size. NSIS: `installMode: currentUser` (no admin, `%LOCALAPPDATA%\Lutra`), English and German following the OS, Start menu shortcut, desktop shortcut as a finish-page option, uninstaller with the opt-in "delete app data" box; header and sidebar BMPs from `assets/installer/`. DMG: 720 × 400 window with the app at (100, 184) and Applications at (326, 184) over `dmg-background.png`; on macOS `xtask bundle` joins the 1x and 2x PNGs into a HiDPI TIFF with `tiffutil` and passes it through `--config`. `build.rs` also writes `icons/512x512.png`, from which the macOS bundler makes the `.icns`. Unsigned (owner, D26). Install, unsigned-start and data-location steps: [`install.md`](install.md). Live check (Windows 11, 2026-10-31, measured): `cargo xtask bundle` 3 min 42 s release build with 4 jobs, setup 4.95 MiB; `/S /D=<test dir>` installed in about 1 s, 18.8 MiB on disk (`lutra-desktop.exe` 18.6 MiB, `uninstall.exe` 0.2 MiB), Start menu and desktop shortcuts and the HKCU uninstall entry present; the installed app started with `--control --data-dir` and showed a project in its screenshot; `uninstall.exe /S` removed the files, both shortcuts and the entry. | Tauri's bundler covers both formats without extra tools on Windows (it fetches NSIS) or macOS (`hdiutil`). A per-user install needs no UAC prompt, which suits an alpha. The installer images are generated by `cargo xtask installer-images` from the banner, so they can be regenerated. |
|
||||
| App icon | `apps/lutra-desktop/build.rs` downscales the owner's master `assets/app-icon/icon.png` (720 px, see ASSETS.md) with an area-averaging box filter into the gitignored `apps/lutra-desktop/icons/`: `icon.png` (256 px window icon) and a multi-size `icon.ico` (16, 32, 48, 64, 128, 256 px, PNG entries). If the master is missing or unreadable, the build prints a cargo warning and uses the placeholder generated in code (rounded otter-brown square with a pale stone). | The icon is the owner's (M1.14); decoding uses the `png` build dependency already present, so no new dependency. The fallback keeps a checkout without the asset buildable and never fails the build over an icon. |
|
||||
|
||||
## Revision history
|
||||
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 2026-10-31 | minor | C7 B1: app identifier `com.tyrveil.lutra` with the one-time copy from `dev.lutra.desktop`, NSIS and DMG installers, `cargo xtask bundle` |
|
||||
| 2026-10-31 | minor | C7 A3: `git.mergeMessage` and the merge message prefill, `git.ignore` and the Changes context menu, gutter markers kept on their line, per-module `COMMAND_IDS` for the command listing test |
|
||||
| 2026-10-30 | minor | M4.7: blame (`git.blame` with `--contents` from the buffer, the annotation gutter by age, hover with the commit message, `vcs.toggleBlame`, `vcs.showCommit`) |
|
||||
| 2026-10-28 | minor | M4.6: history backend (`git.log`, `git.showCommit`, `git.showAt`), the shared hook for new git commands, the Log tab, diffs at a commit |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue