~bigbes/sr-ht-spec: 865a21fa

feat(web): digest tracks 'since you last looked' via digest_mark (spec-mfm)

The policy-merged digest showed the last N auto-merges by count; the
design intends "what auto-merged since you last saw it", backed by the
digest_mark table that existed but nothing read. The inbox GET now reads
the mark to flag each digest row that merged after it as new, count them,
and draw a divider before the already-seen rows — staying a pure read.

Advancing the mark is a write, so it is an explicit POST /inbox/seen
behind the owner-only + same-origin guard approve/reject already use, not
a side-effecting GET. service.DigestMark/MarkDigestSeen wrap the store,
mapping "no mark yet" to (zero, false) so the first-ever view reads the
whole digest as new.

Closes spec-mfm

Eugene Blikh <bigbes@gmail.com> — 2026-07-24 16:53:58 UTC

Commit 865a21fa60c6230f79a17ef880767c87729c0435view raw patch

Parent(s): 7cc652d5

8 changed file(s)

FileStatus+
service/review.go M +33
service/review_test.go M +26
web/inbox.go M +84 -16
web/inbox_test.go M +107
web/reader.go M +16
web/router.go M +1
web/templates/inbox.html M +23 -5
web/web_test.go M +15