regression: native emoji rendered as corrupted characters in omnichannel PDF transcript - #41552
Conversation
…nel PDF transcript
|
Looks like this PR is ready to merge! 🎉 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📜 Recent review details⏰ Context from checks skipped due to timeout. (6)
🧰 Additional context used📓 Path-based instructions (2)**/*.{ts,tsx,js}📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
Files:
**/*.spec.ts📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
Files:
🧠 Learnings (6)📚 Learning: 2025-12-10T21:00:43.645ZApplied to files:
📚 Learning: 2026-02-24T19:22:48.358ZApplied to files:
📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
📚 Learning: 2026-03-06T18:10:15.268ZApplied to files:
📚 Learning: 2026-05-06T12:21:44.083ZApplied to files:
🔇 Additional comments (2)
WalkthroughEmoji shortname mapping now strips Unicode variation selectors during map construction and lookup. Tests cover standard emoji, variation-selector emoji, skin-tone emoji, and unmapped input fallback behavior. ChangesEmoji shortname normalization
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (3)
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.7.0 #41552 +/- ##
=================================================
- Coverage 68.62% 68.59% -0.03%
=================================================
Files 4138 4138
Lines 159417 159417
Branches 28197 28134 -63
=================================================
- Hits 109392 109354 -38
- Misses 44885 44923 +38
Partials 5140 5140
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
…nel PDF transcript (#41552)
Proposed changes (including videos or screenshots)
When a visitor sends a native emoji (e.g. 👍 from the livechat emoji picker), the generated PDF transcript renders it as corrupted characters such as
=Minstead of a readable shortcode like:+1:.Regression from #39411 (emojione removal):
emojibase-datastores emoji with a variation selector (1F44D FE0F), while@rocket.chat/message-parseremits the bare codepoint (1F44D). The exactMaplookup inunicodeToShortnamemissed, the raw emoji reached react-pdf's Latin font, and its UTF-16 surrogates were truncated to=M. The oldemojione.toShortwas regex-based and tolerant of this.This strips variation selectors from both the map keys and the lookup input, so bare and selector-suffixed emoji resolve to the same shortcode.
https://rocketchat.atlassian.net/browse/CORE-2465
Steps to test or reproduce
:+1:instead of corrupted charactersFurther comments
Added
emoji.spec.tscovering bare, variation-selector-suffixed, and skin-tone emoji plus the non-emoji fallback.Summary by CodeRabbit
Bug Fixes
Tests