Skip to content

regression: opening a contextual bar changes message list scroll position#40757

Merged
dionisio-bot[bot] merged 2 commits into
release-8.5.0from
fix/messageListContextualBar
Jun 2, 2026
Merged

regression: opening a contextual bar changes message list scroll position#40757
dionisio-bot[bot] merged 2 commits into
release-8.5.0from
fix/messageListContextualBar

Conversation

@gabriellsh

@gabriellsh gabriellsh commented Jun 1, 2026

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

The way the contextual bar is handled makes the body of the room assume a width of 0. This breaks Virtua somehow, but upon digging their issues, this one stood out inokawa/virtua#225. By changing the body's display to "none" when it's hidden, the issue seises to exist.

Issue(s)

CORE-2225

Steps to test or reproduce

Further comments

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Improved room layout behavior to properly hide the main content area when the side panel expands to full width, preventing display conflicts and overlapping UI elements.

@dionisio-bot

dionisio-bot Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

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

@changeset-bot

changeset-bot Bot commented Jun 1, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 934f448

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

@coderabbitai

coderabbitai Bot commented Jun 1, 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

Run ID: de04c406-ef43-4d09-979d-b581c1e66e76

📥 Commits

Reviewing files that changed from the base of the PR and between 8553294 and d57c995.

📒 Files selected for processing (1)
  • apps/meteor/client/views/room/layout/RoomLayout.tsx
📜 Recent review details
⏰ 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). (2)
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: Hacktron Security Check
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}

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

**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation

Files:

  • apps/meteor/client/views/room/layout/RoomLayout.tsx
🧠 Learnings (2)
📚 Learning: 2026-03-27T14:52:56.865Z
Learnt from: dougfabris
Repo: RocketChat/Rocket.Chat PR: 39892
File: apps/meteor/client/views/room/contextualBar/Threads/Thread.tsx:150-155
Timestamp: 2026-03-27T14:52:56.865Z
Learning: In Rocket.Chat, there are two different `ModalBackdrop` components with different prop APIs. During review, confirm the import source: (1) `rocket.chat/fuselage` `ModalBackdrop` uses `ModalBackdropProps` based on `BoxProps` (so it supports `onClick` and other Box/DOM props) and does not have an `onDismiss` prop; (2) `rocket.chat/ui-client` `ModalBackdrop` uses a narrower props interface like `{ children?: ReactNode; onDismiss?: () => void }` and handles Escape keypress and outside mouse-up, and it does not forward arbitrary DOM props such as `onClick`. Flag mismatched props (e.g., `onDismiss` passed to the fuselage component or `onClick` passed to the ui-client component) and ensure the usage matches the correct component being imported.

Applied to files:

  • apps/meteor/client/views/room/layout/RoomLayout.tsx
📚 Learning: 2026-05-06T12:21:44.083Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 40256
File: apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx:121-149
Timestamp: 2026-05-06T12:21:44.083Z
Learning: Field wrappers in rocket.chat/fuselage-forms (Field, FieldLabel, FieldRow, FieldError, FieldHint) auto-create htmlFor/id associations, aria-describedby, and role="alert" for errors. Do not manually set htmlFor, id, aria-describedby, or role attributes when using these wrappers. This automatic wiring does not apply to plain rocket.chat/fuselage components, which require explicit ID wiring per the accessibility docs. In code reviews, prefer using fuselage-forms wrappers for form fields and verify there is no unnecessary manual ID/aria wiring in files that use these wrappers. If a component uses plain fuselage components, ensure proper id wiring as per docs.

Applied to files:

  • apps/meteor/client/views/room/layout/RoomLayout.tsx
🔇 Additional comments (2)
apps/meteor/client/views/room/layout/RoomLayout.tsx (2)

42-42: LGTM!


63-63: LGTM!


Walkthrough

RoomLayout now conditionally hides the body container when a full-width contextual bar (contextualbarSize === '100%') is present alongside an aside panel. A hideBody boolean is derived from these conditions and applied to the body wrapper's display CSS property.

Changes

Conditional body hiding in full-width contextual bar

Layer / File(s) Summary
Conditional body hiding
apps/meteor/client/views/room/layout/RoomLayout.tsx
Introduces hideBody boolean computed from aside && contextualbarSize === '100%', and updates body wrapper to apply display: 'none' when true, otherwise display: 'flex'.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested labels

type: bug

🚥 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 PR title clearly describes a regression fix related to contextual bar opening affecting message list scroll position, which directly aligns with the changeset that hides the body container when the contextual bar is at 100% width.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (2)
  • CORE-2225: Request failed with status code 401
  • CORE-2249: 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 and usage tips.

@codecov

codecov Bot commented Jun 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.92%. Comparing base (995d6ea) to head (d57c995).
⚠️ Report is 3 commits behind head on release-8.5.0.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff               @@
##           release-8.5.0   #40757   +/-   ##
==============================================
  Coverage          69.91%   69.92%           
==============================================
  Files               3327     3327           
  Lines             126593   126583   -10     
  Branches           22042    22027   -15     
==============================================
- Hits               88511    88510    -1     
+ Misses             34791    34779   -12     
- Partials            3291     3294    +3     
Flag Coverage Δ
e2e 59.24% <100.00%> (-0.02%) ⬇️
e2e-api 46.15% <ø> (-0.02%) ⬇️
unit 70.04% <0.00%> (+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.

@gabriellsh gabriellsh marked this pull request as ready for review June 2, 2026 13:09
@gabriellsh gabriellsh requested a review from a team as a code owner June 2, 2026 13:09
@gabriellsh gabriellsh added this to the 8.5.0 milestone Jun 2, 2026

@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.

1 issue found across 1 file

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

Re-trigger cubic

Comment thread apps/meteor/client/views/room/layout/RoomLayout.tsx
@tassoevan tassoevan added the stat: QA assured Means it has been tested and approved by a company insider label Jun 2, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Jun 2, 2026
@dionisio-bot dionisio-bot Bot merged commit f1f1edd into release-8.5.0 Jun 2, 2026
8 of 9 checks passed
@dionisio-bot dionisio-bot Bot deleted the fix/messageListContextualBar branch June 2, 2026 13:25
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 type: bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants