fix: robustness - #186
Merged
Merged
Conversation
- Match AppError::NoEnrolledPrints structurally instead of comparing localized status strings - Change FingerSelected message to carry Finger enum directly instead of a localized String, eliminating reverse-lookup by display name - Add Display impl on Finger so pick_list renders localized names while messages carry the enum variant
Replace .path().unwrap() with match-based error propagation in get_devices_task and task_select_device, preventing panics on invalid object paths from the daemon
on_delete, on_verify_finger, and on_clear_device now return early when busy, matching the existing guard in on_register. Prevents keyboard shortcuts from starting overlapping D-Bus operations
Check as_finger_id() before calling verify_finger_process. Emits a clear OperationError instead of sending an empty string to verify_start when the finger has no valid D-Bus identifier
extern crate is a no-op since Rust 2018; this crate uses edition 2024
Skip key events already captured by a focused widget (e.g. text inputs), preventing shortcuts from firing while typing
Replace the synchronous zbus::blocking::Connection in init with an async task that fetches users from accounts-daemon in the background. The window now appears immediately; the nav bar populates when the UsersLoaded message arrives
This variant was not a finger — it was an action that polluted Finger::all(), forced as_finger_id() to return Option, and required filtering in on_cycle_finger. Removing it lets as_finger_id() return &'static str directly and simplifies all callers
Mutate self.config.app_theme in place and write it directly instead of constructing a temporary Config (clone) and passing it to on_update_config (which cloned it again)
conn_clone/clone_conn → find_conn/devices_conn to convey purpose
The returned Task was dropped with let _ =; if on_cycle_finger ever produces a real task it would vanish silently. Batch it with list_fingers_task
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 guards so that keyboard shorcuts don't work when they shouldn't. Fixes a few panics by removing unwraps. Reduced unnecessary cloning.
Also now uses suggestively styled buttons appropriate for the actions; not just text ones. So that whatever libcosmic deems to be appropriate for those is matched.
Finally removed some lines that were unnecessary in modern Rust.