Files
arthur-os/default/quickshell/omarchy-shell/plugins/notifications
Ryan Hughes 020cb537c7 Dedupe notifications by id and persist history to ~/.local/state
Chat apps (Vesktop, etc.) can rapid-fire the same Notify D-Bus call when
they sync, leaving the pending tab with hundreds of byte-identical rows
because the old handler appended unconditionally and never re-entered the
`markSeenByOriginalId` path for follow-up arrivals.

  - addToPending + popup-insert now remove any existing row matching the
    same `originalId` before insertion, honoring the freedesktop
    "replaces_id" semantics that chat apps rely on.
  - loadHistory dedupes by originalId on hydration, so existing on-disk
    files with the old duplicate-laden schema collapse on next start.
  - loadHistory also guards against re-entry: FileView fires onLoaded
    more than once during startup (initial preload + Component.onCompleted
    reload), and the old version would double the model each fire.

While in here, move the persistent notifications.json out of `~/.cache`
to `~/.local/state/omarchy` so a "clear cache" habit no longer drops
DND preference and notification history. The image thumbnail cache stays
in ~/.cache where regeneratable artifacts belong.
2026-05-14 16:31:47 -04:00
..