Skip to content

Conversation

@ggazzo
Copy link
Member

@ggazzo ggazzo commented May 8, 2025

CORE-1140

Proposed changes (including videos or screenshots)

Issue(s)

Steps to test or reproduce

Further comments


This pull request addresses a regression issue related to restoring the scroll position in the same room types within the Rocket.Chat application. The changes include a refactor of the ContextualbarResizable component by wrapping the Resizable core element with a Box component, which reorganizes the existing resizing functionality and its properties. Additionally, a cleanup process has been added to the scroll event handler in the useRestoreScrollPosition hook to prevent potential memory leaks. These updates are made in the regression/jumo-to-message branch and are intended to be merged into the develop branch.

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented May 8, 2025

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

  • This PR is targeting the wrong base branch. It should target 7.6.0, but it targets 7.7.0

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented May 8, 2025

⚠️ No Changeset found

Latest commit: 7eb31e1

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 May 8, 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 added this to the 7.6.0 milestone May 8, 2025
@github-actions
Copy link
Contributor

github-actions bot commented May 8, 2025

PR Preview Action v1.6.1

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

Built to branch gh-pages at 2025-05-08 18:17 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@codecov
Copy link

codecov bot commented May 8, 2025

Codecov Report

Attention: Patch coverage is 82.60870% with 4 lines in your changes missing coverage. Please review.

Project coverage is 64.64%. Comparing base (b2fad33) to head (7eb31e1).
Report is 8 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #35950      +/-   ##
===========================================
+ Coverage    61.28%   64.64%   +3.35%     
===========================================
  Files         3164     3244      +80     
  Lines        74803    95365   +20562     
  Branches     16693    17854    +1161     
===========================================
+ Hits         45846    61645   +15799     
- Misses       25854    30826    +4972     
+ Partials      3103     2894     -209     
Flag Coverage Δ
e2e 58.07% <94.73%> (+<0.01%) ⬆️
unit 71.95% <28.57%> (-3.17%) ⬇️

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.

@kody-ai
Copy link

kody-ai bot commented May 8, 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.

@ggazzo ggazzo marked this pull request as ready for review May 8, 2025 19:11
@ggazzo ggazzo requested a review from a team as a code owner May 8, 2025 19:11
@jessicaschelly jessicaschelly added the stat: QA assured Means it has been tested and approved by a company insider label May 8, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label May 8, 2025
@ggazzo ggazzo force-pushed the regression/jumo-to-message branch from 5324598 to 7a0c3bd Compare May 8, 2025 21:13
@kody-ai
Copy link

kody-ai bot commented May 8, 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.

Comment on lines 25 to 27

containerRef.current.scrollTop = jumpToRef.current.offsetTop - containerRef.current.offsetTop;
containerRef.current.scroll();
Copy link

Choose a reason for hiding this comment

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

kody code-review Kody Rules high

+  const jumpToRefCallback = useCallback((node) => {
+    if (node) {
+      containerRef.current.scrollTop = node.offsetTop - containerRef.current.offsetTop;
+      containerRef.current.scroll();
+    }
+  }, [containerRef]);
+
+  // ... inside the return statement
+  <div ref={jumpToRefCallback}>...</div>

Avoid accessing ref.current directly inside useEffect. Instead, use a callback ref to ensure you have the latest reference to the DOM element. Direct access to ref.current within useEffect can lead to stale closures and unexpected behavior, especially when dealing with asynchronous updates.

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

@kody-ai
Copy link

kody-ai bot commented May 8, 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.

1 similar comment
@kody-ai
Copy link

kody-ai bot commented May 8, 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.

@ggazzo ggazzo force-pushed the regression/jumo-to-message branch from 76aa1b2 to 7eb31e1 Compare May 8, 2025 22:32
@ggazzo ggazzo merged commit 1d10a52 into develop May 8, 2025
48 checks passed
@ggazzo ggazzo deleted the regression/jumo-to-message branch May 8, 2025 23:26
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.

4 participants