From 1a01efb088df07cae3f517e69940392606d00d94 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sun, 13 Sep 2026 18:26:47 +0200 Subject: fix(mail-overview): don't re-notify the prior batch, flatten newlines 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. --- mail-overview/test-mail-notify.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mail-overview/test-mail-notify.sh') diff --git a/mail-overview/test-mail-notify.sh b/mail-overview/test-mail-notify.sh index 9fc21a9..1c3e01a 100755 --- a/mail-overview/test-mail-notify.sh +++ b/mail-overview/test-mail-notify.sh @@ -115,6 +115,10 @@ check "malformed json yields an empty body rather than an error" \ "" \ "$(build_body 'not json at all' 1 2>/dev/null)" +check "a newline in a subject stays on one row" \ + "• Alice Example — line one line two" \ + "$(build_body '[{"authors":"Alice Example","subject":"line one\nline two"}]' 1)" + # A scratch state file, removed at exit. Never the real one: that is the # user's live notification position, and a test must not move it. tmpstate="$(mktemp)" -- cgit v1.2.3