Shipped· Included in a published release
Make channel read state monotonic and durable
- Type
- Bug
- Priority
- High
- Area
- 📞 Communication
- Votes
- 👍 0
What happened?
Trace and correct SakuraCord’s complete per-channel read-state lifecycle: Ready and MESSAGE_ACK input, local canonical state, optimistic acknowledgement, gateway reconciliation, persistence across relaunch, and unread UI projection. Fix channels that fail to clear when fully viewed and Mark as Read state that returns after snapshots, reconnects, navigation, or out-of-order events. Preserve mention counts, unread dividers, notifications, channel ordering, forum/thread semantics, and the single-attempt authenticated acknowledgement contract. Add sanitized lifecycle diagnostics and deterministic offline regressions for rapid switching, messages arriving around an acknowledgement, pagination, stale snapshots, out-of-order events, reconnect, and failure rollback.
Acceptance criteria
- [x] Opening a channel or thread acknowledges exactly the newest message whose read boundary is established, and rapid switching, pagination, and messages arriving during acknowledgement cannot lose or mis-target that update.
- [x] Mark as Read remains read across navigation, stale Ready snapshots, out-of-order MESSAGE_ACK events, reconnects, refreshes, and a later app bootstrap, while an explicit Mark Unread action remains supported.
- [x] Each channel has one canonical last-read boundary; stale ordinary state never moves it backward, optimistic success is reconciled monotonically, and definite mutation failure rolls back only the still-current mutation.
- [x] Mentions, unread badges and separators, native notification counts, forum/thread semantics, channel ordering, and the single-attempt acknowledgement request contract remain covered by deterministic offline regression tests.
- [x] Sanitized lifecycle diagnostics identify acknowledgement scheduling, sending, confirmation, stale input rejection, snapshot reconciliation, and failure rollback without recording message content or credentials.
Activity
- Imported from the previous tracker