fix: missing edited indicator for thread parent message#40063
fix: missing edited indicator for thread parent message#40063abhinavkrin wants to merge 4 commits intodevelopfrom
Conversation
…iants Signed-off-by: Abhinav Kumar <abhinav@avitechlab.com>
Signed-off-by: Abhinav Kumar <abhinav@avitechlab.com>
🦋 Changeset detectedLatest commit: 76bf2a1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 41 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
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 Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
WalkthroughGeneralizes the message API mapper to include optional fields ( Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 @@
## develop #40063 +/- ##
========================================
Coverage 69.83% 69.83%
========================================
Files 3296 3296
Lines 119165 119172 +7
Branches 21467 21542 +75
========================================
+ Hits 83219 83226 +7
- Misses 32654 32656 +2
+ Partials 3292 3290 -2
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Signed-off-by: Abhinav Kumar <abhinav@avitechlab.com>
Proposed changes (including videos or screenshots)
What is changed:
Restored the edited indicator (pencil icon) for the main thread message when viewed inside the thread panel.
Why it is needed:
Previously, the indicator correctly showed in the main channel view but was missing in the thread panel context, leading to inconsistent UI behavior.
High-level technical explanation:
The root cause was a TypeScript typing mismatch. The
mapMessageFromApifunction was originally typed to always return the baseIMessagetype, regardless of the input. This stripped away type recognition for extra fields present in variants likeIEditedMessage(e.g.,editedAt,dlm), causing downstream UI components to miss the necessary flags to render the edited indicator.To resolve this,
mapMessageFromApiwas made generic (<T extends MappableMessage = IMessage>). The function now returns the exact same type as the input, preserving all fields (likeeditedAt) and type safety without requiring unsafe type casts.Issue(s)
Steps to test or reproduce
Further comments
CORE-1964
Summary by CodeRabbit
Bug Fixes
Refactor
Tests