Skip to content

Conversation

@gabriellsh
Copy link
Member

@gabriellsh gabriellsh commented Feb 28, 2025

Proposed changes (including videos or screenshots)

The room-changed event was misfiring due to the RoomManager.open function being called before the listener was attached.

First time entering a room would work correctly, but after cache is available in the useOpenRoom hook, RoomProvider is able to render using said cache, before the queryFn would rerun with the new room data.

This caused the event to not fire after returnning the first time to a room, and subsequent events would dispatch the previous room's data.

Issue(s)

SUP-746

Steps to test or reproduce

  • Attach a message event listener to the window (parent.addEventListener('message', ...))
  • Go to room 1
  • Go to room 2
  • Return to room 1
  • Event will not have been dispatched
  • Return to room 2
  • Event will be dispatched with room's 1 data.

Further comments

@gabriellsh gabriellsh requested a review from a team as a code owner February 28, 2025 22:28
@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Feb 28, 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 Feb 28, 2025

🦋 Changeset detected

Latest commit: ab6bf4d

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

This PR includes changesets to release 35 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/uikit-playground Patch
@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/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/models Patch
@rocket.chat/network-broker Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/ui-voip Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/instance-status 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

@codecov
Copy link

codecov bot commented Feb 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.64%. Comparing base (0f82a60) to head (ab6bf4d).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #35371      +/-   ##
===========================================
- Coverage    59.64%   59.64%   -0.01%     
===========================================
  Files         2828     2828              
  Lines        68539    68533       -6     
  Branches     15193    15192       -1     
===========================================
- Hits         40883    40879       -4     
+ Misses       25008    25006       -2     
  Partials      2648     2648              
Flag Coverage Δ
unit 75.87% <ø> (ø)

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.

@scuciatto scuciatto added this to the 7.5.0 milestone Mar 3, 2025
Co-authored-by: Douglas Fabris <devfabris@gmail.com>
Copy link
Member

@dougfabris dougfabris left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@gabriellsh gabriellsh added the stat: QA assured Means it has been tested and approved by a company insider label Mar 10, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Mar 10, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Mar 10, 2025

PR Preview Action v1.6.0

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

Built to branch gh-pages at 2025-03-12 12:07 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@kodiakhq kodiakhq bot merged commit dc9b542 into develop Mar 12, 2025
48 checks passed
@kodiakhq kodiakhq bot deleted the fix/room-opened branch March 12, 2025 12:44
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.

5 participants