Skip to content

Notifications: scheduled & triggered local notifications (calendar / interval / location) #96

@proggeramlug

Description

@proggeramlug

notificationSend always fires with a 0.1s UNTimeIntervalNotificationTrigger (crates/perry-ui-macos/src/notifications.rs:41) — no way to schedule.

Scope

  • New TS surface:
    export function notificationSchedule(opts: {
      id: string;
      title: string;
      body: string;
      trigger: { type: "interval"; seconds: number; repeats?: boolean }
             | { type: "calendar"; date: Date }
             | { type: "location"; latitude: number; longitude: number; radius: number };
    }): void;
    export function notificationCancel(id: string): void;
  • iOS/macOS: UNTimeIntervalNotificationTrigger / UNCalendarNotificationTrigger / UNLocationNotificationTrigger.
  • Android: AlarmManagerNotificationManager for interval/calendar; Geofencing API for location.
  • Windows: toast scheduling via ToastNotifier.AddToSchedule.
  • Linux/Web: best-effort; document limits.

Identifier map lives runtime-side so cancel works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions