Refactor unread message tracking and implement channel caching#126
Conversation
|
@codex review |
|
To use Codex here, create a Codex account and connect to github. |
|
@codex review |
|
To use Codex here, create a Codex account and connect to github. |
|
@codex review |
|
To use Codex here, create a Codex account and connect to github. |
|
@codex review |
|
@claude review |
|
@cursor review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ec7ed1224f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| _addMessage(message.senderKeyHex, message); | ||
| _maybeMarkActiveContactRead(message); | ||
| _maybeIncrementContactUnread(message); |
There was a problem hiding this comment.
Skip unread increments for contact reactions
Here _maybeIncrementContactUnread runs for every incoming contact frame, but _addMessage later discards reaction messages (Message.parseReaction returns non-null and returns early without adding a visible message). That means a reaction received while the chat isn’t active will still bump the unread counter, creating a badge with no new message to read. This is a regression from the previous timestamp-based counting, which only counted stored messages. Consider guarding _maybeIncrementContactUnread the same way channel logic does (e.g., only increment when _addMessage actually adds a message, or explicitly skip reactions).
Useful? React with 👍 / 👎.
No description provided.