The app asks the project's Gitea release list about five seconds after startup and every six hours. A stable release beats a newer prerelease, and a release is offered only when its tag is newer than the running build and it carries a .capsule asset for this target. A capsule is a ZIP with capsule.json and a payload. Every payload file carries its size and BLAKE3 digest in the manifest, and staging rejects absolute paths, parent segments, undeclared entries, digest mismatches, and versions that are not newer. The verified payload is stored under the app data directory, so a download survives a restart. The manifest and archive format live in crates/capsule-format, shared by the app's verifier and the release tool. Settings > Advanced shows the state, the notes, and the download and install buttons. The status bar shows an accent chip while an update is waiting. Install copies the app to a temp helper, asks the daemon to stop, and quits. The helper waits for the process, swaps the files with a rollback copy of each old file, removes stale files, and starts the new app. A failed swap puts the old files back and logs the reason. --check-updates runs the release check from a shell. The release tool in tools/capsule builds a capsule from the same files the installer puts down, using packager.toml, so a release does not need an installed copy. docs/updates.md covers the format and the release steps.
40 lines
1.3 KiB
Markdown
40 lines
1.3 KiB
Markdown
# Working in this repository
|
|
|
|
The repository holds two Rust programs: `record-daemon/` (the recorder) and `app/` (the rune
|
|
front end). The release tool under `tools/capsule/` and the capsule format it shares with the
|
|
app under `crates/capsule-format/` are built only for releases.
|
|
|
|
## Before every commit
|
|
|
|
In `app/`, `record-daemon/`, `tools/capsule/`, and `crates/capsule-format/`, all of these must
|
|
pass:
|
|
|
|
```sh
|
|
cargo fmt
|
|
cargo clippy --all-targets -- -D warnings
|
|
cargo test
|
|
```
|
|
|
|
`cargo build` must print no warning for these crates. The vendored crates under `app/vendor/`
|
|
and the rune checkout can print their own; they are silenced at their crate root, so do not add
|
|
allows in our own code to hide a warning that is ours to fix.
|
|
|
|
For UI work, check the screen without a window and look at the PNG:
|
|
|
|
```sh
|
|
cd app
|
|
cargo run -- --snap /tmp/screen.png --scene history
|
|
cargo run -- --snap /tmp/live.png --live --at 40 # real daemon and recordings
|
|
```
|
|
|
|
## Commit messages
|
|
|
|
History uses `<area>: <imperative summary>`, for example `app: open the review screen from a
|
|
card` or `record-daemon: stop writing a log per game`. Lowercase after the colon, no trailing
|
|
period, subject at most 72 characters. The body says why, wrapped at 80 columns.
|
|
|
|
## Rune gaps
|
|
|
|
`docs/rune-upstream.md` lists the faults we work around in rune, with the file to change and how
|
|
to check a fix.
|