Skip to content

Conversation

@yash-rajpal
Copy link
Member

@yash-rajpal yash-rajpal commented Sep 17, 2025

Proposed changes (including videos or screenshots)

Move quick reactions feature outside feature preview

Issue(s)

Steps to test or reproduce

Further comments

CORE-1348

Summary by CodeRabbit

  • New Features

    • Quick reactions promoted to stable: the first three suggested emoji now always appear on message hover.
  • Chores

    • Bumped major versions for UI, i18n, and platform packages.
    • Removed legacy quick-reactions translation entries across multiple locales.

@changeset-bot
Copy link

changeset-bot bot commented Sep 17, 2025

🦋 Changeset detected

Latest commit: 2fc2e50

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 39 packages
Name Type
@rocket.chat/ui-client Major
@rocket.chat/i18n Major
@rocket.chat/meteor Major
@rocket.chat/gazzodown Major
@rocket.chat/ui-voip Major
@rocket.chat/web-ui-registration Major
@rocket.chat/mock-providers Patch
@rocket.chat/ui-contexts Major
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/fuselage-ui-kit Major
@rocket.chat/livechat Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/ui-avatar Major
@rocket.chat/ui-video-conf Major
@rocket.chat/queue-worker Patch
@rocket.chat/core-typings Major
@rocket.chat/rest-typings Major
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/freeswitch Patch
@rocket.chat/http-router Patch
@rocket.chat/model-typings Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/presence-service Patch
@rocket.chat/license Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/models Patch
@rocket.chat/network-broker Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/instance-status Patch
@rocket.chat/omni-core Patch

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

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Sep 17, 2025

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 17, 2025

Walkthrough

Removes the quickReactions feature-preview surface and related i18n keys, always renders the first three quick reactions in the message toolbar, updates feature-preview types and tests to stop referencing quickReactions, and adds a changeset promoting quick reactions to stable.

Changes

Cohort / File(s) Summary
Release metadata
.changeset/purple-mayflies-approve.md
Adds a changeset bumping @rocket.chat/ui-client, @rocket.chat/i18n, and @rocket.chat/meteor to major with note: "Promotes quick reactions from preview state to stable."
Message toolbar quick reactions
apps/meteor/client/components/message/toolbar/items/actions/ReactionMessageAction.tsx
Removes the quickReactions feature-preview gate and always renders the first three quick reactions (quickReactions.slice(0, 3)).
i18n removals
packages/i18n/src/locales/en.i18n.json, packages/i18n/src/locales/hi-IN.i18n.json, packages/i18n/src/locales/nb.i18n.json, packages/i18n/src/locales/nn.i18n.json, packages/i18n/src/locales/pt-BR.i18n.json, packages/i18n/src/locales/sv.i18n.json
Deletes Quick_reactions and Quick_reactions_description translation keys from multiple locale files.
Feature preview tests
packages/ui-client/src/components/FeaturePreview/FeaturePreview.spec.tsx, packages/ui-client/src/hooks/useFeaturePreview.spec.tsx
Tests updated to replace quickReactions with secondarySidebar in feature keys and user-preference fixtures; assertions preserved.
Feature preview list / API
packages/ui-client/src/hooks/useFeaturePreviewList.ts
Removes 'quickReactions' from exported FeaturesAvailable type and from defaultFeaturesPreview, narrowing the public FeaturePreviewProps.name type.
E2E spec
apps/meteor/tests/e2e/feature-preview.spec.ts
Test narrowed to assert only the "Navigation" feature section; removed assertion for "Message" button.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Toolbar as MessageToolbar
  participant Action as ReactionMessageAction
  participant Picker as EmojiPicker

  User->>Toolbar: hover message
  Toolbar->>Action: render actions
  Note right of Action #ffffcc: quickReactions feature-flag removed\nAlways render first 3 quick reactions
  Action-->>User: show 3 quick-reaction buttons
  User->>Action: click reaction
  Action->>Action: toggleReaction(reaction)
  alt open emoji picker
    Action->>Picker: open for more reactions
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • yash-rajpal
  • MartinSchoeler

Poem

