Skip to content

Conversation

@juliajforesti
Copy link
Contributor

@juliajforesti juliajforesti commented Apr 22, 2025

ARCH-1582

Proposed changes (including videos or screenshots)

Issue(s)

Steps to test or reproduce

Further comments


This pull request refactors the toggleFavoriteRoom function in the RocketChat/Rocket.Chat repository. The changes involve removing the dependency on the global Meteor.userId() by introducing an explicit userId parameter. This modification enhances the function's testability and flexibility by decoupling it from the global state. Additionally, a guard clause is added to handle scenarios where userId is null. The updates are made in the apps/meteor/client/lib/mutationEffects/room.ts and apps/meteor/client/views/room/hooks/useToggleFavoriteMutation.ts files, ensuring better context handling by requiring the user ID as a parameter. The source branch for this refactor is refactor/toggle-favorite, targeting the develop branch.

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Apr 22, 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 Apr 22, 2025

⚠️ No Changeset found

Latest commit: 536939f

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

@kody-ai
Copy link

kody-ai bot commented Apr 22, 2025

Kody Review Complete

Great news! 🎉
No issues were found that match your current review configurations.

Keep up the excellent work! 🚀

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Security
Code Style
Kody Rules
Refactoring
Error Handling
Maintainability
Potential Issues
Documentation And Comments
Performance And Optimization
Breaking Changes

Access your configuration settings here.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 22, 2025

PR Preview Action v1.6.1

🚀 View preview at
https://RocketChat.github.io/Rocket.Chat/pr-preview/pr-35851/

Built to branch gh-pages at 2025-04-29 14:06 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@codecov
Copy link

codecov bot commented Apr 22, 2025

Codecov Report

Attention: Patch coverage is 40.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 61.21%. Comparing base (7846a9c) to head (536939f).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #35851      +/-   ##
===========================================
+ Coverage    61.17%   61.21%   +0.04%     
===========================================
  Files         3161     3007     -154     
  Lines        74702    71419    -3283     
  Branches     16678    16334     -344     
===========================================
- Hits         45700    43721    -1979     
+ Misses       25902    24732    -1170     
+ Partials      3100     2966     -134     
Flag Coverage Δ
unit 75.10% <ø> (ø)

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 April 29, 2025 13:07
@juliajforesti juliajforesti requested a review from a team as a code owner April 29, 2025 13:07
@juliajforesti juliajforesti added this to the 7.7.0 milestone Apr 29, 2025
@aleksandernsilva aleksandernsilva added the stat: QA assured Means it has been tested and approved by a company insider label Apr 29, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Apr 29, 2025
@dionisio-bot dionisio-bot bot removed the stat: ready to merge PR tested and approved waiting for merge label Apr 29, 2025
@kody-ai
Copy link

kody-ai bot commented Apr 29, 2025

Code Review Completed! 🔥

The code review was successfully completed based on your current configurations.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Security
Code Style
Kody Rules
Refactoring
Error Handling
Maintainability
Potential Issues
Documentation And Comments
Performance And Optimization
Breaking Changes

Access your configuration settings here.

@ggazzo ggazzo merged commit 1c73fa7 into develop Apr 29, 2025
19 of 20 checks passed
@ggazzo ggazzo deleted the refactor/toggle-favorite branch April 29, 2025 14:22
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants