regression: read receipts not working for livechat visitors#40323
regression: read receipts not working for livechat visitors#40323abhinavkrin wants to merge 1 commit intorelease-8.4.0from
Conversation
Signed-off-by: Abhinav Kumar <abhinav@avitechlab.com>
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📜 Recent review details🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx,js}📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
Files:
🧠 Learnings (19)📓 Common learnings📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
📚 Learning: 2026-03-11T16:46:55.955ZApplied to files:
📚 Learning: 2026-03-31T23:29:12.037ZApplied to files:
📚 Learning: 2026-03-16T11:57:17.987ZApplied to files:
📚 Learning: 2026-04-18T12:32:53.425ZApplied to files:
📚 Learning: 2026-03-11T22:04:20.529ZApplied to files:
📚 Learning: 2026-03-09T18:39:21.178ZApplied to files:
📚 Learning: 2026-04-17T17:38:15.994ZApplied to files:
📚 Learning: 2026-01-17T01:51:47.764ZApplied to files:
📚 Learning: 2025-10-28T16:53:42.761ZApplied to files:
📚 Learning: 2026-02-25T20:10:16.987ZApplied to files:
📚 Learning: 2025-09-25T09:59:26.461ZApplied to files:
📚 Learning: 2025-09-25T09:59:26.461ZApplied to files:
📚 Learning: 2025-11-27T17:56:26.050ZApplied to files:
📚 Learning: 2026-03-10T08:13:52.153ZApplied to files:
📚 Learning: 2026-03-12T10:26:26.697ZApplied to files:
📚 Learning: 2025-09-25T09:59:26.461ZApplied to files:
🔇 Additional comments (7)
WalkthroughThe read-receipt system is refactored to explicitly track livechat visitor status by passing room context through storage and retrieval flows. Receipt records now conditionally mark visitors, and enrichment logic separately loads visitor and user records before merging results. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release-8.4.0 #40323 +/- ##
==============================================
Coverage 69.97% 69.97%
==============================================
Files 3298 3298
Lines 120067 120067
Branches 21541 21508 -33
==============================================
+ Hits 84011 84017 +6
+ Misses 32772 32770 -2
+ Partials 3284 3280 -4
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
closed as #40318 fixed it. |
Proposed changes (including videos or screenshots)
Fix livechat read receipts to correctly display visitor names by introducing an isVisitor flag, ensuring unambiguous identity resolution for both users and visitors.
In my PR #40318, if a user ID wasn’t found in the Users collection, we fell back to LivechatVisitors, which caused ambiguity and potential bugs. The isVisitor flag removes this ambiguity by explicitly marking visitor receipts, making the logic clear and robust.
Additionally, when a livechat user sends a message from the widget, their read receipt is stored automatically (since the sender is marked as having read the message). However, when an agent sends a message from Rocket.Chat, the livechat widget does not send any read event, so the visitor’s read receipt isn’t stored. By introducing isVisitor, the data will be ready to support explicit read events from livechat users in the future if we implement it.
Issue(s)
Steps to test or reproduce
Further comments
CORE-2128
Summary by CodeRabbit