I twitch my whiskers, show three bright faces,
No preview fences now, just open spaces.
Flags folded away, small translations trimmed light,
Reactions hop forward into daylight. 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Linked Issues Check ❓ Inconclusive The PR implements the first two CORE-1348 objectives: ReactionMessageAction no longer gates quick reactions behind the feature-preview flag (so users can use them without that preference), and useFeaturePreviewList removes the quickReactions entry from the default feature-preview list and related tests so it will not appear in feature preview. However, the provided summaries do not prove that "all duplicated code" related to quick reactions has been exhaustively removed across the repository, so compliance with that third success criterion cannot be fully verified from the supplied diffs alone. Please provide evidence of a repo-wide sweep (e.g., list of removed instances or a grep/CI report showing remaining references) demonstrating that duplicated quick-reactions code was removed and confirm that full test and admin UI checks pass to validate there are no remaining stale references.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "feat: Move quick reactions out of feature preview" is concise, focused, and accurately summarizes the primary change in the diff — moving quick reactions out of the feature-preview gating so they are available by default. It avoids noise and is clear to a reviewer scanning PR history.
Out of Scope Changes Check ✅ Passed All modified files appear related to the stated goal of promoting quick reactions out of feature preview (component gating removal, feature-list/type update, test adjustments, and locale string removals), and the changeset bump is consistent with promoting the feature to stable. The only items worth a quick follow-up are the removed i18n keys and the narrowed public FeaturesAvailable type, which are related but should be double-checked for any remaining references or downstream consumer impact.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/quickReactions-outside-feature-preview

📜 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 f574e85 and 2fc2e50.

📒 Files selected for processing (1)
  • apps/meteor/tests/e2e/feature-preview.spec.ts (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • apps/meteor/tests/e2e/feature-preview.spec.ts
⏰ 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). (7)
  • GitHub Check: 🔨 Test Storybook / Test Storybook
  • GitHub Check: 🔨 Test Unit / Unit Tests
  • GitHub Check: 🔎 Code Check / TypeScript
  • GitHub Check: 📦 Meteor Build - coverage
  • GitHub Check: 🔎 Code Check / Code Lint
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build

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

@codecov
Copy link

codecov bot commented Sep 17, 2025

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 65.19%. Comparing base (3c42f0d) to head (2fc2e50).
⚠️ Report is 100 commits behind head on release-8.0.0.

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                @@
##           release-8.0.0   #36966      +/-   ##
=================================================
- Coverage          66.43%   65.19%   -1.25%     
=================================================
  Files               3276     3273       -3     
  Lines             109596   110744    +1148     
  Branches           20860    20711     -149     
=================================================
- Hits               72814    72197     -617     
- Misses             34116    36037    +1921     
+ Partials            2666     2510     -156     
Flag Coverage Δ
e2e 53.64% <0.00%> (-4.21%) ⬇️
unit 70.88% <ø> (-0.69%) ⬇️

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.

@yash-rajpal yash-rajpal marked this pull request as ready for review September 17, 2025 17:03
@yash-rajpal yash-rajpal requested a review from a team as a code owner September 17, 2025 17:03
@dougfabris dougfabris added this to the 8.0.0 milestone Sep 17, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (6)
.changeset/purple-mayflies-approve.md (2)

7-7: Expand the release note with explicit BREAKING changes and migration steps.

Downstream consumers will miss why majors occurred. Recommend a clearer note.

-Move quick reactions out of feature preview.
+BREAKING: Quick Reactions no longer uses Feature Preview
+
+- Removes 'quickReactions' from Feature Preview (client UI and types).
+- Removes i18n keys: Quick_reactions, Quick_reactions_description (all locales).
+- Reaction toolbar now shows quick reactions unconditionally.
+- Tests and code using useFeaturePreview('quickReactions') must migrate.
+
+Migration:
+- Replace any `useFeaturePreview('quickReactions')` and conditional rendering with the new default behavior.
+- Remove usage of removed i18n keys; no replacement is needed because the feature is no longer configurable.
+- If your app persisted userPreferences.featuresPreview entries for 'quickReactions', they are now ignored and may be cleaned up.

7-7: Consider adding a small cleanup migration for stale user preferences.

Optional but nice: remove featuresPreview.name === 'quickReactions' entries from user documents to reduce clutter.

Example Mongo migration (for your migrations framework):

// Pseudocode: remove quickReactions from featuresPreview array on all users
db.users.updateMany(
  { 'settings.preferences.featuresPreview.name': 'quickReactions' },
  [
    {
      $set: {
        'settings.preferences.featuresPreview': {
          $filter: {
            input: '$settings.preferences.featuresPreview',
            as: 'fp',
            cond: { $ne: ['$$fp.name', 'quickReactions'] },
          },
        },
      },
    },
  ],
);
packages/ui-client/src/components/FeaturePreview/FeaturePreview.spec.tsx (1)

