Skip to content

chore(message-parser): remove orphaned i18next pluralization TODO from Reaction component#39926

Open
thekishandev wants to merge 1 commit intoRocketChat:developfrom
thekishandev:chore/remove-reaction-plural-todo-39925
Open

chore(message-parser): remove orphaned i18next pluralization TODO from Reaction component#39926
thekishandev wants to merge 1 commit intoRocketChat:developfrom
thekishandev:chore/remove-reaction-plural-todo-39925

Conversation

@thekishandev
Copy link
Copy Markdown

@thekishandev thekishandev commented Mar 28, 2026

Proposed changes

Removes an orphaned technical debt marker from the Reaction component.

Root Cause / Problem

Line 15 contained a stale // TODO: replace it with proper usage of i18next plurals comment traversing the ReactionProps type boundary.

```tsx
// BEFORE
const normalizeUsernames = (names: string[]) => names.map(normalizeUsername);

// TODO: replace it with proper usage of i18next plurals
type ReactionProps = {
hasReacted: (name: string) => boolean;
```

Solution / Behavior

Tracing this component reveals that all manual pluralization has already been successfully abstracted away into the globally maintained @rocket.chat/fuselage component <MessageReactionCounter/>. The TODO comment was entirely orphaned dead code. I have safely removed it.

```tsx
// AFTER
const normalizeUsernames = (names: string[]) => names.map(normalizeUsername);

type ReactionProps = {
hasReacted: (name: string) => boolean;
```

Issue(s)

Closes #39925

Validation & Testing

  • Run yarn lint locally (0 errors)
  • No runtime behavior changed (pure dead code/comment removal)

Type of change

  • chore: small task (technical debt removal)

Summary by CodeRabbit

  • Chores
    • Removed internal developer note from reaction component code.

@thekishandev thekishandev requested a review from a team as a code owner March 28, 2026 13:51
Copilot AI review requested due to automatic review settings March 28, 2026 13:51
@dionisio-bot
Copy link
Copy Markdown
Contributor

dionisio-bot bot commented Mar 28, 2026

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 28, 2026

⚠️ No Changeset found

Latest commit: dc238b7

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8dfe195c-8fde-41d0-824c-c32b84e3f205

📥 Commits

Reviewing files that changed from the base of the PR and between 4235cd9 and dc238b7.

📒 Files selected for processing (1)
  • apps/meteor/client/components/message/content/reactions/Reaction.tsx
💤 Files with no reviewable changes (1)
  • apps/meteor/client/components/message/content/reactions/Reaction.tsx

Walkthrough

A stale TODO comment regarding i18next pluralization was removed from the Reaction component. The underlying pluralization logic has already been migrated to the MessageReactionCounter component from the Fuselage library, making the TODO comment obsolete.

Changes

Cohort / File(s) Summary
Comment Cleanup
apps/meteor/client/components/message/content/reactions/Reaction.tsx
Removed orphaned TODO comment about i18next plurals migration; underlying functionality already handled by imported MessageReactionCounter component.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Suggested labels

type: chore

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the single change: removing an orphaned i18next pluralization TODO comment from the Reaction component.
Linked Issues check ✅ Passed The pull request fully satisfies issue #39925 by removing the stale TODO comment from Reaction.tsx as required.
Out of Scope Changes check ✅ Passed The change is narrowly scoped to comment removal only, with no unrelated alterations to code, types, or runtime behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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.

❤️ Share

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

Copy link
Copy Markdown
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 PR removes an orphaned/stale TODO comment from the Reaction component in the Meteor client message reactions UI, aligning the file with the current implementation where pluralization is handled by MessageReactionCounter.

Changes:

  • Removed the outdated // TODO: replace it with proper usage of i18next plurals comment from Reaction.tsx.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(message-parser): remove orphaned i18next pluralization TODO from Reaction component

2 participants