Skip to content

refactor: move app/reaction function - #41921

Open
tassoevan wants to merge 3 commits into
refactor/move-app-livechat-client-modulesfrom
refactor/move-app-reaction-client-modules
Open

refactor: move app/reaction function#41921
tassoevan wants to merge 3 commits into
refactor/move-app-livechat-client-modulesfrom
refactor/move-app-reaction-client-modules

Conversation

@tassoevan

@tassoevan tassoevan commented Aug 24, 2026

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

It moves client modules from app/reaction/ to client/.

Issue(s)

Steps to test or reproduce

Further comments


Stack created with GitHub Stacks CLIGive Feedback 💬

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Improved message reaction updates with validation for account status, room access, subscriptions, read-only rooms, and message availability.
    • Prevented invalid reaction changes when required message, room, or emoji information is unavailable.
    • Improved cleanup when removing reactions, ensuring empty reaction entries are removed correctly.
    • Fixed reaction status checks when a reaction has no associated users.

Task: ARCH-2392

@tassoevan
tassoevan requested a review from a team as a code owner August 24, 2026 20:49
@changeset-bot

changeset-bot Bot commented Aug 24, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 03c0825

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

@dionisio-bot

dionisio-bot Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

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

  • This PR is missing the 'stat: QA assured' label

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 54c2a668-253d-438d-b92b-5aed8f752597

📥 Commits

Reviewing files that changed from the base of the PR and between 85d1676 and 03c0825.

📒 Files selected for processing (2)
  • apps/meteor/client/lib/chats/flows/processSetReaction.ts
  • apps/meteor/client/views/room/MessageList/providers/MessageListProvider.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (6)
  • GitHub Check: ⚙️ Variables Setup
  • GitHub Check: ⚙️ Test Guard
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: CodeQL-Build
  • GitHub Check: Hacktron Security Check
  • GitHub Check: CodeQL-Build
🧰 Additional context used
📓 Path-based instructions (2)
The main Rocket.Chat Meteor application resides in `apps/meteor/`; place its application code there rather than in other monorepo areas.

📄 CodeRabbit inference engine (CLAUDE.md)

Files:

  • apps/meteor/client/views/room/MessageList/providers/MessageListProvider.tsx
  • apps/meteor/client/lib/chats/flows/processSetReaction.ts
Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

Files:

  • apps/meteor/client/views/room/MessageList/providers/MessageListProvider.tsx
  • apps/meteor/client/lib/chats/flows/processSetReaction.ts
🔇 Additional comments (2)
apps/meteor/client/lib/chats/flows/processSetReaction.ts (1)

4-82: LGTM!

apps/meteor/client/views/room/MessageList/providers/MessageListProvider.tsx (1)

11-11: LGTM!

Also applies to: 73-73


Walkthrough

The optimistic reaction logic moved into processSetReaction.ts. The flow validates the user, message, room, emoji, permissions, and subscription before updating the local Messages store. Reaction lookup now handles missing entries safely.

Changes

Reaction flow

Layer / File(s) Summary
Local optimistic reaction handling
apps/meteor/client/lib/chats/flows/processSetReaction.ts, apps/meteor/app/reactions/client/methods/setReaction.ts, apps/meteor/client/views/room/MessageList/providers/MessageListProvider.tsx
processSetReaction.ts now contains the optimistic reaction validation and toggle logic. The previous exported implementation was removed from setReaction.ts. useUserHasReacted now returns false when the reaction entry is missing.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 03c08

This change relocates client modules without any supplied evidence of a current correctness, security, availability, or deployment risk; no actionable merge-blocking risk remains beyond normal checks and review.

Suggested labels: type: chore

Suggested reviewers: ggazzo, cardoso

🚥 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 clearly summarizes the primary change: moving the reaction function from the app module into the client module.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files.

Warning

Errors were encountered while retrieving linked issues.

Errors (1)
  • ARCH-2392: Request failed with status code 401

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.

@tassoevan tassoevan added this to the 8.9.0 milestone Aug 24, 2026
@tassoevan

Copy link
Copy Markdown
Member Author

/jira ARCH

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 2 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread apps/meteor/client/lib/chats/flows/processSetReaction.ts Outdated
@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 2.50000% with 39 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.33%. Comparing base (952dd1e) to head (03c0825).

Additional details and impacted files

Impacted file tree graph

@@                              Coverage Diff                              @@
##           refactor/move-app-livechat-client-modules   #41921      +/-   ##
=============================================================================
- Coverage                                      69.33%   69.33%   -0.01%     
=============================================================================
  Files                                           4253     4252       -1     
  Lines                                         168638   168635       -3     
  Branches                                       30052    30089      +37     
=============================================================================
- Hits                                          116926   116921       -5     
+ Misses                                         46540    46536       -4     
- Partials                                        5172     5178       +6     
Flag Coverage Δ
e2e 58.81% <2.50%> (+0.03%) ⬆️
e2e-api 45.88% <ø> (-0.26%) ⬇️
unit 71.27% <ø> (+0.02%) ⬆️

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.

@tassoevan
tassoevan force-pushed the refactor/move-app-reaction-client-modules branch from 85d1676 to 9972298 Compare August 24, 2026 21:45
@rc-layne

rc-layne Bot commented Aug 24, 2026

Copy link
Copy Markdown

Layne — scan passed

No security issues found on latest push.

@tassoevan
tassoevan force-pushed the refactor/move-app-reaction-client-modules branch from 9972298 to 4c6a870 Compare August 25, 2026 03:26
@tassoevan
tassoevan force-pushed the refactor/move-app-reaction-client-modules branch from 4c6a870 to cf80701 Compare August 25, 2026 03:57
@tassoevan
tassoevan force-pushed the refactor/move-app-reaction-client-modules branch from cf80701 to b8a3a8c Compare August 25, 2026 04:27
tassoevan and others added 2 commits August 25, 2026 01:53
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

1 participant