fix(gui): resolve depot metadata named only by the manifest - #836
Open
4ni1ak wants to merge 1 commit into
Open
Conversation
Greptile SummaryThe PR aligns packaged and runtime asset handling with manifest-selected, variant-specific metadata.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| crates/openlogi-cli/src/cmd/assets/sync.rs | Extends packaging selection to include the known variant-metadata filename families needed for offline rendering. |
| crates/openlogi-desktop/src/services/assets.rs | Adds safe manifest-first metadata resolution while preserving conventional metadata fallbacks. |
| crates/openlogi-desktop/src/services/assets/images.rs | Adds a focused helper for resolving each variant's image_metadata resource. |
| crates/openlogi-desktop/src/services/assets/sync.rs | Fetches manifest-selected metadata and consults all registry model-ID candidates during variant lookup. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
Registry[Asset registry] --> PackageSync[CLI asset sync]
Registry --> RuntimeSync[Desktop runtime sync]
Manifest[Depot manifest] --> PackageSync
Manifest --> RuntimeSync
PackageSync --> Bundle[Packaged asset bundle]
RuntimeSync --> Cache[Verified user cache]
Bundle --> Resolver[Asset resolver]
Cache --> Resolver
Device[Device model and variant] --> Resolver
Resolver --> Metadata[Manifest-selected metadata]
Resolver --> Render[Variant render]
Metadata --> View[Device view]
Render --> View
Reviews (4): Last reviewed commit: "fix(gui): resolve depot metadata named o..." | Re-trigger Greptile
4ni1ak
force-pushed
the
fix/lift-manifest-metadata
branch
from
August 24, 2026 19:17
f354d9e to
591d93f
Compare
4ni1ak
force-pushed
the
fix/lift-manifest-metadata
branch
from
August 25, 2026 05:54
591d93f to
a41dcf5
Compare
`load_files` accepted a depot only when it carried one of the three hardcoded `METADATA_FILES` names. Depots whose variants are handed rather than coloured ship none of them: the Lift keys its hotspot metadata `core_metadata_left.json` / `core_metadata_right.json` and names the right one in the manifest's `image_metadata` resource. The name lookup missed, `resolve` returned `None` for every root, and every Lift and Lift for Business rendered the generic silhouette with a complete bundle on disk. Resolve the metadata filename through the manifest first — same model-id candidates as the image lookup, since a manifest is keyed on whichever pid Logi authored it against — then fall back to the well-known names for bundles without a manifest. Manifest-sourced names now pass through `safe_component_path` like every other asset file. The download side has to follow, or the resolver looks for a file no sync ever fetched: the desktop sync adds `image_metadata` to its manifest-mapped resource pass (and consults every model-id candidate there too), and the CLI bundle treats `core_metadata_*.json` / `metadata_*.json` as optional assets so an offline bundle carries the variant metadata. Fixes AprilNEA#782
4ni1ak
force-pushed
the
fix/lift-manifest-metadata
branch
from
August 25, 2026 15:20
a41dcf5 to
1e41333
Compare
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.
Summary
Fixes device renders never appearing for the Lift, and the variant sync defect
sitting behind it.
Split out of #802 at your request. Per your note the two commits stay together:
the second is what makes the first hold once two variants of one depot are
connected.
Fixes #782
Changes
openlogi-desktop—load_filesimage_metadataresourcebefore the well-known
METADATA_FILESnames. Depots whose variants arehanded rather than coloured ship none of those names — the Lift keys its
metadata
core_metadata_left.json/core_metadata_right.jsonand names theright one in the manifest — so the name lookup missed,
resolvereturnedNonefor every root, and every Lift and Lift for Business rendered thegeneric silhouette with a complete, checksum-verified bundle on disk.
already did: a manifest is keyed on whichever pid Logi authored it against,
which is not always the index primary.
safe_component_pathlike every other asset file.load_fileswas alreadyat the line limit.
openlogi-desktop— syncimage_metadataadded to the manifest-mapped resource pass, or the resolverabove looks for a file no sync ever fetched.
pick_variant_filenamenowconsults every model-id candidate too, for the same reason as above.
(depot, ext)rather than the depot alone.Two devices sharing a depot but differing in
extended_model_id— a colourpair, or the Lift's left- and right-handed variants — collapsed to one target,
so the second never had its
device_image/device_buttons_image/image_metadatafetched and stayed on fallback artwork with no hotspotmetadata, undoing the fix above for that device. The collection step moved into
its own function so the decision is testable without the surrounding HTTP.
(Found by the Greptile review on feat(i18n): add Turkish locale, plus four Linux/asset fixes #802.)
openlogi-cliassets synctreatscore_metadata_*.json/metadata_*.jsonas optionalassets, so an offline bundle carries the variant metadata rather than shipping
a depot the resolver will reject.
Testing
Linux, x86_64, Rust 1.98.0:
All green. New tests:
resolves_depot_whose_metadata_is_only_named_by_the_manifest,two_variants_of_one_depot_are_both_synced,the_same_variant_twice_is_synced_once.The two sync tests were checked against the old dedup key — the first fails on
it — so they pin the defect rather than the implementation.
Not run on this host:
tests (macos),cargo-deny, macOS clippy.Not runtime-tested on hardware. To verify: connect a Lift, let the bundle
download, and confirm the device card shows the render rather than the
silhouette with no
core_metadata.jsoncopy in the depot. For the sync half,connect two Lifts of different handedness (or two colour variants of one model)
and confirm both render.