Skip to content

Refactor unread message tracking and implement channel caching#126

Merged
zjs81 merged 2 commits into
mainfrom
refactor-unread-tracking
Feb 5, 2026
Merged

Refactor unread message tracking and implement channel caching#126
zjs81 merged 2 commits into
mainfrom
refactor-unread-tracking

Conversation

@zjs81

@zjs81 zjs81 commented Feb 5, 2026

Copy link
Copy Markdown
Owner

No description provided.

@zjs81

zjs81 commented Feb 5, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@zjs81

zjs81 commented Feb 5, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@zjs81

zjs81 commented Feb 5, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@zjs81

zjs81 commented Feb 5, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@zjs81

zjs81 commented Feb 5, 2026

Copy link
Copy Markdown
Owner Author

@claude review

@zjs81

zjs81 commented Feb 5, 2026

Copy link
Copy Markdown
Owner Author

@cursor review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines 2168 to +2169
_addMessage(message.senderKeyHex, message);
_maybeMarkActiveContactRead(message);
_maybeIncrementContactUnread(message);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eh its fine

@zjs81 zjs81 merged commit c320378 into main Feb 5, 2026
6 checks passed
@zjs81 zjs81 deleted the refactor-unread-tracking branch February 5, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant