aboutsummaryrefslogtreecommitdiffstats
path: root/docs/superpowers/specs/2026-09-13-mail-arrival-notifications-design.md
AgeCommit message (Collapse)AuthorFilesLines
5 hoursfix(mail-overview): don't re-notify the prior batch, flatten newlinesDanilo M.1-5/+10
The lastmod range is inclusive at both ends and the stored revision was reused as the next start, so the batch just notified matched again. Start one revision later. A subject can contain a newline, which broke the bullet rows and the +N more count; flatten CR/LF to a space before escaping. Also reconciles the state-write comment and spec with the actual skip-and-advance failure behavior, and corrects two doc wordings.
5 hoursdocs(mail-overview): document the arrival notifierDanilo M.1-20/+26
Why a revision counter rather than a count delta or a date watermark, why the state file carries a UUID, and why an unseeded run stays quiet. Also records the final notification presentation: the split heading, the absolute-path icon, and the show_indicators setting that keeps the action indicator off.
6 hoursdocs: design for mail arrival notificationsDanilo M.1-0/+183
One notification per account per arriving batch, from a new mail-notify.sh sibling to waybar-mail.sh. Arrival is detected with notmuch's lastmod revision counter rather than a count delta or a date watermark: a commit is not the same as new mail, since reading and tagging also commit, and date: is the message's own Date header, so backdated mail would never notify and future-dated mail would notify forever. A separate process rather than extending waybar-mail.sh, which already has the arrival edge: waybar owns that process, so a bar restart would stop notifications with nothing reporting it. State carries the database UUID beside the revision, because notmuch revisions are only comparable within one database. Missing, corrupt or mismatched state seeds silently: with no floor, lastmod:0.. matches all 101 unread messages here and startup becomes a wall of popups. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ZwWrCEbdKzmisfg9bb1nS