fix(activity-feed-v2): Map mention contacts via SelectorItem.item - #4783
Conversation
|
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)
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 localized change restores mention contact email display by reading the collaborator email from the nested selector item; 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 |
Reuse mapCollaboratorToUserContact so mention emails come from item.email, matching the approver path and FileCollaborators shape.
20dcf34 to
4a70574
Compare
Merge Queue Status
This pull request spent 25 seconds in the queue, including 4 seconds running CI. Required conditions to merge
|
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