A mention that arrives while the client runs never badges its channel #644

Closed
opened 2026-11-15 13:02:45 +00:00 by charles · 0 comments
Owner

Found by Daily use 41 (#533) on dailyuse 978a6a97: the acceptance step "a mention still badges" (spec §2 item 4) fails.

fluxer-core/src/read_state.rs changes mention_count only from READY, MESSAGE_ACK, READ_STATE_UPDATE, acks and "Mark as unread". A MESSAGE_CREATE from someone else that mentions the user leaves it as it is, so a new @mention (muted channel or not) shows no red badge until the next READY. The original counts it locally: ReadStates.ts:566-576 (recordUnread: if (state.shouldMentionFor(message, me)) setMentionCount(state, mentionCount + 1)).

Steps (devserver dailyuse): log in, open the DM list, let ada post <@me> hi in #general: read_state::mention_count(#general) stays at its READY value.

Fix (Daily use 41): on a MESSAGE_CREATE newer than the read marker for which notif_settings::mentions_me holds, the channel's mention count goes up by one; a channel being read acks it back to 0 right after, as before. Test: fluxer-core/tests/mute_consumers.rs::live_mention_badges_muted_channel.

Found by Daily use 41 (#533) on dailyuse 978a6a97: the acceptance step "a mention still badges" (spec §2 item 4) fails. `fluxer-core/src/read_state.rs` changes `mention_count` only from `READY`, `MESSAGE_ACK`, `READ_STATE_UPDATE`, acks and "Mark as unread". A `MESSAGE_CREATE` from someone else that mentions the user leaves it as it is, so a new @mention (muted channel or not) shows no red badge until the next `READY`. The original counts it locally: `ReadStates.ts:566-576` (`recordUnread`: `if (state.shouldMentionFor(message, me)) setMentionCount(state, mentionCount + 1)`). Steps (devserver `dailyuse`): log in, open the DM list, let ada post `<@me> hi` in #general: `read_state::mention_count(#general)` stays at its READY value. Fix (Daily use 41): on a `MESSAGE_CREATE` newer than the read marker for which `notif_settings::mentions_me` holds, the channel's mention count goes up by one; a channel being read acks it back to 0 right after, as before. Test: `fluxer-core/tests/mute_consumers.rs::live_mention_badges_muted_channel`.
charles added this to the Daily use milestone 2026-11-15 13:02:45 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#644
No description provided.