fix(activity-feed-v2): Map mention contacts via SelectorItem.item - #4783
fix(activity-feed-v2): Map mention contacts via SelectorItem.item#4783jackiejou wants to merge 1 commit into
Conversation
Reuse mapCollaboratorToUserContact so mention emails come from item.email, matching the approver path and FileCollaborators shape.
|
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 (3)
WalkthroughActivityFeedV2 now uses typed mention selector results and the shared ChangesActivityFeedV2 mention integration
Estimated code review effort: 3 (Moderate) | ~20 minutes Mergeability Score: ⚪ Minimal · up to This change restores email display for mention contacts without evidence of a current correctness, security, availability, or deployment risk; no actionable merge-blocking risk remains beyond normal checks and review. Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Summary
Activity Feed V2 mention search maps collaborator results with the shared
mapCollaboratorToUserContacthelper, so contact email is taken fromSelectorItem.item.emailthe same way task approver search already does.getMentionAsyncis typed as returningSelectorItem<UserMini | GroupMini>[], and localUserContactis aligned with@box/user-selector'sUserContactType.This restores email display in the mention typeahead for collaborators returned by
FileCollaborators(which places email on the nesteditem, not on the SelectorItem wrapper).Why
Mention
fetchUserspreviously read top-levelemail/loginon each entry. SelectorItem results do not carry those fields at the top level, so every mention contact got an empty email even whenitem.emailwas populated.Test plan
yarn test src/elements/content-sidebar/activity-feed-v2/__tests__/ActivityFeedV2.test.tsx@in a comment, and confirm collaborator rows show email subtitlesSummary by CodeRabbit