Skip to content

Proactive desktop notification for the deletion guard - #205

Merged
gnacho merged 6 commits into
mainfrom
feat/203-delete-guard-notification
Sep 8, 2026
Merged

Proactive desktop notification for the deletion guard#205
gnacho merged 6 commits into
mainfrom
feat/203-delete-guard-notification

Conversation

@gnacho

@gnacho gnacho commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #203. Ports the proactive desktop-notification flow from PyNextCloud-Sync 0.1.32 to the deletion guard.

When the guard pauses synchronization on a mass local deletion, the app now raises a critical desktop notification (urgency Critical) with a Review Now button that opens the deletion review directly, even when the app runs only in the tray. Previously the state was only reflected in the tray/UI and the user was never proactively notified.

Changes

  • core/notifications.rs: add DesktopNotifier::send_delete_review(summary, body, on_action) — raises a critical notify-rust notification with a "Review Now" action and fires on_action on a worker thread.
  • core/scheduler.rs: add a delete_review_cb hook (set_on_delete_review) fired with the alert on raise and cleared on approve/restore/stop.
  • ui/main_window.rs:
    • install_delete_review_handler: wires the hook per folder, builds the copy, and routes "Review Now" back to the review through an mpsc channel + a main-loop poller (a non-Send window Weak cannot cross the notifier thread).
    • Present the review dialog once the main window is mapped, so it works when the app is only in the tray (window hidden).
  • main.rs: wire the handler after the window is built.
  • i18n: new "Review Now" and "Synchronization was paused before {count} files could be deleted from Nextcloud." strings (ES).

Validation

  • 708 tests passed + 1 ignored (known flaky login_flow), clippy --all-targets -D warnings and cargo fmt clean.
  • End-to-end: a folder with removed files raised the critical notification; "Review Now" opened the deletion review (verified in the tray/UI).
  • Version bumped to 0.2.18 (CHANGELOG, version.json, metainfo, READMEs, landing).

@gnacho
gnacho merged commit 4222883 into main Sep 8, 2026
2 checks passed
@gnacho
gnacho deleted the feat/203-delete-guard-notification branch September 8, 2026 16:28
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.

Proactive desktop notification for the deletion safety guard

1 participant