feat(receipts): group-room 'Seen by' read receipts (LC-489) #488
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/LC-489-group-read-receipts"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
LC-489 - Group-room "Seen by" read receipts
Extends read receipts (previously DM-only) to small group rooms with an avatar-stack "Seen by" bar, reusing the existing
dm_read_statewatermark, theDmReadevent rooms already broadcast on mark-read, and theread_receipts_enabledopt-in.Behavior
A "Seen by [avatars]" bar sits below the message list, showing members who have read up to the room's latest message (Messenger-style bottom-of-thread indicator). It is gated by
room_seen_members_if_applicable:SEEN_BY_MAX_MEMBERS(8). Caps per-event fan-out and avatar-row width. Larger rooms show nothing.read_receipts_enabledto see the bar, and only members who themselves enabled receipts appear in it. The viewer is always excluded.Data + render
db::chat::room_caught_up_member_ids(room, viewer)- members (excluding the viewer) whose watermark has reached the latest non-deleted message.db::auth::read_receipts_enabled_ids(ids)filters to consenting members. Avatars resolve via/avatars/{id}(generated fallback), so only id + label are needed.RoomSeenBarrenders#lc-seen-{room_id};empty:hiddenkeeps it invisible until someone is caught up.get_roompre-renders the bar (after mark-read) into the page. The WS layer refreshes it per-viewer:render_dm_readswaps it when a group-room read advances a watermark (replacing the old DM-only no-op for non-DM rooms), andrender_new_messageappends the recomputed bar so a new message resets it (only the author is caught up to it). The id-keyed OOB swap drops on connections not viewing the room.Tests
db_read_receipts::room_caught_up_member_ids_tracks_latest(latest-watermark tracking, viewer exclusion).just check,just test,just test-saasall green; i18n parity covers the newroom-seen-by(en+es); Tailwind rebuilt. Rebased onto current main (LC-487) - clean.Not operator-visible (no env/config/contract change; reuses the existing per-user opt-in).
🤖 Generated with Claude Code
room_seen_members_if_applicable gates the feature: non-DM rooms with <= 8 members where the viewer has read receipts on (symmetric consent), excluding the viewer, listing only consenting caught-up members. RoomSeenBar renders the avatar stack into #lc-seen-{room_id}. New i18n room-seen-by (en+es). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>