Text chat 6 follow-up: manual ack ("Mark as unread") must send mention_count #303

Open
opened 2026-11-12 14:06:41 +00:00 by charles · 0 comments
Owner

Raised in review of #300 (Text chat 6, #256).

ApiClient::ack(channel, message, manual) sends {"manual": true} for "Mark as unread". The original client also sends the channel's mention count: sendManualAck(channelId, messageId, mentionCount) (fork fluxer_app/src/features/read_state/state/ReadStates.ts:369-377) posts {channel_id, message_id, mention_count, manual: true} to READ_STATES_ACK, and its legacy fallback (ReadStates.ts:950-971) posts {manual: true, mention_count} to /channels/{id}/messages/{id}/ack. The server defaults a missing count to 0, so marking a message unread currently resets the mention badge.

To do: give the manual ack a mention_count (e.g. ack(channel, message, AckKind::Manual { mention_count }) or a separate manual_ack), with a wiremock test of the body, so Text chat 16 can pass the count it computes. Check whether POST /read-states/ack (the endpoint the original tries first) should be used instead, per the fork's ReadStates.ts:935-948.

The plan text for Task 6 matches what was built; this is a gap in the plan, not a deviation.

Raised in review of #300 (Text chat 6, #256). `ApiClient::ack(channel, message, manual)` sends `{"manual": true}` for "Mark as unread". The original client also sends the channel's mention count: `sendManualAck(channelId, messageId, mentionCount)` (fork `fluxer_app/src/features/read_state/state/ReadStates.ts:369-377`) posts `{channel_id, message_id, mention_count, manual: true}` to `READ_STATES_ACK`, and its legacy fallback (`ReadStates.ts:950-971`) posts `{manual: true, mention_count}` to `/channels/{id}/messages/{id}/ack`. The server defaults a missing count to 0, so marking a message unread currently resets the mention badge. To do: give the manual ack a `mention_count` (e.g. `ack(channel, message, AckKind::Manual { mention_count })` or a separate `manual_ack`), with a wiremock test of the body, so Text chat 16 can pass the count it computes. Check whether `POST /read-states/ack` (the endpoint the original tries first) should be used instead, per the fork's `ReadStates.ts:935-948`. The plan text for Task 6 matches what was built; this is a gap in the plan, not a deviation.
charles added this to the Text chat milestone 2026-11-12 14:06:41 +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#303
No description provided.