Skip to content

Conversation

@juliajforesti
Copy link
Contributor

@juliajforesti juliajforesti commented Oct 8, 2025

FDR-211

Proposed changes (including videos or screenshots)

  • remove double @ from reaction's usernames
  • add Reactions to message menu

Issue(s)

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • New Features

    • Reactions action is now available in federated contexts, expanding where users can add/view reactions.
  • Bug Fixes

    • Reaction tooltips display cleaner usernames by removing leading “@” symbols.

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Oct 8, 2025

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Oct 8, 2025

⚠️ No Changeset found

Latest commit: 9dc826f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@juliajforesti juliajforesti added this to the 7.11.0 milestone Oct 8, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 8, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Adds username normalization for reaction tooltips to remove duplicated “@” and extends the Reactions message action visibility to include federated contexts. No public API changes.

Changes

Cohort / File(s) Summary
Reaction tooltip username normalization
apps/meteor/client/components/message/content/reactions/Reaction.tsx
Adds normalizeUsernames(names) to strip leading “@” and passes normalized names to ReactionTooltip instead of raw names.
Reactions action visibility (federated)
apps/meteor/client/components/message/toolbar/useShowMessageReactionsAction.tsx
Adds "federated" to the action’s context list so the Reactions option appears for federated messages.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant UI as Message UI
  participant Tooltip as ReactionTooltip

  User->>UI: Hover reaction
  UI->>UI: normalizeUsernames(names) // strip leading "@"
  UI->>Tooltip: Render tooltip with normalized usernames
  Tooltip-->>User: Show single-@ usernames
Loading
sequenceDiagram
  autonumber
  actor User
  participant UI as Message UI
  participant Actions as Message Actions

  User->>UI: Hover message (federated)
  UI->>Actions: Evaluate visibility contexts
  Actions-->>UI: Include "Reactions" action
  UI-->>User: Display Reactions action
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • ggazzo
  • rodrigok

Poem

A hop, a bop, I tweak the names—no double @ today!
In federated fields I play, reactions on display.
Tooltip whispers, clean and neat,
Usernames trimmed, a tidy treat.
Thump-thump! My paws approve—now every hover’s A-OK. 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The title “regression: fix reactions on federated rooms” is related to the changes but is too generic and does not clearly highlight the core fixes of removing the duplicate “@” in tooltips or restoring the reactions menu option; it lacks specificity on the main user-facing issues addressed. Consider updating the title to explicitly mention fixing the double “@” in reaction tooltips and restoring the “Reactions” action in federated rooms for clearer context.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues Check ✅ Passed The PR adds a normalizeUsernames helper that strips extra “@” prefixes and applies it to ReactionTooltip, which fixes the duplicate “@” issue, and it extends the message menu contexts to include federated rooms so the “Reactions” action is visible as required by FDR-211.
Out of Scope Changes Check ✅ Passed All code modifications are confined to normalizing reaction usernames and enabling the reactions action in federated contexts, matching the linked issue objectives without introducing unrelated features or altering other components.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch regression/federation-reaction

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c865cd0 and 9dc826f.

📒 Files selected for processing (2)
  • apps/meteor/client/components/message/content/reactions/Reaction.tsx (2 hunks)
  • apps/meteor/client/components/message/toolbar/useShowMessageReactionsAction.tsx (1 hunks)
🔇 Additional comments (2)
apps/meteor/client/components/message/toolbar/useShowMessageReactionsAction.tsx (1)

18-18: LGTM! Federated context added correctly.

This addition enables the Reactions action to be visible in federated rooms, directly addressing the PR objective to restore reaction viewing from message actions.

apps/meteor/client/components/message/content/reactions/Reaction.tsx (1)

52-52: Normalization consistency verified No other manual '@' slicing detected; tooltips and lists uniformly use raw usernames or normalizeUsernames.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Oct 8, 2025

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 67.44%. Comparing base (c865cd0) to head (9dc826f).
⚠️ Report is 16 commits behind head on release-7.11.0.

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##           release-7.11.0   #37173      +/-   ##
==================================================
- Coverage           67.45%   67.44%   -0.01%     
==================================================
  Files                3329     3329              
  Lines              113381   113383       +2     
  Branches            20578    20571       -7     
==================================================
  Hits                76476    76476              
- Misses              34305    34314       +9     
+ Partials             2600     2593       -7     
Flag Coverage Δ
e2e 57.34% <0.00%> (+0.05%) ⬆️
unit 71.19% <66.66%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@juliajforesti juliajforesti marked this pull request as ready for review October 9, 2025 17:13
@juliajforesti juliajforesti requested a review from a team as a code owner October 9, 2025 17:13
Copilot AI review requested due to automatic review settings October 9, 2025 17:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request fixes reaction functionality in federated rooms by addressing two key issues: removing double @ symbols from reaction usernames and ensuring the reactions menu is available in federated room contexts.

  • Remove double @ prefix from usernames in reaction tooltips
  • Enable reactions menu in federated room message contexts

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
useShowMessageReactionsAction.tsx Adds 'federated' to the list of contexts where the reactions action is available
Reaction.tsx Introduces username normalization to remove double @ prefixes from reaction usernames

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@@ -9,6 +9,8 @@ import ReactionTooltip from './ReactionTooltip';
import { getEmojiClassNameAndDataTitle } from '../../../../lib/utils/renderEmoji';
import { MessageListContext } from '../../list/MessageListContext';

Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The normalizeUsernames function lacks documentation explaining its purpose and the specific issue it addresses. Consider adding a JSDoc comment explaining why username normalization is needed for federated rooms.

Suggested change
/**
* Normalizes usernames by removing a leading '@' character if present.
* In federated rooms, usernames may be prefixed with '@' to distinguish remote users.
* This function ensures usernames are displayed consistently in the UI without the prefix.
* @param names Array of usernames, possibly prefixed with '@'
* @returns Array of normalized usernames without leading '@'
*/

Copilot uses AI. Check for mistakes.
@ggazzo ggazzo added the stat: QA assured Means it has been tested and approved by a company insider label Oct 9, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Oct 9, 2025
@ggazzo ggazzo merged commit 5f41eef into release-7.11.0 Oct 9, 2025
92 of 95 checks passed
@ggazzo ggazzo deleted the regression/federation-reaction branch October 9, 2025 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants