fix(gui): embed the Sleep action's moon glyph - #790
Open
AalmanSadath wants to merge 1 commit into
Open
Conversation
`action_icon_path` has mapped `Action::Sleep` to `action-icons/moon.svg` since the F-row remapper landed the file and the arm together, but the glyph was never added to `ACTION_ICONS`. The asset source answers with `Ok(None)` for an unlisted path, so the Sleep row rendered an empty slot with no error anywhere to catch it. It was the only referenced-but-unembedded path in the tree, and nothing was embedded-but-orphaned. Guard both directions so this cannot recur: - `every_bundled_glyph_is_embedded` walks `action-icons/` and asserts each file resolves, catching a glyph added to the directory but not the table (this bug). It lives in openlogi-ui, so it runs in the Linux test lane too. - `every_reachable_action_icon_is_embedded` asserts every path the picker can return is embedded, catching an arm that names a glyph nobody shipped. The catalog omits `ShowActionsRing` and the parameterised variants — which hold the only references to the keyboard and terminal glyphs — so those are covered explicitly and all 51 `Action` variants are reached. Verified by deleting the table entry and watching the first test fail on `moon.svg`, then in the running GUI on an MX Master 3S over Bluetooth-direct. Fixes AprilNEA#770.
Greptile SummaryThe PR embeds the previously omitted moon glyph so the Sleep action renders its icon, and adds regression coverage in both directions.
Confidence Score: 5/5The PR appears safe to merge, with the missing Sleep icon correctly embedded and guarded by focused regression tests. The changed asset table now resolves the existing moon path, while the new tests cover both bundled-file registration and action-to-asset references without introducing a concrete runtime or build failure.
|
| Filename | Overview |
|---|---|
| crates/openlogi-desktop/src/features/mouse/picker.rs | Adds comprehensive coverage asserting catalogued and explicitly uncatalogued action variants resolve to embedded icons; no actionable defect found. |
| crates/openlogi-ui/src/action_icons.rs | Embeds the missing moon SVG and adds a source-tree completeness test for bundled glyphs; no actionable defect found. |
Reviews (1): Last reviewed commit: "fix(gui): embed the Sleep action's moon ..." | Re-trigger Greptile
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
The "Sleep" action rendered with a blank icon in the button picker.
action_icon_pathhas mappedAction::Sleeptoaction-icons/moon.svgsince #395 landed the file and the arm together, but the glyph was never added toACTION_ICONS.ActionIcons::loadanswersOk(None)for an unlisted path, so the row drew an empty slot — there is no error path for this, at runtime or at compile time.moon.svgwas the only referenced-but-unembedded path in the tree, and nothing is embedded-but-orphaned, so this is the whole of the bug.Changes
openlogi-uimoon.svginACTION_ICONS, positioned aftermonitor.svg.every_bundled_glyph_is_embedded: walksaction-icons/and asserts each.svgresolves through the asset source. Catches a glyph added to the directory but left out of the table — this bug's exact shape. Lives here rather than in the GUI crate so it also runs in the Linux test lane.openlogi-desktopevery_reachable_action_icon_is_embedded: asserts every pathaction_icon_pathcan return is embedded, guarding the opposite direction — an arm naming a glyph nobody shipped.Action::catalog()omitsShowActionsRing(not_pickable, but still drawn wherever it is already bound) and the parameterised variants, which hold the only references tokeyboard.svgandterminal.svg; those are listed explicitly so all 51Actionvariants are reached.Testing
Local gate, green on the final tree:
cargo xtask cireports 8 passed, 0 failed, 1 skipped.tests (macos)did not run — this is a Linux host, so that job is unverified here; CI covers it.The rustdoc job excludes both crates touched here, so I ran rustdoc on them directly as well:
openlogi-uiis clean;openlogi-desktopreports 12 unresolved intra-doc links that are all pre-existing on master and unrelated to this change.The guard is proven rather than assumed — deleting the table entry fails the new test on the real path:
Runtime-tested on hardware: MX Master 3S over Bluetooth-direct on Fedora 44 (Wayland, GNOME). The moon glyph renders on the Sleep row and matches its neighbours in the System section.
Fixes #770.
Before fix:

After fix:
