From 4ad863d19385c2830439843b186a3b351db0d7ce Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Thu, 12 Nov 2026 01:07:05 +0000 Subject: [PATCH 1/2] craft-heif's Options has a chroma field at this rev: keep the libheif upsampling LightCraft had --- crates/codecs/src/heif.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/codecs/src/heif.rs b/crates/codecs/src/heif.rs index 3e899bcdd7..2d4d5a7a1d 100644 --- a/crates/codecs/src/heif.rs +++ b/crates/codecs/src/heif.rs @@ -57,7 +57,7 @@ pub(crate) fn decode(bytes: &[u8], opts: &DecodeOptions) -> Result { if (info.width as u64).saturating_mul(info.height as u64) > opts.max_pixels { return Err(Error::TooLarge(info.width as u64, info.height as u64)); } - let options = craft_heif::Options { max_pixels: opts.max_pixels, apply_transforms: true }; + let options = craft_heif::Options { max_pixels: opts.max_pixels, apply_transforms: true, ..craft_heif::Options::default() }; // A small decode (a thumbnail or a cataloguing probe) uses the file's own thumbnail image when // it is at least as large as asked: iPhones store one of 320 × 240, and decoding it is a // hundredth of the work of the 12 MP photo. From 5a96dfc2951d3672a2769fdb1aaa202d3803778b Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Wed, 11 Nov 2026 21:30:32 -0500 Subject: [PATCH 2/2] Fix Flatpak updates and bump to 0.21.1 (#4151) * fix(flatpak): allow release checks and self-update helpers * test: keep Flatpak permission parsing within strict Clippy rules * chore: bump version to 0.20.1 for the Flatpak update fix * test: map Flatpak manifests embedded by permission regression * docs: explain the repaired Flatpak update path --- Cargo.lock | 68 +++++++++---------- Cargo.toml | 2 +- crates/ui-egui/tests/flatpak_updates.rs | 27 ++++++++ docs/whats-new.md | 6 ++ .../ai.storyteller.lightcraft.bundle.yml | 2 + .../flatpak/ai.storyteller.lightcraft.yml | 2 + xtask/src/ci_quick.rs | 1 + 7 files changed, 73 insertions(+), 35 deletions(-) create mode 100644 crates/ui-egui/tests/flatpak_updates.rs diff --git a/Cargo.lock b/Cargo.lock index 80932ceff4..91917ef5b1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3597,7 +3597,7 @@ dependencies = [ [[package]] name = "lightcraft" -version = "0.21.0" +version = "0.21.1" dependencies = [ "chrono", "craft-update", @@ -3626,7 +3626,7 @@ dependencies = [ [[package]] name = "lightcraft-catalog" -version = "0.21.0" +version = "0.21.1" dependencies = [ "chrono", "crc32fast", @@ -3647,7 +3647,7 @@ dependencies = [ [[package]] name = "lightcraft-cli" -version = "0.21.0" +version = "0.21.1" dependencies = [ "dhat", "lightcraft-codecs", @@ -3664,7 +3664,7 @@ dependencies = [ [[package]] name = "lightcraft-codecs" -version = "0.21.0" +version = "0.21.1" dependencies = [ "avif-serialize", "bytemuck", @@ -3695,7 +3695,7 @@ dependencies = [ [[package]] name = "lightcraft-color" -version = "0.21.0" +version = "0.21.1" dependencies = [ "lightcraft-geom", "proptest", @@ -3704,7 +3704,7 @@ dependencies = [ [[package]] name = "lightcraft-denoise" -version = "0.21.0" +version = "0.21.1" dependencies = [ "faer-core", "lightcraft-denoise-core", @@ -3721,7 +3721,7 @@ dependencies = [ [[package]] name = "lightcraft-denoise-core" -version = "0.21.0" +version = "0.21.1" dependencies = [ "dhat", "lightcraft-raster", @@ -3737,7 +3737,7 @@ dependencies = [ [[package]] name = "lightcraft-develop" -version = "0.21.0" +version = "0.21.1" dependencies = [ "lightcraft-color", "lightcraft-geom", @@ -3749,7 +3749,7 @@ dependencies = [ [[package]] name = "lightcraft-engine" -version = "0.21.0" +version = "0.21.1" dependencies = [ "ab_glyph", "chrono", @@ -3796,7 +3796,7 @@ dependencies = [ [[package]] name = "lightcraft-faces" -version = "0.21.0" +version = "0.21.1" dependencies = [ "lightcraft-testkit", "matrixmultiply", @@ -3811,7 +3811,7 @@ dependencies = [ [[package]] name = "lightcraft-fetch" -version = "0.21.0" +version = "0.21.1" dependencies = [ "log", "rustls", @@ -3822,14 +3822,14 @@ dependencies = [ [[package]] name = "lightcraft-film" -version = "0.21.0" +version = "0.21.1" dependencies = [ "libm", ] [[package]] name = "lightcraft-geocode" -version = "0.21.0" +version = "0.21.1" dependencies = [ "miniz_oxide 0.9.1", "serde", @@ -3837,7 +3837,7 @@ dependencies = [ [[package]] name = "lightcraft-geom" -version = "0.21.0" +version = "0.21.1" dependencies = [ "proptest", "serde", @@ -3845,7 +3845,7 @@ dependencies = [ [[package]] name = "lightcraft-gpu" -version = "0.21.0" +version = "0.21.1" dependencies = [ "bytemuck", "lightcraft-color", @@ -3865,7 +3865,7 @@ dependencies = [ [[package]] name = "lightcraft-heif" -version = "0.21.0" +version = "0.21.1" dependencies = [ "heic-rs", "rayon", @@ -3873,14 +3873,14 @@ dependencies = [ [[package]] name = "lightcraft-inpaint" -version = "0.21.0" +version = "0.21.1" dependencies = [ "rayon", ] [[package]] name = "lightcraft-lensdb" -version = "0.21.0" +version = "0.21.1" dependencies = [ "lightcraft-develop", "lightcraft-geom", @@ -3889,7 +3889,7 @@ dependencies = [ [[package]] name = "lightcraft-mcp" -version = "0.21.0" +version = "0.21.1" dependencies = [ "lightcraft-codecs", "lightcraft-engine", @@ -3900,7 +3900,7 @@ dependencies = [ [[package]] name = "lightcraft-merge" -version = "0.21.0" +version = "0.21.1" dependencies = [ "lightcraft-codecs", "lightcraft-color", @@ -3916,7 +3916,7 @@ dependencies = [ [[package]] name = "lightcraft-meta" -version = "0.21.0" +version = "0.21.1" dependencies = [ "chrono", "craft-tiff", @@ -3930,7 +3930,7 @@ dependencies = [ [[package]] name = "lightcraft-pipeline" -version = "0.21.0" +version = "0.21.1" dependencies = [ "dhat", "image", @@ -3949,7 +3949,7 @@ dependencies = [ [[package]] name = "lightcraft-preview" -version = "0.21.0" +version = "0.21.1" dependencies = [ "jpeg-encoder", "lightcraft-raster", @@ -3961,7 +3961,7 @@ dependencies = [ [[package]] name = "lightcraft-raster" -version = "0.21.0" +version = "0.21.1" dependencies = [ "libc", "lightcraft-color", @@ -3973,7 +3973,7 @@ dependencies = [ [[package]] name = "lightcraft-raw" -version = "0.21.0" +version = "0.21.1" dependencies = [ "chrono", "craft-crw", @@ -3999,7 +3999,7 @@ dependencies = [ [[package]] name = "lightcraft-scenes" -version = "0.21.0" +version = "0.21.1" dependencies = [ "image", "lightcraft-color", @@ -4010,7 +4010,7 @@ dependencies = [ [[package]] name = "lightcraft-segment" -version = "0.21.0" +version = "0.21.1" dependencies = [ "candle-core", "candle-nn", @@ -4024,7 +4024,7 @@ dependencies = [ [[package]] name = "lightcraft-slideshow" -version = "0.21.0" +version = "0.21.1" dependencies = [ "lightcraft-raster", "serde", @@ -4033,15 +4033,15 @@ dependencies = [ [[package]] name = "lightcraft-sysmem" -version = "0.21.0" +version = "0.21.1" [[package]] name = "lightcraft-testkit" -version = "0.21.0" +version = "0.21.1" [[package]] name = "lightcraft-ui-egui" -version = "0.21.0" +version = "0.21.1" dependencies = [ "craft-ui", "craft-update", @@ -4074,7 +4074,7 @@ dependencies = [ [[package]] name = "lightcraft-web" -version = "0.21.0" +version = "0.21.1" dependencies = [ "crc32fast", "eframe", @@ -4097,7 +4097,7 @@ dependencies = [ [[package]] name = "lightcraft-wincolor" -version = "0.21.0" +version = "0.21.1" dependencies = [ "lightcraft-testkit", "windows-sys 0.61.2", @@ -7916,7 +7916,7 @@ checksum = "e450f9b2ed1dff33c94c12589a87338689467b9c4f5d8a5710bd09a847d2c8a7" [[package]] name = "xtask" -version = "0.21.0" +version = "0.21.1" dependencies = [ "brotli", "flate2", diff --git a/Cargo.toml b/Cargo.toml index ceb80a2ea4..6f52ff48b6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ resolver = "3" members = ["crates/*", "apps/*", "xtask"] [workspace.package] -version = "0.21.0" +version = "0.21.1" edition = "2024" license = "MIT OR Apache-2.0" rust-version = "1.95" diff --git a/crates/ui-egui/tests/flatpak_updates.rs b/crates/ui-egui/tests/flatpak_updates.rs new file mode 100644 index 0000000000..1708ee68c9 --- /dev/null +++ b/crates/ui-egui/tests/flatpak_updates.rs @@ -0,0 +1,27 @@ +//! Release and source Flatpaks must allow release checks and host update helpers. +fn finish_args(manifest: &str) -> Vec<&str> { + manifest + .split("finish-args:") + .nth(1) + .unwrap_or_default() + .lines() + .take_while(|line| line.is_empty() || line.starts_with(' ') || line.starts_with('#')) + .filter_map(|line| line.trim().strip_prefix("- ")) + .map(|arg| arg.trim_matches(['\'', '"'])) + .collect() +} + +#[test] +fn flatpak_update_permissions() { + let manifests = [ + include_str!("../../../packaging/linux/flatpak/ai.storyteller.lightcraft.bundle.yml"), + include_str!("../../../packaging/linux/flatpak/ai.storyteller.lightcraft.yml"), + ]; + let args = manifests.map(finish_args); + assert_eq!(args[0], args[1], "source and release permissions must agree"); + for permissions in args { + for required in ["--share=network", "--talk-name=org.freedesktop.Flatpak"] { + assert!(permissions.contains(&required), "missing update permission: {required}"); + } + } +} diff --git a/docs/whats-new.md b/docs/whats-new.md index 566261ac06..c353441c03 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -2,6 +2,12 @@ ## Unreleased +### Flatpak updates +- Help ▸ Check for Updates can now reach the release service and update standalone Flatpak bundles. + This permissions repair must first arrive through your existing host-side update method. Flatpaks + managed by a software repository continue to use its package manager, and launcher-pinned versions + keep their selected version. + ### Export Effect Presets leaves your originals alone - Export Effect Presets… (`mask.exportEffects`) now refuses a path that is a photo's original or its XMP sidecar, as the other exports do, and writes the file atomically. It used to write the presets over whatever file it was given, diff --git a/packaging/linux/flatpak/ai.storyteller.lightcraft.bundle.yml b/packaging/linux/flatpak/ai.storyteller.lightcraft.bundle.yml index 00edc2f3b6..f2a3cdf11f 100644 --- a/packaging/linux/flatpak/ai.storyteller.lightcraft.bundle.yml +++ b/packaging/linux/flatpak/ai.storyteller.lightcraft.bundle.yml @@ -17,6 +17,8 @@ runtime-version: '25.08' sdk: org.freedesktop.Sdk command: lightcraft finish-args: + # The shared updater inspects and updates this installation via flatpak-spawn --host. + - --talk-name=org.freedesktop.Flatpak - --filesystem=xdg-data/ArtCraft/versions:ro # Display: Wayland first; X11 only when no Wayland compositor is running. - --socket=wayland diff --git a/packaging/linux/flatpak/ai.storyteller.lightcraft.yml b/packaging/linux/flatpak/ai.storyteller.lightcraft.yml index 7b959e3ec7..b6c0cf8efd 100644 --- a/packaging/linux/flatpak/ai.storyteller.lightcraft.yml +++ b/packaging/linux/flatpak/ai.storyteller.lightcraft.yml @@ -23,6 +23,8 @@ sdk-extensions: - org.freedesktop.Sdk.Extension.rust-stable command: lightcraft finish-args: + # The shared updater inspects and updates this installation via flatpak-spawn --host. + - --talk-name=org.freedesktop.Flatpak - --filesystem=xdg-data/ArtCraft/versions:ro # Display: Wayland first; X11 only when no Wayland compositor is running. - --socket=wayland diff --git a/xtask/src/ci_quick.rs b/xtask/src/ci_quick.rs index 2143d09bbb..a9078ce8bf 100644 --- a/xtask/src/ci_quick.rs +++ b/xtask/src/ci_quick.rs @@ -39,6 +39,7 @@ const EMBEDDED: &[(&str, &[&str])] = &[ ("assets/fonts/", &["lightcraft-engine", "lightcraft-ui-egui"]), ("contributors/", &["lightcraft-ui-egui"]), ("docs/whats-new.md", &["lightcraft-ui-egui"]), + ("packaging/linux/flatpak/", &["lightcraft-ui-egui"]), ("docs/raw/coverage-sweep.tsv", &["lightcraft-raw"]), ("docs/raf-corpus.sha256", &["lightcraft-raw"]), ("xtask/src/raw_samples.rs", &["lightcraft-raw"]),