Skip to content

Dependencies: take craft-libs main at 23acc70493 - #4127

Merged
skylartaylor merged 13 commits into
storytold:mainfrom
dotCooCoo:chore/craft-update-6e03f65
Nov 18, 2026
Merged

skylartaylor merged 13 commits into
storytold:mainfrom
dotCooCoo:chore/craft-update-6e03f65

Conversation

@dotCooCoo

@dotCooCoo dotCooCoo commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Problem

main pins its craft-libs crates at eighteen different commits, and crates/codecs takes craft-image-codecs under five names (craft-image-codecs, craft-webp-header, craft-bmp-header, craft-image-codecs-sef and craft-avif-encode), each at its own commit. Fixes merged into craft-libs since those commits do not reach LightCraft.

Change

Every craft-libs crate in the workspace moves to craft-libs main at 23acc70493, which contains every commit main pins. Cargo.lock changes only craft-libs entries: their source lines and dependency lists, one craft-image-codecs and one craft-cms instead of several, and the craft-dds crate that craft-image-codecs depends on. packaging/linux/flatpak/cargo-sources.json is regenerated with generate-cargo-sources.py for the new commit. main at b5400289 is merged in; craft-heif keeps main's default-features = false.

Code changes that follow from the single commit:

  • crates/codecs: cargo refuses the same package under two names once both are on one commit, so the four aliases of craft-image-codecs are removed. sniff.rs, webp.rs and jpeg.rs call bmp_probe, webp_probe and jpeg_sef through craft_image_codecs. The native target table enables craft-image-codecs' avif and threads features as an optional dependency of the avif feature, which also enables avif-decode as on main, so a native build without avif, and the wasm32 build, still leave the AV1 encoder out. encode_avif uses shared_image again.
  • crates/ui-egui/src/docking.rs: craft-ui's GroupLocation has two new fields, flyout_width and flyout_offset (ui: resize iconic flyouts from their free edges craft-libs#627). The default dock location sets both to None, as craft-ui does for a new group.
  • crates/ui-egui/src/dialogs/updates_ui.rs: craft-update reads the installed files for an offered release on a thread of its own, and the prompt opens at a later tick (update: inspect a release the app offers on its own thread, not in offer craft-libs#1149). startup_prompt_shows_and_closes checked the prompt one frame after the offer and failed when that thread had not answered yet. The test now waits for the thread's repaint request, ticks once and asserts that the prompt is open, and reads launcher choices from a pins file that does not exist.

Merged craft-libs pull requests that this brings to code LightCraft calls:

How it was checked

CI runs the full gate. On a Linux build host at ba830c2c:

  • cargo fmt --all -- --check passes.
  • cargo check --workspace --tests passes.
  • cargo clippy --workspace --all-targets --locked -- -D warnings and cargo clippy -p lightcraft-codecs --all-targets --locked --features heif -- -D warnings pass.
  • cargo test -p lightcraft-codecs --locked: 4 test binaries, 166 passed, 1 ignored.
  • generate-cargo-sources.py run twice on this Cargo.lock gave byte-identical files.

At df73fdf3 (craft-libs 453b0da782), cargo test -p lightcraft-ui-egui --lib --locked gave 1,936 passed, 4 ignored, and cargo test -p lightcraft-ui-egui --lib updates_ui gave 3 passed at 2f105bdc. craft-update has no changes between 453b0da782 and 23acc70493.

craft-update moves from storytold/craft-libs at 1b34eba41 to 6e03f65bf,
craft-libs main with the update fixes from storytold#763 and storytold#803. Cargo.lock
records the new revision. The other craft-libs pins are unchanged.
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • Resume reviews
  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The workspace Craft dependencies now use a unified revision. AVIF encoding uses craft-image-codecs for standard and HDR paths. Home docking locations now initialize flyout_width and flyout_offset to None.

Changes: AVIF Encoder Integration

Layer / File(s) Summary
Unify Craft dependency revisions
Cargo.toml
Craft dependencies use revision 3af718585c60d8e9bab05c241d7a28282c61f85c. The separate craft-avif-encode dependency is removed.
Wire and implement AVIF encoding
crates/codecs/Cargo.toml, crates/codecs/src/encode.rs
The AVIF feature enables craft-image-codecs with avif and threads. Standard and HDR AVIF encoding use that crate. Standard encoding retains EXIF attachment and float-sample rejection.

Docking Location Initialization

Layer / File(s) Summary
Initialize home flyout fields
crates/ui-egui/src/docking.rs
The home location's GroupLocation initializes flyout_width and flyout_offset to None.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested reviewers: dylanmtaylor, aiongg

Merge Risk: Minimal · up to 1df26

This change updates Craft dependency revisions, routes AVIF encoding through the shared image-codecs crate, and initializes the home flyout fields. No concrete defect was identified, so the change is ready to merge after the normal CI checks pass.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Title check Warning The title "Dependencies: take craft-libs main at 23acc70493" names a dependency bump to craft-libs, which matches the changeset's dependency repin. However, the title cites revision 23acc70493, but th… Update the title so it names the revision the diff actually uses. Confirm the revision in the title matches the one in Cargo.toml (the summary shows 3af718585c60d8e9bab05c241d7a28282c61f85c, while the objectives describe e98299546 for craft…
Passed Passed checks: 3 passed

Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title "Dependencies: take craft-libs main at 23acc70493" names a dependency bump to craft-libs, which matches the changeset's dependency repin. However, the title cites revision 23acc70493, but the raw summary shows the workspace moving to revision 3af718585c60d8e9bab05c241d7a28282c61f85c, and the PR objectives describe a repin of craft-update to e98299546. The revision in the title does not match either revision in the changeset evidence, so the title is misleading about the specific change. The title is also not a complete picture of the change, which includes AVIF encoder migration to craft-image-codecs and a GroupLocation fix in docking.rs.

Resolution

Update the title so it names the revision the diff actually uses. Confirm the revision in the title matches the one in Cargo.toml (the summary shows 3af718585c60d8e9bab05c241d7a28282c61f85c, while the objectives describe e98299546 for craft-update). Consider mentioning the main functional change, such as moving AVIF encoding to craft-image-codecs, if it is the primary point of the PR.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 0572ce2 and 1df26ee.

Files ignored due to path filters: 1

  • Cargo.lock is excluded by !**/*.lock
Files selected for processing: 4

  • Cargo.toml
  • crates/codecs/Cargo.toml
  • crates/codecs/src/encode.rs
  • crates/ui-egui/src/docking.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@FredApps FredApps left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed current head 5a06556. No actionable regression found in this dependency integration. Only craft-update changes source; the egui feature and exact package version are preserved, and the lockfile adds the expected rustix edge without moving other craft-libs packages.

The shared craft-update source review covered eligibility/preflight, release-link binding, exclusive staging and tar bounds, macOS failure handling, and retry/download retention. Verified successful Linux and Windows gates plus Nix evaluation for this head; there are no unresolved review threads. I did not run a new local build or exercise an installed application's self-update, so validation relies on the recorded CI rather than a claimed local runtime pass.

@FredApps FredApps left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This supersedes my earlier approval after tracing the updater call through this application's UI integration.

[P2] Keep the new installation-tree preflight off the UI thread. crates/ui-egui/src/dialogs/updates_ui.rs:104 calls Updater::tick on the UI update path. At the new craft-libs pin, completion calls finish_check → open_offer → StartupPrompt::new → is_self_updating → current_at → can_replace_all → can_replace_share. That newly added preflight recursively performs canonicalize/read_dir/metadata calls through the installed share trees (up to 4096 entries per tree). The entry cap does not bound filesystem latency: a standalone Linux/macOS installation with share directories or links on a slow/stalled mount can freeze the application when a newer release is discovered, before the prompt is drawn.

Please move this eligibility inspection onto the update-check worker and pass the result to prompt construction, then consume that corrected dependency revision here. Add coverage proving delayed eligibility inspection does not block UI ticks. Source: https://github.com/storytold/craft-libs/blob/6e03f65bf45181db77ba6229716e6624db9eb25b/crates/update/src/self_update.rs#L321-L331 and https://github.com/storytold/craft-libs/blob/6e03f65bf45181db77ba6229716e6624db9eb25b/crates/update/src/updater.rs#L462-L467 .

Current CI remains green; this is a source-traced responsiveness defect, not a claimed runtime reproduction. No new local build was run.

@dotCooCoo

Copy link
Copy Markdown
Contributor Author

@FredApps The install check that walks the installed files moves from Updater::tick to the update-check thread in storytold/craft-libs#923. This pull request will be repinned to that revision once it merges.

craft-libs e98299546 includes storytold#923: the check of whether the copy can install itself now runs on the update-check thread instead of in Updater::tick on the UI thread.
@dotCooCoo dotCooCoo changed the title Updates: take craft-update from craft-libs main at 6e03f65bf Updates: take craft-update from craft-libs main at e98299546 Nov 12, 2026
@dotCooCoo

Copy link
Copy Markdown
Contributor Author

@FredApps ecc3a58 repins craft-update to craft-libs main at e98299546, which includes storytold/craft-libs#923 with its test a_stalled_install_inspection_does_not_block_a_frame, and refreshes its Cargo.lock entry; the branch merges cleanly with main.

@skylartaylor skylartaylor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-checked at 0572ce25, at the pin it moves to (e98299546).

The frame no longer walks the installation tree. Whether this copy can install a found release itself is read inside the check thread and travels with the answer (craft-libs crates/update/src/updater.rs:395-409, can_install_itself at :88-92), and the prompt is built from that answer through StartupPrompt::with_self_update (:227-239, dialog.rs:57-68), so a stalled share tree now delays the answer, not a frame. a_stalled_install_inspection_does_not_block_a_frame (updater.rs:1016-1061) holds the inspection open, ticks once with no prompt and the check still running, then asserts the frame inspected the install exactly once. The pinned revision contains craft-libs#923's merge commit 47b6bbad.

LightCraft's own call is unchanged (crates/ui-egui/src/dialogs/updates_ui.rs:104 calls tick), and its only Updater::offer call is in a test (:200), so the calling-thread inspection that remains in offer is not on a frame here. I read this at both revisions rather than building it; gate and gate-Windows are green on this head.

One thing outside this change: the launcher's pins file is still read on the calling thread when a check starts and when it finishes (updater.rs:388-391, and read_choice from finish_check). It is one small file, not the tree walk, so I would not put it in this PR.

Approving.

@skylartaylor
skylartaylor dismissed FredApps’s stale review November 15, 2026 05:11

Dismissing as stale: the install-tree preflight is off the UI frame at the pinned craft-libs e98299546 (this PR's ecc3a582, containing craft-libs#923 47b6bbad): the check thread computes eligibility (crates/update/src/updater.rs:395-409) and the prompt takes that answer (:227-239), with a_stalled_install_inspection_does_not_block_a_frame (:1016-1061) as the coverage he asked for.

Every craft-libs crate in the workspace moves to craft-libs main at
3af2280ee3, so the app builds against one craft-libs commit.

- crates/codecs: the separate craft-avif-encode alias of
  craft-image-codecs is removed. With both on one commit, cargo refuses
  the same package under two names. On native targets the avif feature
  now enables craft-image-codecs' avif and threads features, so a build
  without avif, and the wasm32 build, still leave the AV1 encoder out.
- crates/ui-egui: GroupLocation has two new fields, flyout_width and
  flyout_offset (storytold/craft-libs#627); the default dock location
  sets both to None, as craft-ui does for a new group.
Every craft-libs crate moves from 3af2280ee3 to craft-libs main at
3af718585c. craft-image-codecs now depends on the new craft-dds crate.
@dotCooCoo dotCooCoo changed the title Updates: take craft-update from craft-libs main at e98299546 Dependencies: take craft-libs main at 3af718585c Nov 16, 2026
@dotCooCoo

Copy link
Copy Markdown
Contributor Author

1df26ee5 merges main (aa08a770) and moves every craft-libs crate in the workspace to craft-libs main at 3af718585c, including craft-update (it was at e98299546). The AVIF encoder alias of craft-image-codecs is removed and GroupLocation's two new fields are set; the body lists the changes and the checks.

cargo-sources.json now lists the craft-libs git sources that Cargo.lock locks: one
commit, 3af718585c, for every craft-libs crate, and the new craft-dds crate. It
was generated with ./packaging/linux/flatpak/generate-cargo-sources.py.
@dotCooCoo

Copy link
Copy Markdown
Contributor Author

45582d1a regenerates packaging/linux/flatpak/cargo-sources.json with ./packaging/linux/flatpak/generate-cargo-sources.py, so the Flatpak sources list the craft-libs commit that Cargo.lock now locks (3af718585c) and the new craft-dds crate. Run on main's Cargo.lock, the generator reproduces main's cargo-sources.json byte for byte, and two runs on this branch gave identical files. The branch still merges cleanly with main (aa08a770).

Correction to my earlier comment: 1df26ee5 does not merge main. 3fa10785 merges main (aa08a770), and 8e008317 and 1df26ee5 move the craft-libs crates.

The test line in the body now gives the 26 failures of the full run in its count.

@skylartaylor skylartaylor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

App-side integration looks good at 45582d1a (craft-libs 3af718585c).

The installation-tree inspection still runs on the update-check worker; updater.rs is unchanged from the previously reviewed pin. The AVIF alias cleanup uses the same shared encoder implementation, including its threading feature and EXIF/HDR handling. The two new docking fields use the shared crate’s automatic defaults.

The regenerated Flatpak inventory now names the locked craft-libs revision and craft-dds. I checked the resulting inventory; the generator’s repeatability is from your report, not a run of mine.

The named Linux and Windows gates passed for this PR revision, and there are no unresolved review threads. I did not run a new local build or exercise an installed self-update or Flatpak build.

Every craft-libs crate moves from 3af718585c to craft-libs main at
453b0da782. Cargo.lock changes only the craft-libs source lines, and
packaging/linux/flatpak/cargo-sources.json is regenerated with
generate-cargo-sources.py for the new commit.

craft-update now reads the installed files for a release the app offers
on a thread of its own, and the prompt opens at a later tick
(storytold/craft-libs#1149). startup_prompt_shows_and_closes offered a
release and checked the prompt after one frame, so it failed when that
thread had not answered yet. The test now waits for the thread's repaint
request and ticks until the prompt opens.
@dotCooCoo dotCooCoo changed the title Dependencies: take craft-libs main at 3af718585c Dependencies: take craft-libs main at 453b0da782 Nov 17, 2026
@dotCooCoo

Copy link
Copy Markdown
Contributor Author

Pushed two commits:

  • 0140d72a merges main at 7bb9165c. In Cargo.toml, craft-heif keeps this branch's commit and main's default-features = false. Cargo.lock and cargo-sources.json needed no change for the merge.
  • df73fdf3 moves every craft-libs crate to craft-libs main at 453b0da782, regenerates packaging/linux/flatpak/cargo-sources.json, and makes startup_prompt_shows_and_closes wait for the updater's thread to answer an offer (update: inspect a release the app offers on its own thread, not in offer craft-libs#1149) before it checks the prompt.

The branch merges cleanly with main at 7bb9165c. The title and body now describe the move to 453b0da782 and the checks run on df73fdf3.

The offer's thread sends its answer before it asks for a repaint, so the
tick after that repaint reads the answer. The helper now ticks once after
the repaint and asserts that the prompt is open, instead of waiting for
another repaint that never comes when the answer opens no prompt.

The test also gives its updater a pins file that does not exist, so a
launcher choice on the machine running the tests does not stop the offer.
@dotCooCoo

Copy link
Copy Markdown
Contributor Author

Pushed 2f105bdc, a change to startup_prompt_shows_and_closes only. The offer's thread in craft-update sends its answer before it asks for a repaint, so the test now ticks once after that repaint and asserts that the prompt is open. Before, it waited for another repaint, which never comes when an answered offer opens no prompt, so the test would stop until the job timed out instead of failing. The test's updater also reads launcher choices from a pins file that does not exist, so a launcher choice on the machine running the tests does not stop the offer.

cargo fmt --all -- --check, cargo clippy -p lightcraft-ui-egui --all-targets -- -D warnings and cargo test -p lightcraft-ui-egui --lib updates_ui (3 passed) pass on a Linux host. The branch still merges cleanly with main at 7bb9165c. The body now says main pins craft-libs at fifteen commits (#4315 moved craft-heif to its own commit).

@dotCooCoo

Copy link
Copy Markdown
Contributor Author

@coderabbitai The title check reads an older summary. At 2f105bdc, every craft-libs dependency in Cargo.toml is at 453b0da782ccef39be9a6dac8d27c80b553ef1cc (21 entries). The other rev lines are the storytold egui and winit forks, which this pull request does not move. df73fdf3 made that change, so the title is correct as it stands.

@coderabbitai

coderabbitai Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

Analysis chain

Script executed:

#!/bin/bash
set -u
echo "=== Pull request title and revisions ==="
gh pr view 4127 --repo storytold/lightcraft --json title,headRefOid,baseRefOid,url
echo "=== Checked out revision ==="
git rev-parse HEAD
echo "=== Cargo.toml ==="
cat -n Cargo.toml
echo "=== Parsed workspace Git dependencies ==="
python3 - <<'PY'
import collections
import tomllib

with open("Cargo.toml", "rb") as f:
    data = tomllib.load(f)
deps = data.get("workspace", {}).get("dependencies", {})
git_deps = [(name, value) for name, value in deps.items()
            if isinstance(value, dict) and "git" in value]
craft = [(name, value) for name, value in git_deps
         if value["git"].rstrip("/").removesuffix(".git").endswith("/craft-libs")]
print("craft-libs count:", len(craft))
print("craft-libs revisions:", dict(collections.Counter(value.get("rev", "<none>") for _, value in craft)))
for name, value in craft:
    print(name, value["git"], value.get("rev", "<none>"))
print("Other workspace Git dependencies:")
for name, value in git_deps:
    if (name, value) not in craft:
        print(name, value["git"], value.get("rev", "<none>"))
PY
echo "=== All revision lines ==="
rg -n -C1 '\brev\s*=' Cargo.toml

Length of output: 20910


@dotCooCoo You’re right. I checked PR head 2f105bdc: all 21 craft-libs workspace dependencies in Cargo.toml use revision 453b0da782ccef39be9a6dac8d27c80b553ef1cc. The other revision lines are for the egui and winit forks.

The title matches the change. The saved title warning used an older summary, so I withdraw the recommendation to change the title. I have not rerun the check.

You are interacting with an AI system.

@dotCooCoo

Copy link
Copy Markdown
Contributor Author

b1056349 merges main at 27b755a9. main's new craft-cms-profile alias of craft-cms (#4339) moves to 453b0da782 with the other craft-libs crates; that commit contains eeb134de, so Cargo.lock keeps a single craft-cms and cargo-sources.json needed no change. craft-raw stays at 453b0da782 for the DCP change in #4332. cargo fmt --all -- --check and cargo check --workspace --tests pass on the merged tree, and the branch merges cleanly with main.

Every craft-libs crate moves to craft-libs main at 23acc70493, which
contains each commit main pins. main's separate copies of
craft-image-codecs (craft-webp-header, craft-bmp-header,
craft-image-codecs-sef and craft-avif-encode) become the one
craft-image-codecs dependency, and the codecs `avif` feature enables its
`avif-decode` feature as main does. Cargo.lock and
packaging/linux/flatpak/cargo-sources.json are regenerated.
@dotCooCoo dotCooCoo changed the title Dependencies: take craft-libs main at 453b0da782 Dependencies: take craft-libs main at 23acc70493 Nov 18, 2026
@dotCooCoo

Copy link
Copy Markdown
Contributor Author

ba830c2c merges main at b5400289 and moves every craft-libs crate to craft-libs main at 23acc70493, which contains each commit main pins. main's extra names for craft-image-codecs (craft-webp-header, craft-bmp-header, craft-image-codecs-sef and craft-avif-encode) are folded into the one craft-image-codecs dependency, and sniff.rs, webp.rs and jpeg.rs call it by that name. Cargo.lock and cargo-sources.json are regenerated; two generator runs gave identical files. fmt, cargo check --workspace --tests, workspace clippy and lightcraft-codecs' tests (166 passed) pass on a Linux host. The title and body now describe the move to 23acc70493.

@skylartaylor
skylartaylor merged commit 7db608d into storytold:main Nov 18, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants