Phase 8/9: optimistic reaction set fallback and pending cleanup#1237
Merged
Phase 8/9: optimistic reaction set fallback and pending cleanup#1237
Conversation
…fective reaction management. Added support for optional properties in reaction updates, improved filtering of duplicate reactions, and implemented methods for purging and removing reactions based on transaction IDs. Updated existing functions to utilize these enhancements, ensuring accurate representation of user interactions and improved UI synchronization after reaction state changes.
… count management. Updated logic to accurately adjust unread reaction notifications based on effective reactions, enhancing user experience in active chats.
… to accurately adjust unread counts for incoming messages. Improved handling of unread notifications based on message deletion context, ensuring a better user experience in chat interactions.
…MessageActivity` function to streamline retrieval of the most recent non-deleted message for chat list display. Updated related logic in `ChatsScreen` to enhance clarity and maintainability, ensuring accurate representation of chat activity.
…ondition to play a sound when the sender is the current user and the chat is inactive or the document is hidden. This improves user engagement by providing audio feedback for reactions in non-active chat contexts.
…st activity if no recent activity is found. This change ensures that chats with no recent messages are still displayed, improving user visibility of all contacts.
… amounts from unread count calculations. This adjustment enhances the accuracy of unread message detection in chat interactions.
…ticReactionSet` function. This function manages outgoing reactions while preserving previous reactions as fallback, ensuring accurate updates and preventing duplicates. Updated related logic in `applyIncomingReaction` to streamline reaction processing and enhance user experience in chat interactions.
…y and accuracy. Added comments to clarify unread message checks and streamlined logic for determining unread messages in inactive chats, enhancing user experience in chat interactions.
…. Renamed variables for better readability and updated return types in `applyOptimisticReactionSet` to enhance the accuracy of reaction state updates. Streamlined duplicate reaction checks across multiple functions, ensuring efficient processing of contact reactions.
This was
linked to
issues
Apr 10, 2026
…ions. Introduced overrides for network queries and transaction injections to facilitate testing. Enhanced feedback for failed reactions and timeouts by displaying appropriate toast notifications, ensuring better user awareness of reaction states.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This implements phase 8 reaction
setbehavior and the remaining phase 9 pending-result cleanup on top of the existing chat reaction flow.The branch adds optimistic local handling for reaction
setwhile keeping the previous reaction as hidden fallback until the pending transaction resolves. It also updates reaction rendering and chat-list preview logic so only the newest effective reaction persender + targetTxidis shown, and completes pending success/failure/timeout reconciliation for those optimistic reactions.What changed
reactionTxIdtracking on reaction entriessethandling with fallback preservationsetsuccess, failure, and timeout by txidremovenon-optimistic in phase 8/9Why
Phase 8 needs optimistic
setbehavior with rollback, butcontact.reactionsis also used by chat previews and reaction chips. The branch preserves the previous reaction only as temporary fallback state and makes the UI treat the newest entry for eachsender + targetTxidas the effective reaction. It also closes the follow-up pending-result work that phase 9 was left to cover.Validation
node --check app.jsmainNotes
removenon-optimistic