Repository navigation
Implemented Tauri alike auto updater - #4
Merged
Merged
Conversation
Help ▸ Check for Updates… reads the release's latest.json (else GitHub's Releases API, else <PREFIX>_UPDATE_URL), compares it with this build, shows the notes and what installing will do, downloads the artifact for this platform (resumable, size- and SHA-256-checked, in the activity stack) and installs it: the Windows MSI runs, the macOS disk image is mounted and its app copied over this one, an AppImage replaces itself, and a tarball or zip is laid out for a manual install. One check runs a few seconds after start-up unless it is turned off; a skipped version is not offered again. - lcc-updater (L0, native): SemVer feed parsing, platform asset choice, verified download, staged install. No panics: every failure is a message and leaves the installation alone. - engine: the session's updater state (check, download, install, settings in the app's own updates.json) and the update.* commands. - ui-egui: the dialog, the two Help entries, a start-up check that announces itself with a toast instead of opening a window. - release.yml: the release job publishes latest.json beside the artifacts, built from the checksums it just computed. - lcc-net: a resumed partial file is no longer trusted as complete when a SHA-256 is expected (the hash was never checked). Sources: own design from the documented GitHub Releases API and release asset layout; version precedence follows Semantic Versioning 2.0.0; the flow's shape follows Tauri's updater as a design reference.
Help ▸ Check for Updates… reads the release's latest.json (else GitHub's Releases API, else <PREFIX>_UPDATE_URL), compares it with this build, shows the notes and what installing will do, downloads the artifact for this platform (resumable, size- and SHA-256-checked, in the activity stack) and installs it: the Windows MSI runs, the macOS disk image is mounted and its app copied over this one, an AppImage replaces itself, and a tarball or zip is laid out for a manual install. One check runs a few seconds after start-up unless it is turned off; a skipped version is not offered again. - lcc-updater (L0, native): SemVer feed parsing, platform asset choice, verified download, staged install. No panics: every failure is a message and leaves the installation alone. - engine: the session's updater state (check, download, install, settings in the app's own updates.json) and the update.* commands. - ui-egui: the dialog, the two Help entries, a start-up check that announces itself with a toast instead of opening a window. - release.yml: the release job publishes latest.json beside the artifacts, built from the checksums it just computed. - lcc-net: a resumed partial file is no longer trusted as complete when a SHA-256 is expected (the hash was never checked). Sources: own design from the documented GitHub Releases API and release asset layout; version precedence follows Semantic Versioning 2.0.0; the flow's shape follows Tauri's updater as a design reference.
…ghtcraft-classic into auto-updater # Conflicts: # crates/ui-egui/src/menus.rs # crates/ui-egui/src/panels/dialogs.rs # xtask/src/layers.rs
Auto updater
Resolving the nine `locales/fork/*.json` conflicts took both sides' blocks but dropped the comma between them, so none of the files parsed any more. `build.rs` reads each overlay with `serde_json` while compiling `lcc-ui-egui`, so the crate cannot be built from a clean checkout: "expected `,` or `}` at line 1182 column 3". Each file is now main's catalog plus the branch's updater messages, with main's wording kept where both sides carry a key (the translation that was already there wins), and its line endings and one-entry-per-line shape untouched. `i18n::tests::fork_catalogs_are_valid_json` reads the overlays the same way `build.rs` does and names the file and the parser's complaint, so a merge that mangles one fails in a test that says what happened rather than only in a build script. It fails on the pre-fix files.
# Conflicts: # crates/ui-egui/locales/fork/de-formats.json # crates/ui-egui/locales/fork/de.json # crates/ui-egui/locales/fork/es-formats.json # crates/ui-egui/locales/fork/es.json # crates/ui-egui/locales/fork/fr-formats.json # crates/ui-egui/locales/fork/fr.json # crates/ui-egui/locales/fork/ja-formats.json # crates/ui-egui/locales/fork/ja.json # crates/ui-egui/locales/fork/pt-br-formats.json # crates/ui-egui/locales/fork/pt-br.json # crates/ui-egui/locales/fork/ru-formats.json # crates/ui-egui/locales/fork/ru.json # crates/ui-egui/locales/fork/uk-formats.json # crates/ui-egui/locales/fork/uk.json # crates/ui-egui/locales/fork/zh-hans-formats.json # crates/ui-egui/locales/fork/zh-hans.json # crates/ui-egui/locales/fork/zh-hant-formats.json # crates/ui-egui/locales/fork/zh-hant.json
… by $APPIMAGE, pass the msi path unquoted - set_executable was dead code on Linux (clippy -D warnings failed) - inside an AppImage current_exe is the read-only squashfs binary; replace the file in $APPIMAGE and refuse (with a message) when this copy was not installed as an AppImage - Command already quotes arguments; the extra quoting handed msiexec literal quote characters Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
emmertex
enabled auto-merge
October 12, 2026 22:17
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… broke ア; catalog_characters_are_paintable) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
emmertex
pushed a commit
that referenced
this pull request
Nov 27, 2026
…nd relink scope, one SHA-1 rule Full review of 8c2de9d (pass chromaforge-20261127-20c5); fixes for every Critical-Medium finding but the stale SHA-1 on changed bytes (spec F1), whose PR 0 worsening is fixed here: - Reload records the SHA-1 beside its undo step (apply_system, as the back-fill does): a Reload that finds only the SHA-1 adds no step and keeps the redo history, and an undo keeps the SHA-1 of the bytes on disk. Only the newest reload started records it, so an older read of a file that changed meanwhile can't fix the old bytes' SHA-1 (#1's worsening, #3). - Reload leaves Immich link-only photos out (as the preview-only recheck does): re-reading the server's preview cleared the flag, and the next Reload or back-fill recorded the preview's SHA-1 (#4, #14, #17). - `Sha1To` becomes `convert::Reach`; a relink (`Reach::Target`) reaches only its target, so the old-path family no longer takes the new file's content hash, size, lens or white balance (spec F7) (#5). - `takes_sha1` asks `Photo::in_library()` (deleted photos take none) (#6), and is the rule of every SHA-1 writer: the back-fill's result (queued and counted only when recorded; a refused one is not retried) and the vignetting reference (no SHA-1 for a virtual copy; a malformed one no longer fails the step; queued) (#8, #9). Import and device sync queue through `queue_link_check` too. - The back-fill leaves photos still to be read to read-originals (unless device sync wants them first), so a catalog import's files are no longer read twice (#11). - `remote::is_link_only` is the one link-only test; the inline copies use it (#7). - `is_sha1_hex`'s doc says how it relates to lcc_hash's parser; a parity test pins that every stored value parses there (#10). `Photo::sha1`'s doc states it is kept when the bytes change; a test pins it (#13, #18). - Device sync moves a photo's replica record back to its content key when its SHA-1 is cleared (an undone Relink or Vignetting Calibration), instead of stranding it under the `sha1:` key (#12). - Read Originals (and Reload/relink) fill an empty camera serial and lens range (#16). - Tests for each, including a Demo-source case for the surviving `Source::File` mutant (#2). Manual: none, no manual sentence describes these (whats-new and changelog entries added). Review-Pass: chromaforge-20261127-20c5 Review-Findings-Closed: chromaforge-20261127-20c5#02, chromaforge-20261127-20c5#03, chromaforge-20261127-20c5#04, chromaforge-20261127-20c5#05, chromaforge-20261127-20c5#06, chromaforge-20261127-20c5#07, chromaforge-20261127-20c5#08, chromaforge-20261127-20c5#09, chromaforge-20261127-20c5#10, chromaforge-20261127-20c5#11, chromaforge-20261127-20c5#12, chromaforge-20261127-20c5#13, chromaforge-20261127-20c5#14, chromaforge-20261127-20c5#16, chromaforge-20261127-20c5#17, chromaforge-20261127-20c5#18, chromaforge-20261127-20c5#19, chromaforge-20261127-20c5#27, chromaforge-20261127-20c5#28, chromaforge-20261127-20c5#30, chromaforge-20261127-20c5#35 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
7 of 10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a self-contained updater so builds can update themselves from this repository's releases,
instead of every platform relying on its own package manager (or nothing). Help ▸ Check for
Updates… reads the release feed, shows what is newer and what installing it will do, downloads the
file for your platform, and installs it.
This is fork-owned code, not parity work: the reference app updates through its own service. I've
added a row for it in
docs/parity-checklist.md(MENU-HELP-UPDATES) as an explicit extra.What it does
.msimsiexec /passive /norestartruns the installer, then the app starts again.dmg.appover the running one, relaunches.AppImage.tar.gz,.zipOne check runs a few seconds after start-up (opt-out in the dialog, saved in the app's own
updates.json— one installation per machine, so it is not a catalog preference). It never opens awindow by itself; a found release is announced once with a toast. "Skip This Version" is remembered,
so nobody is asked twice. The dialog also has Check Again, the download's progress with Cancel, and
the two settings.
Where updates come from
<PREFIX>_UPDATE_URL(orupdate.check {feed}, orOptions::manifest_url) — a mirror, a fork, alocal feed for testing;
…/releases/latest/download/latest.json— the static manifest this PR adds to the release job;GET /repos/{owner}/{repo}/releases— GitHub's API, no token needed for a public repository.Both feed shapes parse into one
Release. The manifest is tried first because it is a plain asset onthe release: the check keeps working when the API is rate-limited (a 403 there is reported as such
rather than as a mystery).
The pieces
crates/updater— new L0 crate, native only, registered inxtask/src/layers.rsas["brand", "net", "updater"]:version.rs: SemVer 2.0.0 precedence (v1.2.3,1.2.3-rc.1; a release outranks its ownprereleases; build metadata is ignored). A tag that is not a version (
nightly) is not a releaseof ours.
release.rs/target.rs: asset selection from the artifact names the pipeline already produces(
<binary>-<version>-<os>-<arch>…) — an installer always wins over an archive, the portable zip isdeliberately left for a manual install, and the
SHA256SUMS.txtasset is read for the hash andnever installed.
checksum.rs/download.rs:SHA256SUMS.txtparsing, resumable transfer, size cap, and thesize + SHA-256 check before the file is given its real name. A file that fails is deleted; a
.partthat is already complete is no longer trusted if a hash is expected (see the fix below);an asset name like
../../…is reduced to its last path segment.install.rs:plan()(what will happen, in words, before anything does) andinstall().unwrap/expect/panicoutside tests,#![forbid(unsafe_code)]; every failure is anUpdateErrora dialog can show, and every one of them leaves the running installation alone.README.mdcarries the design and a Sources: line (own design from the documented GitHubReleases API and release asset layout; SemVer 2.0.0 for precedence; Tauri's updater as a design
reference for the shape of the flow only).
crates/engine/src/update.rs(the session's state: check on a worker thread, downloadin the activity stack, install, settings) and
crates/engine/src/cmd/update.rswithupdate.status|check|download|downloadCancel|install|discard|prefs|dismiss. The UI, the CLI, thecontrol channel and MCP all drive it through those ids like anything else.
panels/update.rs(the dialog), the two Help entries(
app.checkForUpdates,app.installUpdate), and the start-up check with its toast.crates/net/src/download.rs— see the fix below..github/workflows/release.yml— the release job buildslatest.jsonfrom the artifacts and theSHA256SUMS it just computed and uploads it beside them. It is built after the draft exists, so the
notes in it are the published ones (the dialog shows them as What's New). Prereleases get a manifest
flagged as such; the app only offers one to someone who ticked "Include prereleases".
The one behavioural fix outside the feature
lcc-net'sClient::downloadhad a hole: when a.partwas already the whole expected size it wasrenamed into place without hashing, so a caller that asked for a SHA-256 could get an unverified file.
done_alreadynow also requiressha256.is_none(), so a transfer with an expected hash always hasheswhat it accepts. Easy to hit with the updater (a release publishes a hash) and wrong for anyone else
who passes one.
Testing
crates/updater: 48 tests — SemVer ordering and refusal, both feed shapes, per-platform assetchoice,
SHA256SUMS.txtparsing, sanitised file names, resume, wrong-hash and truncated files beingthrown away, and every platform's classification. Local HTTP servers only: no internet.
lcc-engine: 23 tests including a hermetic end-to-end path — a local feed servinglatest.json,SHA256SUMS.txtand an installer → check → download → verified staged file → install plan — plus theactivity row and its cancel.
lcc-ui-egui: 12 tests (the dialog from the Help menu, Skip, the settings, a manual install thatmust not quit the app, and a checksum list never being offered for install).
i18n: the new strings are translated in all nine catalogs (overlay), andfork_catalogs_are_valid_jsonnow readslocales/fork/*.jsonthe waybuild.rsdoes and names thefile and the parser's complaint — a merge that mangles one fails a test that says what happened
instead of only a build script.
cargo xtask cilocally: fmt, brand, docs, clippy-D warnings, heif, layers, assets, parity andwasm all pass.
cargo test --workspaceon Windows fails 19 pre-existing path-separator tests inrename/sidecar/tests_filesystem_history(they compare/p\x.jpgwith/p/x.jpg); theyfail the same way on
mainbefore this branch, and this PR does not touch those files.Trying it without a release
Any static file server works as a feed:
{ "version": "9.9.9", "name": "App v9.9.9", "notes": "### Fixed\n- a thing", "pub_date": "2026-10-12T00:00:00Z", "releases": [{ "tag": "v9.9.9", "name": "App v9.9.9", "notes": "### Fixed\n- a thing", "date": "2026-10-12", "prerelease": false, "assets": [ {"name": "app-9.9.9-linux-x86_64.AppImage", "url": "http://127.0.0.1:8791/app.AppImage", "size": 400000}, {"name": "SHA256SUMS.txt", "url": "http://127.0.0.1:8791/sums", "size": 90} ] }] }The last command without
confirmreturns the plan (summary, steps, restart) and installs nothing.The end-to-end test in
lcc-enginedoes exactly this against a listener it starts itself.Decisions worth a second opinion
latest.jsonon this repository's releases is the feed by default. Once this lands and arelease is published, builds of this project update from here. Forks that want their own channel set
<PREFIX>_UPDATE_URLor repointbrand.toml'srepository(which also moves the About window'swebsite/source links) — worth a line in
docs/releasing.md, which I've added.(no "downgrade to the release" nagging).
gh-releases-zsync, soAppImageUpdateremains the block-level path), Flatpak/.deb/.rpmselfupdates, a Windows portable-zip unpack (it needs an archive reader; the file is laid out for the
user instead), and a signature beyond the release's SHA-256 published over TLS.