6-6: Tighten test names and drop unnecessary async.

Minor polish: clearer names and no async when nothing is awaited.

-test('should renders off if the feature is disabled', async () => {
+test('renders "off" when feature preview is allowed but newNavigation is not enabled', () => {
@@
-test('should renders on if the feature is enabled', async () => {
+test('renders "on" when newNavigation is enabled in user preferences', () => {

Optionally make the first test explicit about the absence of the flag:

// inside the first test render options wrapper:
mockAppRoot()
  .withSetting('Accounts_AllowFeaturePreview', true)
  .withUserPreference('featuresPreview', [])
  .build();

Also applies to: 20-20

apps/meteor/client/components/message/toolbar/items/actions/ReactionMessageAction.tsx (1)

44-51: Harden toggleReaction: handle endpoint errors and memoize.

Avoid unhandled promise rejections and reduce re-renders from new function instances on each render.

Example change:

- const toggleReaction = (emoji: string) => {
-   setReaction({
-     emoji: `:${emoji}:`,
-     messageId: message._id,
-   });
-   addRecentEmoji(emoji);
- };
+ const toggleReaction = useCallback((emoji: string) => {
+   void setReaction({ emoji: `:${emoji}:`, messageId: message._id }).catch(() => {
+     // optionally log or surface a toast
+   });
+   addRecentEmoji(emoji);
+ }, [setReaction, addRecentEmoji, message._id]);
packages/ui-client/src/hooks/useFeaturePreview.spec.tsx (1)

16-20: Fix test setup to match its description (and remove the TODO).

The test name says "featurePreviewEnabled is true but feature is not in userPreferences," but it sets the setting to false and includes the feature. Update setup as below.

-  wrapper: mockAppRoot()
-    .withSetting('Accounts_AllowFeaturePreview', false)
-    .withUserPreference('featuresPreview', [{ name: 'newNavigation', value: true }])
-    .build(),
+  wrapper: mockAppRoot()
+    .withSetting('Accounts_AllowFeaturePreview', true)
+    .withUserPreference('featuresPreview', [])
+    .build(),
packages/ui-client/src/hooks/useFeaturePreviewList.ts (1)

3-3: Prevent drift: derive FeaturesAvailable from the source of truth.

Now that 'quickReactions' is removed, consider deriving the union from defaultFeaturesPreview to avoid future mismatches.

For example:

// Define first, as a const, without relying on FeaturesAvailable
export const defaultFeaturesPreview = [
  /* ... */
] as const;

// Then derive the union
export type FeaturesAvailable = (typeof defaultFeaturesPreview)[number]['name'];

Also, ensure we clean up persisted 'quickReactions' entries in user preferences/settings to avoid orphaned data in payloads/UI.

I can draft a small migration to strip 'quickReactions' from featuresPreview in user prefs and any admin settings.

📜 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 c0bac52 and 5bcde93.

⛔ Files ignored due to path filters (1)
  • apps/meteor/public/images/featurePreview/quick-reactions.png is excluded by !**/*.png
📒 Files selected for processing (11)
  • .changeset/purple-mayflies-approve.md (1 hunks)
  • apps/meteor/client/components/message/toolbar/items/actions/ReactionMessageAction.tsx (1 hunks)
  • packages/i18n/src/locales/en.i18n.json (1 hunks)
  • packages/i18n/src/locales/hi-IN.i18n.json (0 hunks)
  • packages/i18n/src/locales/nb.i18n.json (0 hunks)
  • packages/i18n/src/locales/nn.i18n.json (0 hunks)
  • packages/i18n/src/locales/pt-BR.i18n.json (0 hunks)
  • packages/i18n/src/locales/sv.i18n.json (0 hunks)
  • packages/ui-client/src/components/FeaturePreview/FeaturePreview.spec.tsx (2 hunks)
  • packages/ui-client/src/hooks/useFeaturePreview.spec.tsx (2 hunks)
  • packages/ui-client/src/hooks/useFeaturePreviewList.ts (1 hunks)
💤 Files with no reviewable changes (5)
  • packages/i18n/src/locales/pt-BR.i18n.json
  • packages/i18n/src/locales/nb.i18n.json
  • packages/i18n/src/locales/nn.i18n.json
  • packages/i18n/src/locales/sv.i18n.json
  • packages/i18n/src/locales/hi-IN.i18n.json
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
PR: RocketChat/Rocket.Chat#0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use descriptive test names that clearly communicate expected behavior

Applied to files:

  • packages/ui-client/src/components/FeaturePreview/FeaturePreview.spec.tsx
  • packages/ui-client/src/hooks/useFeaturePreview.spec.tsx
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
PR: RocketChat/Rocket.Chat#0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Utilize Playwright fixtures (test, page, expect) consistently

Applied to files:

  • packages/ui-client/src/components/FeaturePreview/FeaturePreview.spec.tsx
🔇 Additional comments (5)
.changeset/purple-mayflies-approve.md (1)

1-5: Approve — major bumps appropriate; verify peer/dep ranges
Scan of repository package.json files found no references to @rocket.chat/ui-client, @rocket.chat/i18n, or @rocket.chat/meteor; double-check workspace/peer dependency ranges and external consumers to avoid inconsistent installs.

packages/i18n/src/locales/en.i18n.json (2)

2248-2248: LGTM: non-semantic copy tweak only

No behavioral impact. Safe to merge.


2248-2248: No dangling Quick_reactions i18n keys; remaining quickReactions are local state (no action required)
rg shows no Quick_reactions i18n keys in code or locales. The only matches for quickReactions are local state/context and consumers in: apps/meteor/client/providers/EmojiPickerProvider/EmojiPickerProvider.tsx, apps/meteor/client/contexts/EmojiPickerContext.ts, apps/meteor/client/components/message/toolbar/items/actions/ReactionMessageAction.tsx.

apps/meteor/client/components/message/toolbar/items/actions/ReactionMessageAction.tsx (1)

54-56: Quick reactions now always-on — LGTM.

Rendering the first three quick reactions unconditionally aligns with moving the feature out of preview.

packages/ui-client/src/hooks/useFeaturePreview.spec.tsx (1)

7-7: Feature key swap to 'newNavigation' — LGTM.

Consistent with removing 'quickReactions' from feature preview.

Also applies to: 27-27

dougfabris
dougfabris previously approved these changes Sep 18, 2025
@dougfabris dougfabris added the stat: QA assured Means it has been tested and approved by a company insider label Sep 18, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Sep 18, 2025
@kodiakhq kodiakhq bot merged commit 7f5e92b into release-8.0.0 Sep 19, 2025
14 of 16 checks passed
@kodiakhq kodiakhq bot deleted the chore/quickReactions-outside-feature-preview branch September 19, 2025 12:58
ggazzo pushed a commit that referenced this pull request Sep 30, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
ggazzo pushed a commit that referenced this pull request Oct 31, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
ggazzo pushed a commit that referenced this pull request Oct 31, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
yash-rajpal added a commit that referenced this pull request Nov 4, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
ggazzo pushed a commit that referenced this pull request Nov 4, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
ggazzo pushed a commit that referenced this pull request Nov 5, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
ggazzo pushed a commit that referenced this pull request Nov 5, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
ggazzo pushed a commit that referenced this pull request Nov 5, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
ggazzo pushed a commit that referenced this pull request Nov 6, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
ggazzo pushed a commit that referenced this pull request Nov 12, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
ggazzo pushed a commit that referenced this pull request Nov 12, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
ggazzo pushed a commit that referenced this pull request Nov 13, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
ggazzo pushed a commit that referenced this pull request Nov 18, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
ggazzo pushed a commit that referenced this pull request Dec 2, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
ggazzo pushed a commit that referenced this pull request Dec 9, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
ggazzo pushed a commit that referenced this pull request Dec 10, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
ggazzo pushed a commit that referenced this pull request Dec 15, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
ggazzo pushed a commit that referenced this pull request Dec 17, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
ggazzo pushed a commit that referenced this pull request Dec 17, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
ggazzo pushed a commit that referenced this pull request Dec 17, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
ggazzo pushed a commit that referenced this pull request Dec 18, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
ggazzo pushed a commit that referenced this pull request Dec 18, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
ggazzo pushed a commit that referenced this pull request Dec 18, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
ggazzo pushed a commit that referenced this pull request Dec 19, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
ggazzo pushed a commit that referenced this pull request Dec 19, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
ggazzo pushed a commit that referenced this pull request Dec 19, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
ggazzo pushed a commit that referenced this pull request Dec 20, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
ggazzo pushed a commit that referenced this pull request Dec 20, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
ggazzo pushed a commit that referenced this pull request Dec 20, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
dougfabris added a commit that referenced this pull request Dec 20, 2025
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
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