Skip to content

fix: robustness - #186

Merged
jotuel merged 12 commits into
mainfrom
fix/robustness
Aug 1, 2026
Merged

fix: robustness#186
jotuel merged 12 commits into
mainfrom
fix/robustness

Conversation

@jotuel

@jotuel jotuel commented Aug 1, 2026

Copy link
Copy Markdown
Member

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.

jotuel added 12 commits August 1, 2026 11:16
- 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
@jotuel
jotuel merged commit 5449761 into main Aug 1, 2026
1 check 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.

1 participant