Skip to content

collectNotificationsAfterWake cannot distinguish suppressed records from no data #888

Description

@mubarakcoded

Summary

notification_update_from_message returns Err(AppError::NotificationsDisabled) when the account's local_notifications_enabled is false (crates/marmot-app/src/notifications.rs:1252 at 363b1fe), and the collector discards the record. The wake then surfaces as a plain .noData collection — indistinguishable from a wake where nothing arrived at all.

Why it matters

A Notification Service Extension cannot drop the alert that woke it; it can only choose the content and whether it makes a sound. With today's shape the client cannot answer "was this empty wake caused by records the user explicitly suppressed?":

  • Single-account with notifications disabled: the client can infer suppression (all accounts disabled) and deliver quietly — implemented client-side.
  • Mixed accounts (one disabled, one enabled): a disabled account's wake still arrives as bare .noData, and because an enabled account exists the client must keep the audible generic fallback. The disabled account's preference is violated and no client-side heuristic can fix it.

Ask

Have the wake collection report explicitly-suppressed records — e.g. a suppressed_count (or per-account counts) on BackgroundNotificationCollection, or a distinct status for "records existed but all were suppressed by notification settings". The client can then deliver those wakes quietly regardless of other accounts' settings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions