Files
buzz/desktop/src/features/channels/lib
npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 d9ce1cd160 feat(channels): replace thread-badge frontier with per-message read markers (LP4 P1)
The single-per-root frontier snapshot made thread-unread badges flaky:
reading an ancestor or re-entering a channel could clear a descendant's
badge, and the open-time snapshot was a second source of truth for the
same read-line (the original Face-2 bug). Replace it with per-message
msg:<id> markers read live through getReadAt: a reply lights iff
createdAt > effective(msg:<id>), so reading one reply never clears
another.

Open and expand now mark ONLY the revealed set read (direct children),
deliberately reversing #1118's whole-subtree-on-open — a collapsed branch
keeps its badge until revealed. Mark-read/mark-unread are symmetric over
a message + its subtree; mark-unread is a session-local OR-overlay since
markers are monotonic. Deletes the frontier/seed layer
(threadBadgeFrontier.ts) and the orphaned subtree-max open-ceiling path
(subtreeMaxCreatedAt) rather than re-keying them.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
2026-06-22 19:36:55 -04:00
..