Skip to main content

Module notification

Module notification 

Source
Expand description

Desktop notification system for task completion and failures.

Responsibilities:

  • Expose the notification configuration and runtime API.
  • Coordinate notification delivery, suppression, and optional sound playback.
  • Keep platform-specific display and sound logic isolated in focused submodules.

Does NOT handle:

  • Notification scheduling or queuing (callers trigger explicitly).
  • Persistent notification history or logging.
  • UI mode detection (callers should suppress if desired).
  • Do Not Disturb detection (handled at call site if needed).

Invariants:

  • Sound playback failures do not fail the notification call.
  • Notification failures are logged but do not fail the calling operation.
  • Public call sites continue to use crate::notification::{...} without change.

Structs§

NotificationConfig
Configuration for desktop notifications.
NotificationOverrides
CLI overrides for notification settings. Fields are Option<bool> to distinguish “not set” from explicit false.

Enums§

NotificationType
Types of notifications that can be sent.

Functions§

build_notification_config
Build a runtime NotificationConfig from config and CLI overrides.
notify_loop_complete
Send loop completion notification. Silently logs errors but never fails the calling operation.
notify_task_complete
Send task completion notification. Silently logs errors but never fails the calling operation.
notify_task_complete_with_context
Send task completion notification with UI awareness. Silently logs errors but never fails the calling operation.
notify_task_failed
Send task failure notification. Silently logs errors but never fails the calling operation.
notify_watch_new_task
Send watch mode notification for newly detected tasks. Silently logs errors but never fails the calling operation.
play_completion_sound
Play completion sound using platform-specific mechanisms.
send_notification
Send a notification based on the notification type. Silently logs errors but never fails the calling operation.