Skip to content

refactor: remove unnecessary ReactElement type annotations in functional components#40819

Merged
ggazzo merged 1 commit into
developfrom
refactor/prepare-types-for-react-19-17
Jun 9, 2026
Merged

refactor: remove unnecessary ReactElement type annotations in functional components#40819
ggazzo merged 1 commit into
developfrom
refactor/prepare-types-for-react-19-17

Conversation

@tassoevan

@tassoevan tassoevan commented Jun 4, 2026

Copy link
Copy Markdown
Member

⚠️ This is part 17/23 of #40796. PR for refactor/prepare-types-for-react-19-15 must be merged first.


Proposed changes (including videos or screenshots)

As a first step towards upgrading to React 19, it handles types from @types/react looking forward the next major.

Issue(s)

Task: ARCH-2170

Steps to test or reproduce

Further comments

No runtime change is expected from it.

Summary by CodeRabbit

  • Refactor
    • Removed explicit ReactElement return type annotations from React component declarations across the codebase, allowing TypeScript to infer component return types.
    • Updated React type imports to use more precise types (ReactNode instead of ReactElement) for component props and render callbacks.
    • Simplified component type signatures while maintaining the same runtime behavior.

@changeset-bot

changeset-bot Bot commented Jun 4, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1331170

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 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

TypeScript React typings were simplified across room, root, webdav, video, and teams UI components. Many components dropped explicit ReactElement return annotations, some props and render contracts now use ReactNode, and a few refs were initialized with explicit undefined values.

Changes

React typing cleanup

Layer / File(s) Summary
Root and layout types
apps/meteor/client/views/root/*, apps/meteor/client/views/root/MainLayout/*, apps/meteor/client/views/room/layout/RoomLayout.tsx, apps/meteor/client/views/room/providers/*
ReactElement imports and return annotations were removed from root and layout components, while children props stay typed as ReactNode.
Room shell and header types
apps/meteor/client/views/room/*, apps/meteor/client/views/room/Header/*, apps/meteor/client/views/room/body/*, apps/meteor/client/views/room/MessageList/*, apps/meteor/client/views/room/ShareLocation/*, apps/meteor/client/views/room/UserCard/*
Room shell, header, message list, body, and related helper components switch to inferred return types and updated React type imports.
Composer and contextual bar types
apps/meteor/client/views/room/composer/*, apps/meteor/client/views/room/contextualBar/*, apps/meteor/client/views/room/hooks/*
Composer entry points, contextual bar tabs, room-member/user-info panels, thread views, and supporting hooks remove explicit return annotations; popup render contracts widen to ReactNode where needed.
Modals, webdav, and video conference types
apps/meteor/client/views/room/modals/*, apps/meteor/client/views/room/webdav/*, apps/meteor/client/views/room/contextualBar/VideoConference/*
Encryption, upload, reaction, receipt, report, forward, pin, webdav, and video conference components drop explicit return annotations and adjust a few callback and import types.
Teams view types
apps/meteor/client/views/teams/*
Teams desertion and team-info components remove explicit ReactElement typing, with one sort comparator and row render callback reformatted.
React hook ref initialization
apps/meteor/client/views/room/composer/hooks/useComposerBoxPopup.ts, apps/meteor/client/views/room/composer/messageBox/hooks/useMessageBoxAutoFocus.ts, apps/meteor/client/views/room/contextualBar/Threads/hooks/useThreadMainMessageQuery.ts, apps/meteor/client/views/room/providers/hooks/useInstance.ts
Several internal refs now initialize with explicit undefined values instead of relying on implicit useRef() initialization.

Sequence Diagram(s)

Not applicable.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested labels

type: chore

Suggested reviewers

  • ggazzo
  • juliajforesti
  • dougfabris

@dionisio-bot

dionisio-bot Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jun 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.62500% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.14%. Comparing base (fbe2a62) to head (1331170).
⚠️ Report is 5 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #40819      +/-   ##
===========================================
- Coverage    70.15%   70.14%   -0.02%     
===========================================
  Files         3342     3342              
  Lines       123735   123668      -67     
  Branches     22099    22061      -38     
===========================================
- Hits         86812    86744      -68     
+ Misses       33577    33569       -8     
- Partials      3346     3355       +9     
Flag Coverage Δ
e2e 59.30% <94.28%> (-0.06%) ⬇️
e2e-api 46.26% <ø> (ø)
unit 70.97% <98.41%> (-0.01%) ⬇️

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/prepare-types-for-react-19-17 branch from a921668 to ee7cd95 Compare June 9, 2026 15:44
…nal components

- Removed ReactElement type annotations from various functional components across the application for cleaner code.
- Updated components such as ReactionListModal, ReactionUserTag, Reactions, ReadReceiptRow, ReadReceiptsModal, ReportMessageModal, ChatProvider, RoomProvider, and others to improve consistency and readability.
@tassoevan tassoevan force-pushed the refactor/prepare-types-for-react-19-17 branch from ee7cd95 to 1331170 Compare June 9, 2026 16:02
@tassoevan tassoevan added this to the 8.6.0 milestone Jun 9, 2026
@tassoevan tassoevan added the stat: QA assured Means it has been tested and approved by a company insider label Jun 9, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Jun 9, 2026
@tassoevan tassoevan requested a review from a team June 9, 2026 16:03
@tassoevan tassoevan marked this pull request as ready for review June 9, 2026 16:03

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

No issues found across 150 files

Note: This PR contains a large number of files. cubic only reviews up to 100 files per PR, so some files may not have been reviewed. cubic prioritizes the most important files to review.
On a pro plan you can use ultrareview for larger PRs.

Re-trigger cubic

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/meteor/client/views/teams/contextualBar/info/LeaveTeam/LeaveTeamModal/LeaveTeamModal.tsx (1)

29-36: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Avoid mutating previous state in setSelectedRooms updater.

delete selectedRooms[room._id] mutates the previous state object before returning a copy. Build the next state immutably from the previous state to avoid subtle state bugs.

Proposed fix
 	const onChangeRoomSelection = useCallback((room: Serialized<IRoom>) => {
 		setSelectedRooms((selectedRooms) => {
 			if (selectedRooms[room._id]) {
-				delete selectedRooms[room._id];
-				return { ...selectedRooms };
+				const { [room._id]: _removed, ...rest } = selectedRooms;
+				return rest;
 			}
 			return { ...selectedRooms, [room._id]: room };
 		});
 	}, []);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@apps/meteor/client/views/teams/contextualBar/info/LeaveTeam/LeaveTeamModal/LeaveTeamModal.tsx`
around lines 29 - 36, The updater in onChangeRoomSelection mutates the previous
state by calling delete on selectedRooms[room._id]; change it to build the next
state immutably: inside the setSelectedRooms callback, create a new object
(e.g., const next = { ...selectedRooms }) and either delete next[room._id] on
that copy before returning it, or use object destructuring to omit the key
(const { [room._id]: _, ...next } = selectedRooms; return next), ensuring you
reference onChangeRoomSelection, setSelectedRooms, selectedRooms and room._id
when applying the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@apps/meteor/client/views/teams/ChannelDesertionTable/ChannelDesertionTable.tsx`:
- Line 42: The current implementation mutates the incoming rooms array and uses
an asymmetric comparator causing unstable order; fix by sorting a shallow copy
(e.g., [...rooms]) instead of rooms in-place and replace the comparator logic in
the sort call so it handles missing values symmetrically: first check presence
of a[sortBy] vs b[sortBy] and return +direction / -direction to consistently
place missing values, otherwise call localeCompare on the two non-null strings
and multiply by direction; update the sort invocation that references rooms,
sortBy and direction in ChannelDesertionTable.tsx.
- Around line 60-68: The list rendering uses the array index as React key which
can cause state mismatches; update the ChannelDesertionTable render so
ChannelDesertionTableRow uses a stable unique key (use room._id) instead of
key={key}; locate the map over results and change key to something like
key={('_id' in room && room._id) ? room._id : `room-${indexOrFallback}`}
ensuring you reference the results variable, each room object, and
ChannelDesertionTableRow and keep the existing selectedRooms logic intact.

---

Outside diff comments:
In
`@apps/meteor/client/views/teams/contextualBar/info/LeaveTeam/LeaveTeamModal/LeaveTeamModal.tsx`:
- Around line 29-36: The updater in onChangeRoomSelection mutates the previous
state by calling delete on selectedRooms[room._id]; change it to build the next
state immutably: inside the setSelectedRooms callback, create a new object
(e.g., const next = { ...selectedRooms }) and either delete next[room._id] on
that copy before returning it, or use object destructuring to omit the key
(const { [room._id]: _, ...next } = selectedRooms; return next), ensuring you
reference onChangeRoomSelection, setSelectedRooms, selectedRooms and room._id
when applying the change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 06965fac-ac2e-482c-b0db-0685236b4923

📥 Commits

Reviewing files that changed from the base of the PR and between fbe2a62 and 1331170.

📒 Files selected for processing (150)
  • apps/meteor/client/views/room/E2EESetup/RoomE2EENotAllowed.tsx
  • apps/meteor/client/views/room/Header/FederatedRoomOriginServer.tsx
  • apps/meteor/client/views/room/Header/Header.tsx
  • apps/meteor/client/views/room/Header/HeaderIconWithRoom.tsx
  • apps/meteor/client/views/room/Header/Omnichannel/BackButton.tsx
  • apps/meteor/client/views/room/Header/Omnichannel/QuickActions/hooks/useDropdownVisibility.ts
  • apps/meteor/client/views/room/MessageList/MessageListErrorBoundary.tsx
  • apps/meteor/client/views/room/MessageList/providers/MessageHighlightProvider.tsx
  • apps/meteor/client/views/room/NotSubscribedRoom.tsx
  • apps/meteor/client/views/room/Room.tsx
  • apps/meteor/client/views/room/RoomNotFound.tsx
  • apps/meteor/client/views/room/RoomOpener.tsx
  • apps/meteor/client/views/room/RoomOpenerEmbedded.tsx
  • apps/meteor/client/views/room/RoomSkeleton.tsx
  • apps/meteor/client/views/room/ShareLocation/ShareLocationModal.tsx
  • apps/meteor/client/views/room/UserCard/UserCardWithData.tsx
  • apps/meteor/client/views/room/body/DropTargetOverlay.tsx
  • apps/meteor/client/views/room/body/JumpToRecentMessageButton.tsx
  • apps/meteor/client/views/room/body/LoadingMessagesIndicator.tsx
  • apps/meteor/client/views/room/body/RetentionPolicyWarning.tsx
  • apps/meteor/client/views/room/body/RoomBody.tsx
  • apps/meteor/client/views/room/body/RoomForeword/RoomForeword.tsx
  • apps/meteor/client/views/room/body/UnreadMessagesIndicator.tsx
  • apps/meteor/client/views/room/body/UploadProgress/UploadProgressIndicator.tsx
  • apps/meteor/client/views/room/composer/ComposerAirGappedRestricted.tsx
  • apps/meteor/client/views/room/composer/ComposerAnonymous.tsx
  • apps/meteor/client/views/room/composer/ComposerArchived.tsx
  • apps/meteor/client/views/room/composer/ComposerBlocked.tsx
  • apps/meteor/client/views/room/composer/ComposerBoxPopup.tsx
  • apps/meteor/client/views/room/composer/ComposerContainer.tsx
  • apps/meteor/client/views/room/composer/ComposerFederation/ComposerFederation.tsx
  • apps/meteor/client/views/room/composer/ComposerFederation/ComposerFederationDisabled.tsx
  • apps/meteor/client/views/room/composer/ComposerFederation/ComposerFederationInvalidVersion.tsx
  • apps/meteor/client/views/room/composer/ComposerFederation/ComposerFederationJoinRoomDisabled.tsx
  • apps/meteor/client/views/room/composer/ComposerJoinWithPassword.tsx
  • apps/meteor/client/views/room/composer/ComposerMessage.tsx
  • apps/meteor/client/views/room/composer/ComposerOmnichannel/ComposerOmnichannelInquiry.tsx
  • apps/meteor/client/views/room/composer/ComposerOmnichannel/ComposerOmnichannelJoin.tsx
  • apps/meteor/client/views/room/composer/ComposerOmnichannel/ComposerOmnichannelOnHold.tsx
  • apps/meteor/client/views/room/composer/ComposerReadOnly.tsx
  • apps/meteor/client/views/room/composer/ComposerSelectMessages.tsx
  • apps/meteor/client/views/room/composer/ComposerUserActionIndicator/ComposerUserActionIndicator.tsx
  • apps/meteor/client/views/room/composer/hooks/useComposerBoxPopup.ts
  • apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx
  • apps/meteor/client/views/room/composer/messageBox/MessageBoxHint.tsx
  • apps/meteor/client/views/room/composer/messageBox/MessageBoxReplies.tsx
  • apps/meteor/client/views/room/composer/messageBox/MessageBoxReply.tsx
  • apps/meteor/client/views/room/composer/messageBox/hooks/useMessageBoxAutoFocus.ts
  • apps/meteor/client/views/room/contexts/ComposerPopupContext.ts
  • apps/meteor/client/views/room/contextualBar/AutoTranslate/AutoTranslate.tsx
  • apps/meteor/client/views/room/contextualBar/AutoTranslate/AutoTranslateWithData.tsx
  • apps/meteor/client/views/room/contextualBar/BannedUsers/BannedUsers.tsx
  • apps/meteor/client/views/room/contextualBar/BannedUsers/BannedUsersItem.tsx
  • apps/meteor/client/views/room/contextualBar/Discussions/components/DiscussionsListItem.tsx
  • apps/meteor/client/views/room/contextualBar/MentionsTab.tsx
  • apps/meteor/client/views/room/contextualBar/MessageListTab.tsx
  • apps/meteor/client/views/room/contextualBar/NotificationPreferences/NotificationPreferences.tsx
  • apps/meteor/client/views/room/contextualBar/NotificationPreferences/NotificationPreferencesWithData.tsx
  • apps/meteor/client/views/room/contextualBar/NotificationPreferences/components/NotificationByDevice.tsx
  • apps/meteor/client/views/room/contextualBar/NotificationPreferences/components/NotificationPreference.tsx
  • apps/meteor/client/views/room/contextualBar/NotificationPreferences/components/NotificationToggle.tsx
  • apps/meteor/client/views/room/contextualBar/PinnedMessagesTab.tsx
  • apps/meteor/client/views/room/contextualBar/PruneMessages/PruneMessages.tsx
  • apps/meteor/client/views/room/contextualBar/PruneMessages/PruneMessagesDateTimeRow.tsx
  • apps/meteor/client/views/room/contextualBar/PruneMessages/PruneMessagesWithData.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/AddUsers/AddMatrixUsers/AddMatrixUsersModal.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/AddUsers/AddUsers.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/AddUsers/BannedUsersUnbanModal.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/EditInviteLink.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/InviteLink.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/InviteUsers.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/InviteUsersEdit.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/InviteUsersError.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/InviteUsersLoading.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/InviteUsersWithData.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/InviteUsersWrapper.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembers.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembersActions.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembersItem.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembersRow.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembersWithData.tsx
  • apps/meteor/client/views/room/contextualBar/Threads/components/ThreadListItem.tsx
  • apps/meteor/client/views/room/contextualBar/Threads/components/ThreadListMessage.tsx
  • apps/meteor/client/views/room/contextualBar/Threads/components/ThreadListMetrics.tsx
  • apps/meteor/client/views/room/contextualBar/Threads/components/ThreadMessageList.tsx
  • apps/meteor/client/views/room/contextualBar/Threads/components/ThreadSkeleton.tsx
  • apps/meteor/client/views/room/contextualBar/Threads/hooks/useThreadMainMessageQuery.ts
  • apps/meteor/client/views/room/contextualBar/UserInfo/UserInfoActions.tsx
  • apps/meteor/client/views/room/contextualBar/UserInfo/UserInfoWithData.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfBlockModal.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfConfigModal.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfList/VideoConfList.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfList/VideoConfListItem.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfPopups/VideoConfPopup/IncomingPopup.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfPopups/VideoConfPopup/OutgoingPopup.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfPopups/VideoConfPopup/StartCallPopup.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfPopups/VideoConfPopup/TimedVideoConfPopup.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfPopups/VideoConfPopup/VideoConfPopupRoomInfo.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfPopups/VideoConfPopups.tsx
  • apps/meteor/client/views/room/contextualBar/uikit/UiKitContextualBar.tsx
  • apps/meteor/client/views/room/hooks/useUserInfoActions/actions/useChangeModeratorAction.tsx
  • apps/meteor/client/views/room/hooks/useUserInfoActions/actions/useChangeOwnerAction.tsx
  • apps/meteor/client/views/room/layout/RoomLayout.tsx
  • apps/meteor/client/views/room/modals/E2EEModals/BaseDisableE2EEModal.tsx
  • apps/meteor/client/views/room/modals/E2EEModals/DisableE2EEModal.tsx
  • apps/meteor/client/views/room/modals/E2EEModals/EnableE2EEModal.tsx
  • apps/meteor/client/views/room/modals/E2EEModals/ResetKeysE2EEModal.tsx
  • apps/meteor/client/views/room/modals/FileUploadModal/FilePreview.tsx
  • apps/meteor/client/views/room/modals/FileUploadModal/FileUploadModal.tsx
  • apps/meteor/client/views/room/modals/FileUploadModal/GenericPreview.tsx
  • apps/meteor/client/views/room/modals/FileUploadModal/ImagePreview.tsx
  • apps/meteor/client/views/room/modals/FileUploadModal/MediaPreview.tsx
  • apps/meteor/client/views/room/modals/FileUploadModal/PreviewSkeleton.tsx
  • apps/meteor/client/views/room/modals/ForwardMessageModal/ForwardMessageModal.tsx
  • apps/meteor/client/views/room/modals/PinMessageModal/PinMessageModal.tsx
  • apps/meteor/client/views/room/modals/ReactionListModal/ReactionListModal.tsx
  • apps/meteor/client/views/room/modals/ReactionListModal/ReactionUserTag.tsx
  • apps/meteor/client/views/room/modals/ReactionListModal/Reactions.tsx
  • apps/meteor/client/views/room/modals/ReadReceiptsModal/ReadReceiptRow.tsx
  • apps/meteor/client/views/room/modals/ReadReceiptsModal/ReadReceiptsModal.tsx
  • apps/meteor/client/views/room/modals/ReportMessageModal/ReportMessageModal.tsx
  • apps/meteor/client/views/room/providers/ChatProvider.tsx
  • apps/meteor/client/views/room/providers/RoomProvider.tsx
  • apps/meteor/client/views/room/providers/hooks/useInstance.ts
  • apps/meteor/client/views/room/webdav/AddWebdavAccountModal.tsx
  • apps/meteor/client/views/room/webdav/SaveToWebdavModal.tsx
  • apps/meteor/client/views/room/webdav/WebdavFilePickerModal/FilePickerBreadcrumbs.tsx
  • apps/meteor/client/views/room/webdav/WebdavFilePickerModal/WebdavFilePickerGrid/WebdavFilePickerGrid.tsx
  • apps/meteor/client/views/room/webdav/WebdavFilePickerModal/WebdavFilePickerGrid/WebdavFilePickerGridItem.tsx
  • apps/meteor/client/views/room/webdav/WebdavFilePickerModal/WebdavFilePickerModal.tsx
  • apps/meteor/client/views/room/webdav/WebdavFilePickerModal/WebdavFilePickerTable.tsx
  • apps/meteor/client/views/root/AppErrorPage.tsx
  • apps/meteor/client/views/root/AppRoot.tsx
  • apps/meteor/client/views/root/MainLayout/AuthenticationCheck.tsx
  • apps/meteor/client/views/root/MainLayout/EmbeddedPreload.tsx
  • apps/meteor/client/views/root/MainLayout/LayoutWithSidebar.tsx
  • apps/meteor/client/views/root/MainLayout/LoginPage.tsx
  • apps/meteor/client/views/root/MainLayout/MainLayout.tsx
  • apps/meteor/client/views/root/MainLayout/PasswordChangeCheck.tsx
  • apps/meteor/client/views/root/MainLayout/Preload.tsx
  • apps/meteor/client/views/root/MainLayout/TwoFactorAuthSetupCheck.tsx
  • apps/meteor/client/views/root/MainLayout/UsernameCheck.tsx
  • apps/meteor/client/views/teams/ChannelDesertionTable/ChannelDesertionTable.tsx
  • apps/meteor/client/views/teams/ChannelDesertionTable/ChannelDesertionTableRow.tsx
  • apps/meteor/client/views/teams/contextualBar/info/DeleteTeam/DeleteTeamModalWithRooms.tsx
  • apps/meteor/client/views/teams/contextualBar/info/LeaveTeam/LeaveTeamModal/LeaveTeamModal.tsx
  • apps/meteor/client/views/teams/contextualBar/info/LeaveTeam/LeaveTeamModal/LeaveTeamModalChannels.tsx
  • apps/meteor/client/views/teams/contextualBar/info/LeaveTeam/LeaveTeamModal/LeaveTeamModalConfirmation.tsx
  • apps/meteor/client/views/teams/contextualBar/info/LeaveTeam/LeaveTeamWithData.tsx
  • apps/meteor/client/views/teams/contextualBar/info/TeamsInfo.tsx
📜 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). (7)
  • GitHub Check: 🔎 Code Check / TypeScript
  • GitHub Check: 🔎 Code Check / Code Lint
  • GitHub Check: 🔨 Test Storybook / Test Storybook
  • GitHub Check: 🔨 Test Unit / Unit Tests
  • GitHub Check: 📦 Meteor Build (coverage)
  • 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/contextualBar/Threads/components/ThreadSkeleton.tsx
  • apps/meteor/client/views/room/composer/ComposerFederation/ComposerFederationInvalidVersion.tsx
  • apps/meteor/client/views/room/RoomSkeleton.tsx
  • apps/meteor/client/views/room/modals/ReactionListModal/ReactionUserTag.tsx
  • apps/meteor/client/views/room/contextualBar/uikit/UiKitContextualBar.tsx
  • apps/meteor/client/views/room/body/LoadingMessagesIndicator.tsx
  • apps/meteor/client/views/room/composer/ComposerBlocked.tsx
  • apps/meteor/client/views/room/Header/Omnichannel/QuickActions/hooks/useDropdownVisibility.ts
  • apps/meteor/client/views/room/modals/E2EEModals/EnableE2EEModal.tsx
  • apps/meteor/client/views/room/providers/hooks/useInstance.ts
  • apps/meteor/client/views/room/webdav/WebdavFilePickerModal/WebdavFilePickerGrid/WebdavFilePickerGridItem.tsx
  • apps/meteor/client/views/room/webdav/WebdavFilePickerModal/WebdavFilePickerGrid/WebdavFilePickerGrid.tsx
  • apps/meteor/client/views/room/Header/Omnichannel/BackButton.tsx
  • apps/meteor/client/views/room/contextualBar/NotificationPreferences/components/NotificationByDevice.tsx
  • apps/meteor/client/views/room/modals/FileUploadModal/PreviewSkeleton.tsx
  • apps/meteor/client/views/room/modals/ReadReceiptsModal/ReadReceiptRow.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/InviteLink.tsx
  • apps/meteor/client/views/root/MainLayout/MainLayout.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembersRow.tsx
  • apps/meteor/client/views/room/contextualBar/NotificationPreferences/components/NotificationToggle.tsx
  • apps/meteor/client/views/room/Header/FederatedRoomOriginServer.tsx
  • apps/meteor/client/views/root/MainLayout/AuthenticationCheck.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembersItem.tsx
  • apps/meteor/client/views/room/contextualBar/NotificationPreferences/components/NotificationPreference.tsx
  • apps/meteor/client/views/room/body/RetentionPolicyWarning.tsx
  • apps/meteor/client/views/root/MainLayout/TwoFactorAuthSetupCheck.tsx
  • apps/meteor/client/views/room/composer/ComposerFederation/ComposerFederationJoinRoomDisabled.tsx
  • apps/meteor/client/views/root/AppErrorPage.tsx
  • apps/meteor/client/views/room/webdav/WebdavFilePickerModal/WebdavFilePickerTable.tsx
  • apps/meteor/client/views/room/body/DropTargetOverlay.tsx
  • apps/meteor/client/views/room/contextualBar/PruneMessages/PruneMessagesDateTimeRow.tsx
  • apps/meteor/client/views/room/MessageList/providers/MessageHighlightProvider.tsx
  • apps/meteor/client/views/room/modals/ReactionListModal/ReactionListModal.tsx
  • apps/meteor/client/views/room/modals/FileUploadModal/MediaPreview.tsx
  • apps/meteor/client/views/root/MainLayout/UsernameCheck.tsx
  • apps/meteor/client/views/room/modals/FileUploadModal/FileUploadModal.tsx
  • apps/meteor/client/views/room/composer/messageBox/hooks/useMessageBoxAutoFocus.ts
  • apps/meteor/client/views/room/contextualBar/Threads/hooks/useThreadMainMessageQuery.ts
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfBlockModal.tsx
  • apps/meteor/client/views/room/contexts/ComposerPopupContext.ts
  • apps/meteor/client/views/room/modals/FileUploadModal/ImagePreview.tsx
  • apps/meteor/client/views/root/MainLayout/PasswordChangeCheck.tsx
  • apps/meteor/client/views/room/modals/FileUploadModal/FilePreview.tsx
  • apps/meteor/client/views/room/MessageList/MessageListErrorBoundary.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembers.tsx
  • apps/meteor/client/views/room/modals/FileUploadModal/GenericPreview.tsx
  • apps/meteor/client/views/room/RoomOpener.tsx
  • apps/meteor/client/views/room/contextualBar/MessageListTab.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/InviteUsersWrapper.tsx
  • apps/meteor/client/views/room/contextualBar/AutoTranslate/AutoTranslateWithData.tsx
  • apps/meteor/client/views/room/contextualBar/UserInfo/UserInfoActions.tsx
  • apps/meteor/client/views/root/MainLayout/LoginPage.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfList/VideoConfListItem.tsx
  • apps/meteor/client/views/room/Room.tsx
  • apps/meteor/client/views/teams/contextualBar/info/TeamsInfo.tsx
  • apps/meteor/client/views/room/composer/messageBox/MessageBoxReplies.tsx
  • apps/meteor/client/views/room/composer/ComposerFederation/ComposerFederation.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/InviteUsers.tsx
  • apps/meteor/client/views/room/composer/ComposerFederation/ComposerFederationDisabled.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/InviteUsersError.tsx
  • apps/meteor/client/views/room/body/JumpToRecentMessageButton.tsx
  • apps/meteor/client/views/room/modals/ReactionListModal/Reactions.tsx
  • apps/meteor/client/views/teams/contextualBar/info/LeaveTeam/LeaveTeamModal/LeaveTeamModalConfirmation.tsx
  • apps/meteor/client/views/room/webdav/WebdavFilePickerModal/WebdavFilePickerModal.tsx
  • apps/meteor/client/views/room/composer/ComposerAnonymous.tsx
  • apps/meteor/client/views/room/composer/ComposerContainer.tsx
  • apps/meteor/client/views/root/MainLayout/EmbeddedPreload.tsx
  • apps/meteor/client/views/room/contextualBar/Threads/components/ThreadListItem.tsx
  • apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx
  • apps/meteor/client/views/room/composer/ComposerOmnichannel/ComposerOmnichannelJoin.tsx
  • apps/meteor/client/views/root/MainLayout/LayoutWithSidebar.tsx
  • apps/meteor/client/views/room/composer/ComposerArchived.tsx
  • apps/meteor/client/views/room/contextualBar/MentionsTab.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/AddUsers/AddMatrixUsers/AddMatrixUsersModal.tsx
  • apps/meteor/client/views/room/contextualBar/AutoTranslate/AutoTranslate.tsx
  • apps/meteor/client/views/room/RoomNotFound.tsx
  • apps/meteor/client/views/room/composer/hooks/useComposerBoxPopup.ts
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfConfigModal.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembersActions.tsx
  • apps/meteor/client/views/room/body/RoomForeword/RoomForeword.tsx
  • apps/meteor/client/views/room/layout/RoomLayout.tsx
  • apps/meteor/client/views/room/composer/ComposerMessage.tsx
  • apps/meteor/client/views/room/composer/messageBox/MessageBoxReply.tsx
  • apps/meteor/client/views/room/contextualBar/NotificationPreferences/NotificationPreferences.tsx
  • apps/meteor/client/views/room/body/RoomBody.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/InviteUsersEdit.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfPopups/VideoConfPopup/VideoConfPopupRoomInfo.tsx
  • apps/meteor/client/views/room/modals/E2EEModals/ResetKeysE2EEModal.tsx
  • apps/meteor/client/views/room/composer/ComposerUserActionIndicator/ComposerUserActionIndicator.tsx
  • apps/meteor/client/views/room/body/UnreadMessagesIndicator.tsx
  • apps/meteor/client/views/room/contextualBar/Threads/components/ThreadListMessage.tsx
  • apps/meteor/client/views/room/contextualBar/Discussions/components/DiscussionsListItem.tsx
  • apps/meteor/client/views/room/composer/ComposerOmnichannel/ComposerOmnichannelInquiry.tsx
  • apps/meteor/client/views/room/providers/RoomProvider.tsx
  • apps/meteor/client/views/room/NotSubscribedRoom.tsx
  • apps/meteor/client/views/teams/ChannelDesertionTable/ChannelDesertionTableRow.tsx
  • apps/meteor/client/views/room/providers/ChatProvider.tsx
  • apps/meteor/client/views/root/MainLayout/Preload.tsx
  • apps/meteor/client/views/room/webdav/WebdavFilePickerModal/FilePickerBreadcrumbs.tsx
  • apps/meteor/client/views/room/modals/ReadReceiptsModal/ReadReceiptsModal.tsx
  • apps/meteor/client/views/teams/contextualBar/info/LeaveTeam/LeaveTeamModal/LeaveTeamModalChannels.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfPopups/VideoConfPopups.tsx
  • apps/meteor/client/views/room/contextualBar/BannedUsers/BannedUsersItem.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/AddUsers/AddUsers.tsx
  • apps/meteor/client/views/room/composer/ComposerJoinWithPassword.tsx
  • apps/meteor/client/views/root/AppRoot.tsx
  • apps/meteor/client/views/room/Header/HeaderIconWithRoom.tsx
  • apps/meteor/client/views/room/webdav/SaveToWebdavModal.tsx
  • apps/meteor/client/views/room/ShareLocation/ShareLocationModal.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/InviteUsersWithData.tsx
  • apps/meteor/client/views/room/modals/E2EEModals/DisableE2EEModal.tsx
  • apps/meteor/client/views/room/modals/PinMessageModal/PinMessageModal.tsx
  • apps/meteor/client/views/room/contextualBar/PruneMessages/PruneMessages.tsx
  • apps/meteor/client/views/room/contextualBar/Threads/components/ThreadMessageList.tsx
  • apps/meteor/client/views/room/hooks/useUserInfoActions/actions/useChangeOwnerAction.tsx
  • apps/meteor/client/views/room/contextualBar/PinnedMessagesTab.tsx
  • apps/meteor/client/views/room/contextualBar/Threads/components/ThreadListMetrics.tsx
  • apps/meteor/client/views/room/E2EESetup/RoomE2EENotAllowed.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfList/VideoConfList.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembersWithData.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfPopups/VideoConfPopup/IncomingPopup.tsx
  • apps/meteor/client/views/room/composer/ComposerReadOnly.tsx
  • apps/meteor/client/views/room/Header/Header.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/AddUsers/BannedUsersUnbanModal.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/InviteUsersLoading.tsx
  • apps/meteor/client/views/room/composer/ComposerBoxPopup.tsx
  • apps/meteor/client/views/room/composer/ComposerOmnichannel/ComposerOmnichannelOnHold.tsx
  • apps/meteor/client/views/room/RoomOpenerEmbedded.tsx
  • apps/meteor/client/views/room/composer/ComposerSelectMessages.tsx
  • apps/meteor/client/views/room/contextualBar/NotificationPreferences/NotificationPreferencesWithData.tsx
  • apps/meteor/client/views/room/contextualBar/PruneMessages/PruneMessagesWithData.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfPopups/VideoConfPopup/StartCallPopup.tsx
  • apps/meteor/client/views/teams/contextualBar/info/LeaveTeam/LeaveTeamWithData.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/EditInviteLink.tsx
  • apps/meteor/client/views/teams/ChannelDesertionTable/ChannelDesertionTable.tsx
  • apps/meteor/client/views/room/hooks/useUserInfoActions/actions/useChangeModeratorAction.tsx
  • apps/meteor/client/views/room/contextualBar/BannedUsers/BannedUsers.tsx
  • apps/meteor/client/views/teams/contextualBar/info/DeleteTeam/DeleteTeamModalWithRooms.tsx
  • apps/meteor/client/views/room/composer/messageBox/MessageBoxHint.tsx
  • apps/meteor/client/views/room/modals/E2EEModals/BaseDisableE2EEModal.tsx
  • apps/meteor/client/views/room/body/UploadProgress/UploadProgressIndicator.tsx
  • apps/meteor/client/views/room/webdav/AddWebdavAccountModal.tsx
  • apps/meteor/client/views/teams/contextualBar/info/LeaveTeam/LeaveTeamModal/LeaveTeamModal.tsx
  • apps/meteor/client/views/room/contextualBar/UserInfo/UserInfoWithData.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfPopups/VideoConfPopup/TimedVideoConfPopup.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfPopups/VideoConfPopup/OutgoingPopup.tsx
  • apps/meteor/client/views/room/modals/ForwardMessageModal/ForwardMessageModal.tsx
  • apps/meteor/client/views/room/UserCard/UserCardWithData.tsx
  • apps/meteor/client/views/room/modals/ReportMessageModal/ReportMessageModal.tsx
  • apps/meteor/client/views/room/composer/ComposerAirGappedRestricted.tsx
🧠 Learnings (6)
📚 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/contextualBar/Threads/components/ThreadSkeleton.tsx
  • apps/meteor/client/views/room/composer/ComposerFederation/ComposerFederationInvalidVersion.tsx
  • apps/meteor/client/views/room/RoomSkeleton.tsx
  • apps/meteor/client/views/room/modals/ReactionListModal/ReactionUserTag.tsx
  • apps/meteor/client/views/room/contextualBar/uikit/UiKitContextualBar.tsx
  • apps/meteor/client/views/room/body/LoadingMessagesIndicator.tsx
  • apps/meteor/client/views/room/composer/ComposerBlocked.tsx
  • apps/meteor/client/views/room/modals/E2EEModals/EnableE2EEModal.tsx
  • apps/meteor/client/views/room/webdav/WebdavFilePickerModal/WebdavFilePickerGrid/WebdavFilePickerGridItem.tsx
  • apps/meteor/client/views/room/webdav/WebdavFilePickerModal/WebdavFilePickerGrid/WebdavFilePickerGrid.tsx
  • apps/meteor/client/views/room/Header/Omnichannel/BackButton.tsx
  • apps/meteor/client/views/room/contextualBar/NotificationPreferences/components/NotificationByDevice.tsx
  • apps/meteor/client/views/room/modals/FileUploadModal/PreviewSkeleton.tsx
  • apps/meteor/client/views/room/modals/ReadReceiptsModal/ReadReceiptRow.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/InviteLink.tsx
  • apps/meteor/client/views/root/MainLayout/MainLayout.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembersRow.tsx
  • apps/meteor/client/views/room/contextualBar/NotificationPreferences/components/NotificationToggle.tsx
  • apps/meteor/client/views/room/Header/FederatedRoomOriginServer.tsx
  • apps/meteor/client/views/root/MainLayout/AuthenticationCheck.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembersItem.tsx
  • apps/meteor/client/views/room/contextualBar/NotificationPreferences/components/NotificationPreference.tsx
  • apps/meteor/client/views/room/body/RetentionPolicyWarning.tsx
  • apps/meteor/client/views/root/MainLayout/TwoFactorAuthSetupCheck.tsx
  • apps/meteor/client/views/room/composer/ComposerFederation/ComposerFederationJoinRoomDisabled.tsx
  • apps/meteor/client/views/root/AppErrorPage.tsx
  • apps/meteor/client/views/room/webdav/WebdavFilePickerModal/WebdavFilePickerTable.tsx
  • apps/meteor/client/views/room/body/DropTargetOverlay.tsx
  • apps/meteor/client/views/room/contextualBar/PruneMessages/PruneMessagesDateTimeRow.tsx
  • apps/meteor/client/views/room/MessageList/providers/MessageHighlightProvider.tsx
  • apps/meteor/client/views/room/modals/ReactionListModal/ReactionListModal.tsx
  • apps/meteor/client/views/room/modals/FileUploadModal/MediaPreview.tsx
  • apps/meteor/client/views/root/MainLayout/UsernameCheck.tsx
  • apps/meteor/client/views/room/modals/FileUploadModal/FileUploadModal.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfBlockModal.tsx
  • apps/meteor/client/views/room/modals/FileUploadModal/ImagePreview.tsx
  • apps/meteor/client/views/root/MainLayout/PasswordChangeCheck.tsx
  • apps/meteor/client/views/room/modals/FileUploadModal/FilePreview.tsx
  • apps/meteor/client/views/room/MessageList/MessageListErrorBoundary.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembers.tsx
  • apps/meteor/client/views/room/modals/FileUploadModal/GenericPreview.tsx
  • apps/meteor/client/views/room/RoomOpener.tsx
  • apps/meteor/client/views/room/contextualBar/MessageListTab.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/InviteUsersWrapper.tsx
  • apps/meteor/client/views/room/contextualBar/AutoTranslate/AutoTranslateWithData.tsx
  • apps/meteor/client/views/room/contextualBar/UserInfo/UserInfoActions.tsx
  • apps/meteor/client/views/root/MainLayout/LoginPage.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfList/VideoConfListItem.tsx
  • apps/meteor/client/views/room/Room.tsx
  • apps/meteor/client/views/teams/contextualBar/info/TeamsInfo.tsx
  • apps/meteor/client/views/room/composer/messageBox/MessageBoxReplies.tsx
  • apps/meteor/client/views/room/composer/ComposerFederation/ComposerFederation.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/InviteUsers.tsx
  • apps/meteor/client/views/room/composer/ComposerFederation/ComposerFederationDisabled.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/InviteUsersError.tsx
  • apps/meteor/client/views/room/body/JumpToRecentMessageButton.tsx
  • apps/meteor/client/views/room/modals/ReactionListModal/Reactions.tsx
  • apps/meteor/client/views/teams/contextualBar/info/LeaveTeam/LeaveTeamModal/LeaveTeamModalConfirmation.tsx
  • apps/meteor/client/views/room/webdav/WebdavFilePickerModal/WebdavFilePickerModal.tsx
  • apps/meteor/client/views/room/composer/ComposerAnonymous.tsx
  • apps/meteor/client/views/room/composer/ComposerContainer.tsx
  • apps/meteor/client/views/root/MainLayout/EmbeddedPreload.tsx
  • apps/meteor/client/views/room/contextualBar/Threads/components/ThreadListItem.tsx
  • apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx
  • apps/meteor/client/views/room/composer/ComposerOmnichannel/ComposerOmnichannelJoin.tsx
  • apps/meteor/client/views/root/MainLayout/LayoutWithSidebar.tsx
  • apps/meteor/client/views/room/composer/ComposerArchived.tsx
  • apps/meteor/client/views/room/contextualBar/MentionsTab.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/AddUsers/AddMatrixUsers/AddMatrixUsersModal.tsx
  • apps/meteor/client/views/room/contextualBar/AutoTranslate/AutoTranslate.tsx
  • apps/meteor/client/views/room/RoomNotFound.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfConfigModal.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembersActions.tsx
  • apps/meteor/client/views/room/body/RoomForeword/RoomForeword.tsx
  • apps/meteor/client/views/room/layout/RoomLayout.tsx
  • apps/meteor/client/views/room/composer/ComposerMessage.tsx
  • apps/meteor/client/views/room/composer/messageBox/MessageBoxReply.tsx
  • apps/meteor/client/views/room/contextualBar/NotificationPreferences/NotificationPreferences.tsx
  • apps/meteor/client/views/room/body/RoomBody.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/InviteUsersEdit.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfPopups/VideoConfPopup/VideoConfPopupRoomInfo.tsx
  • apps/meteor/client/views/room/modals/E2EEModals/ResetKeysE2EEModal.tsx
  • apps/meteor/client/views/room/composer/ComposerUserActionIndicator/ComposerUserActionIndicator.tsx
  • apps/meteor/client/views/room/body/UnreadMessagesIndicator.tsx
  • apps/meteor/client/views/room/contextualBar/Threads/components/ThreadListMessage.tsx
  • apps/meteor/client/views/room/contextualBar/Discussions/components/DiscussionsListItem.tsx
  • apps/meteor/client/views/room/composer/ComposerOmnichannel/ComposerOmnichannelInquiry.tsx
  • apps/meteor/client/views/room/providers/RoomProvider.tsx
  • apps/meteor/client/views/room/NotSubscribedRoom.tsx
  • apps/meteor/client/views/teams/ChannelDesertionTable/ChannelDesertionTableRow.tsx
  • apps/meteor/client/views/room/providers/ChatProvider.tsx
  • apps/meteor/client/views/root/MainLayout/Preload.tsx
  • apps/meteor/client/views/room/webdav/WebdavFilePickerModal/FilePickerBreadcrumbs.tsx
  • apps/meteor/client/views/room/modals/ReadReceiptsModal/ReadReceiptsModal.tsx
  • apps/meteor/client/views/teams/contextualBar/info/LeaveTeam/LeaveTeamModal/LeaveTeamModalChannels.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfPopups/VideoConfPopups.tsx
  • apps/meteor/client/views/room/contextualBar/BannedUsers/BannedUsersItem.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/AddUsers/AddUsers.tsx
  • apps/meteor/client/views/room/composer/ComposerJoinWithPassword.tsx
  • apps/meteor/client/views/root/AppRoot.tsx
  • apps/meteor/client/views/room/Header/HeaderIconWithRoom.tsx
  • apps/meteor/client/views/room/webdav/SaveToWebdavModal.tsx
  • apps/meteor/client/views/room/ShareLocation/ShareLocationModal.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/InviteUsersWithData.tsx
  • apps/meteor/client/views/room/modals/E2EEModals/DisableE2EEModal.tsx
  • apps/meteor/client/views/room/modals/PinMessageModal/PinMessageModal.tsx
  • apps/meteor/client/views/room/contextualBar/PruneMessages/PruneMessages.tsx
  • apps/meteor/client/views/room/contextualBar/Threads/components/ThreadMessageList.tsx
  • apps/meteor/client/views/room/hooks/useUserInfoActions/actions/useChangeOwnerAction.tsx
  • apps/meteor/client/views/room/contextualBar/PinnedMessagesTab.tsx
  • apps/meteor/client/views/room/contextualBar/Threads/components/ThreadListMetrics.tsx
  • apps/meteor/client/views/room/E2EESetup/RoomE2EENotAllowed.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfList/VideoConfList.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembersWithData.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfPopups/VideoConfPopup/IncomingPopup.tsx
  • apps/meteor/client/views/room/composer/ComposerReadOnly.tsx
  • apps/meteor/client/views/room/Header/Header.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/AddUsers/BannedUsersUnbanModal.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/InviteUsersLoading.tsx
  • apps/meteor/client/views/room/composer/ComposerBoxPopup.tsx
  • apps/meteor/client/views/room/composer/ComposerOmnichannel/ComposerOmnichannelOnHold.tsx
  • apps/meteor/client/views/room/RoomOpenerEmbedded.tsx
  • apps/meteor/client/views/room/composer/ComposerSelectMessages.tsx
  • apps/meteor/client/views/room/contextualBar/NotificationPreferences/NotificationPreferencesWithData.tsx
  • apps/meteor/client/views/room/contextualBar/PruneMessages/PruneMessagesWithData.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfPopups/VideoConfPopup/StartCallPopup.tsx
  • apps/meteor/client/views/teams/contextualBar/info/LeaveTeam/LeaveTeamWithData.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/EditInviteLink.tsx
  • apps/meteor/client/views/teams/ChannelDesertionTable/ChannelDesertionTable.tsx
  • apps/meteor/client/views/room/hooks/useUserInfoActions/actions/useChangeModeratorAction.tsx
  • apps/meteor/client/views/room/contextualBar/BannedUsers/BannedUsers.tsx
  • apps/meteor/client/views/teams/contextualBar/info/DeleteTeam/DeleteTeamModalWithRooms.tsx
  • apps/meteor/client/views/room/composer/messageBox/MessageBoxHint.tsx
  • apps/meteor/client/views/room/modals/E2EEModals/BaseDisableE2EEModal.tsx
  • apps/meteor/client/views/room/body/UploadProgress/UploadProgressIndicator.tsx
  • apps/meteor/client/views/room/webdav/AddWebdavAccountModal.tsx
  • apps/meteor/client/views/teams/contextualBar/info/LeaveTeam/LeaveTeamModal/LeaveTeamModal.tsx
  • apps/meteor/client/views/room/contextualBar/UserInfo/UserInfoWithData.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfPopups/VideoConfPopup/TimedVideoConfPopup.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfPopups/VideoConfPopup/OutgoingPopup.tsx
  • apps/meteor/client/views/room/modals/ForwardMessageModal/ForwardMessageModal.tsx
  • apps/meteor/client/views/room/UserCard/UserCardWithData.tsx
  • apps/meteor/client/views/room/modals/ReportMessageModal/ReportMessageModal.tsx
  • apps/meteor/client/views/room/composer/ComposerAirGappedRestricted.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/contextualBar/Threads/components/ThreadSkeleton.tsx
  • apps/meteor/client/views/room/composer/ComposerFederation/ComposerFederationInvalidVersion.tsx
  • apps/meteor/client/views/room/RoomSkeleton.tsx
  • apps/meteor/client/views/room/modals/ReactionListModal/ReactionUserTag.tsx
  • apps/meteor/client/views/room/contextualBar/uikit/UiKitContextualBar.tsx
  • apps/meteor/client/views/room/body/LoadingMessagesIndicator.tsx
  • apps/meteor/client/views/room/composer/ComposerBlocked.tsx
  • apps/meteor/client/views/room/Header/Omnichannel/QuickActions/hooks/useDropdownVisibility.ts
  • apps/meteor/client/views/room/modals/E2EEModals/EnableE2EEModal.tsx
  • apps/meteor/client/views/room/providers/hooks/useInstance.ts
  • apps/meteor/client/views/room/webdav/WebdavFilePickerModal/WebdavFilePickerGrid/WebdavFilePickerGridItem.tsx
  • apps/meteor/client/views/room/webdav/WebdavFilePickerModal/WebdavFilePickerGrid/WebdavFilePickerGrid.tsx
  • apps/meteor/client/views/room/Header/Omnichannel/BackButton.tsx
  • apps/meteor/client/views/room/contextualBar/NotificationPreferences/components/NotificationByDevice.tsx
  • apps/meteor/client/views/room/modals/FileUploadModal/PreviewSkeleton.tsx
  • apps/meteor/client/views/room/modals/ReadReceiptsModal/ReadReceiptRow.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/InviteLink.tsx
  • apps/meteor/client/views/root/MainLayout/MainLayout.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembersRow.tsx
  • apps/meteor/client/views/room/contextualBar/NotificationPreferences/components/NotificationToggle.tsx
  • apps/meteor/client/views/room/Header/FederatedRoomOriginServer.tsx
  • apps/meteor/client/views/root/MainLayout/AuthenticationCheck.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembersItem.tsx
  • apps/meteor/client/views/room/contextualBar/NotificationPreferences/components/NotificationPreference.tsx
  • apps/meteor/client/views/room/body/RetentionPolicyWarning.tsx
  • apps/meteor/client/views/root/MainLayout/TwoFactorAuthSetupCheck.tsx
  • apps/meteor/client/views/room/composer/ComposerFederation/ComposerFederationJoinRoomDisabled.tsx
  • apps/meteor/client/views/root/AppErrorPage.tsx
  • apps/meteor/client/views/room/webdav/WebdavFilePickerModal/WebdavFilePickerTable.tsx
  • apps/meteor/client/views/room/body/DropTargetOverlay.tsx
  • apps/meteor/client/views/room/contextualBar/PruneMessages/PruneMessagesDateTimeRow.tsx
  • apps/meteor/client/views/room/MessageList/providers/MessageHighlightProvider.tsx
  • apps/meteor/client/views/room/modals/ReactionListModal/ReactionListModal.tsx
  • apps/meteor/client/views/room/modals/FileUploadModal/MediaPreview.tsx
  • apps/meteor/client/views/root/MainLayout/UsernameCheck.tsx
  • apps/meteor/client/views/room/modals/FileUploadModal/FileUploadModal.tsx
  • apps/meteor/client/views/room/composer/messageBox/hooks/useMessageBoxAutoFocus.ts
  • apps/meteor/client/views/room/contextualBar/Threads/hooks/useThreadMainMessageQuery.ts
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfBlockModal.tsx
  • apps/meteor/client/views/room/contexts/ComposerPopupContext.ts
  • apps/meteor/client/views/room/modals/FileUploadModal/ImagePreview.tsx
  • apps/meteor/client/views/root/MainLayout/PasswordChangeCheck.tsx
  • apps/meteor/client/views/room/modals/FileUploadModal/FilePreview.tsx
  • apps/meteor/client/views/room/MessageList/MessageListErrorBoundary.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembers.tsx
  • apps/meteor/client/views/room/modals/FileUploadModal/GenericPreview.tsx
  • apps/meteor/client/views/room/RoomOpener.tsx
  • apps/meteor/client/views/room/contextualBar/MessageListTab.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/InviteUsersWrapper.tsx
  • apps/meteor/client/views/room/contextualBar/AutoTranslate/AutoTranslateWithData.tsx
  • apps/meteor/client/views/room/contextualBar/UserInfo/UserInfoActions.tsx
  • apps/meteor/client/views/root/MainLayout/LoginPage.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfList/VideoConfListItem.tsx
  • apps/meteor/client/views/room/Room.tsx
  • apps/meteor/client/views/teams/contextualBar/info/TeamsInfo.tsx
  • apps/meteor/client/views/room/composer/messageBox/MessageBoxReplies.tsx
  • apps/meteor/client/views/room/composer/ComposerFederation/ComposerFederation.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/InviteUsers.tsx
  • apps/meteor/client/views/room/composer/ComposerFederation/ComposerFederationDisabled.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/InviteUsersError.tsx
  • apps/meteor/client/views/room/body/JumpToRecentMessageButton.tsx
  • apps/meteor/client/views/room/modals/ReactionListModal/Reactions.tsx
  • apps/meteor/client/views/teams/contextualBar/info/LeaveTeam/LeaveTeamModal/LeaveTeamModalConfirmation.tsx
  • apps/meteor/client/views/room/webdav/WebdavFilePickerModal/WebdavFilePickerModal.tsx
  • apps/meteor/client/views/room/composer/ComposerAnonymous.tsx
  • apps/meteor/client/views/room/composer/ComposerContainer.tsx
  • apps/meteor/client/views/root/MainLayout/EmbeddedPreload.tsx
  • apps/meteor/client/views/room/contextualBar/Threads/components/ThreadListItem.tsx
  • apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx
  • apps/meteor/client/views/room/composer/ComposerOmnichannel/ComposerOmnichannelJoin.tsx
  • apps/meteor/client/views/root/MainLayout/LayoutWithSidebar.tsx
  • apps/meteor/client/views/room/composer/ComposerArchived.tsx
  • apps/meteor/client/views/room/contextualBar/MentionsTab.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/AddUsers/AddMatrixUsers/AddMatrixUsersModal.tsx
  • apps/meteor/client/views/room/contextualBar/AutoTranslate/AutoTranslate.tsx
  • apps/meteor/client/views/room/RoomNotFound.tsx
  • apps/meteor/client/views/room/composer/hooks/useComposerBoxPopup.ts
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfConfigModal.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembersActions.tsx
  • apps/meteor/client/views/room/body/RoomForeword/RoomForeword.tsx
  • apps/meteor/client/views/room/layout/RoomLayout.tsx
  • apps/meteor/client/views/room/composer/ComposerMessage.tsx
  • apps/meteor/client/views/room/composer/messageBox/MessageBoxReply.tsx
  • apps/meteor/client/views/room/contextualBar/NotificationPreferences/NotificationPreferences.tsx
  • apps/meteor/client/views/room/body/RoomBody.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/InviteUsersEdit.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfPopups/VideoConfPopup/VideoConfPopupRoomInfo.tsx
  • apps/meteor/client/views/room/modals/E2EEModals/ResetKeysE2EEModal.tsx
  • apps/meteor/client/views/room/composer/ComposerUserActionIndicator/ComposerUserActionIndicator.tsx
  • apps/meteor/client/views/room/body/UnreadMessagesIndicator.tsx
  • apps/meteor/client/views/room/contextualBar/Threads/components/ThreadListMessage.tsx
  • apps/meteor/client/views/room/contextualBar/Discussions/components/DiscussionsListItem.tsx
  • apps/meteor/client/views/room/composer/ComposerOmnichannel/ComposerOmnichannelInquiry.tsx
  • apps/meteor/client/views/room/providers/RoomProvider.tsx
  • apps/meteor/client/views/room/NotSubscribedRoom.tsx
  • apps/meteor/client/views/teams/ChannelDesertionTable/ChannelDesertionTableRow.tsx
  • apps/meteor/client/views/room/providers/ChatProvider.tsx
  • apps/meteor/client/views/root/MainLayout/Preload.tsx
  • apps/meteor/client/views/room/webdav/WebdavFilePickerModal/FilePickerBreadcrumbs.tsx
  • apps/meteor/client/views/room/modals/ReadReceiptsModal/ReadReceiptsModal.tsx
  • apps/meteor/client/views/teams/contextualBar/info/LeaveTeam/LeaveTeamModal/LeaveTeamModalChannels.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfPopups/VideoConfPopups.tsx
  • apps/meteor/client/views/room/contextualBar/BannedUsers/BannedUsersItem.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/AddUsers/AddUsers.tsx
  • apps/meteor/client/views/room/composer/ComposerJoinWithPassword.tsx
  • apps/meteor/client/views/root/AppRoot.tsx
  • apps/meteor/client/views/room/Header/HeaderIconWithRoom.tsx
  • apps/meteor/client/views/room/webdav/SaveToWebdavModal.tsx
  • apps/meteor/client/views/room/ShareLocation/ShareLocationModal.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/InviteUsersWithData.tsx
  • apps/meteor/client/views/room/modals/E2EEModals/DisableE2EEModal.tsx
  • apps/meteor/client/views/room/modals/PinMessageModal/PinMessageModal.tsx
  • apps/meteor/client/views/room/contextualBar/PruneMessages/PruneMessages.tsx
  • apps/meteor/client/views/room/contextualBar/Threads/components/ThreadMessageList.tsx
  • apps/meteor/client/views/room/hooks/useUserInfoActions/actions/useChangeOwnerAction.tsx
  • apps/meteor/client/views/room/contextualBar/PinnedMessagesTab.tsx
  • apps/meteor/client/views/room/contextualBar/Threads/components/ThreadListMetrics.tsx
  • apps/meteor/client/views/room/E2EESetup/RoomE2EENotAllowed.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfList/VideoConfList.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembersWithData.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfPopups/VideoConfPopup/IncomingPopup.tsx
  • apps/meteor/client/views/room/composer/ComposerReadOnly.tsx
  • apps/meteor/client/views/room/Header/Header.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/AddUsers/BannedUsersUnbanModal.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/InviteUsersLoading.tsx
  • apps/meteor/client/views/room/composer/ComposerBoxPopup.tsx
  • apps/meteor/client/views/room/composer/ComposerOmnichannel/ComposerOmnichannelOnHold.tsx
  • apps/meteor/client/views/room/RoomOpenerEmbedded.tsx
  • apps/meteor/client/views/room/composer/ComposerSelectMessages.tsx
  • apps/meteor/client/views/room/contextualBar/NotificationPreferences/NotificationPreferencesWithData.tsx
  • apps/meteor/client/views/room/contextualBar/PruneMessages/PruneMessagesWithData.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfPopups/VideoConfPopup/StartCallPopup.tsx
  • apps/meteor/client/views/teams/contextualBar/info/LeaveTeam/LeaveTeamWithData.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/InviteUsers/EditInviteLink.tsx
  • apps/meteor/client/views/teams/ChannelDesertionTable/ChannelDesertionTable.tsx
  • apps/meteor/client/views/room/hooks/useUserInfoActions/actions/useChangeModeratorAction.tsx
  • apps/meteor/client/views/room/contextualBar/BannedUsers/BannedUsers.tsx
  • apps/meteor/client/views/teams/contextualBar/info/DeleteTeam/DeleteTeamModalWithRooms.tsx
  • apps/meteor/client/views/room/composer/messageBox/MessageBoxHint.tsx
  • apps/meteor/client/views/room/modals/E2EEModals/BaseDisableE2EEModal.tsx
  • apps/meteor/client/views/room/body/UploadProgress/UploadProgressIndicator.tsx
  • apps/meteor/client/views/room/webdav/AddWebdavAccountModal.tsx
  • apps/meteor/client/views/teams/contextualBar/info/LeaveTeam/LeaveTeamModal/LeaveTeamModal.tsx
  • apps/meteor/client/views/room/contextualBar/UserInfo/UserInfoWithData.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfPopups/VideoConfPopup/TimedVideoConfPopup.tsx
  • apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfPopups/VideoConfPopup/OutgoingPopup.tsx
  • apps/meteor/client/views/room/modals/ForwardMessageModal/ForwardMessageModal.tsx
  • apps/meteor/client/views/room/UserCard/UserCardWithData.tsx
  • apps/meteor/client/views/room/modals/ReportMessageModal/ReportMessageModal.tsx
  • apps/meteor/client/views/room/composer/ComposerAirGappedRestricted.tsx
📚 Learning: 2026-02-10T16:32:42.586Z
Learnt from: tassoevan
Repo: RocketChat/Rocket.Chat PR: 38528
File: apps/meteor/client/startup/roles.ts:14-14
Timestamp: 2026-02-10T16:32:42.586Z
Learning: In Rocket.Chat's Meteor client code, DDP streams use EJSON and Date fields arrive as Date objects; do not manually construct new Date() in stream handlers (for example, in sdk.stream()). Only REST API responses return plain JSON where dates are strings, so implement explicit conversion there if needed. Apply this guidance to all TypeScript files under apps/meteor/client to ensure consistent date handling in DDP streams and REST responses.

Applied to files:

  • apps/meteor/client/views/room/Header/Omnichannel/QuickActions/hooks/useDropdownVisibility.ts
  • apps/meteor/client/views/room/providers/hooks/useInstance.ts
  • apps/meteor/client/views/room/composer/messageBox/hooks/useMessageBoxAutoFocus.ts
  • apps/meteor/client/views/room/contextualBar/Threads/hooks/useThreadMainMessageQuery.ts
  • apps/meteor/client/views/room/contexts/ComposerPopupContext.ts
  • apps/meteor/client/views/room/composer/hooks/useComposerBoxPopup.ts
📚 Learning: 2026-05-11T20:30:35.265Z
Learnt from: tassoevan
Repo: RocketChat/Rocket.Chat PR: 40480
File: apps/meteor/client/meteor/startup/accounts.ts:59-61
Timestamp: 2026-05-11T20:30:35.265Z
Learning: In Rocket.Chat’s Meteor client code, when calling `dispatchToastMessage` with `{ type: 'error' }`, pass the raw caught error object as `message` without manual normalization. `dispatchToastMessage` is designed to accept `message: unknown` for error toasts, so avoid converting errors to strings (e.g., `String(error)`) or extracting `error.message` before passing them.

Applied to files:

  • apps/meteor/client/views/room/Header/Omnichannel/QuickActions/hooks/useDropdownVisibility.ts
  • apps/meteor/client/views/room/providers/hooks/useInstance.ts
  • apps/meteor/client/views/room/composer/messageBox/hooks/useMessageBoxAutoFocus.ts
  • apps/meteor/client/views/room/contextualBar/Threads/hooks/useThreadMainMessageQuery.ts
  • apps/meteor/client/views/room/contexts/ComposerPopupContext.ts
  • apps/meteor/client/views/room/composer/hooks/useComposerBoxPopup.ts
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In the Rocket.Chat repository, do not reference Biome lint rules in code review feedback. Biome is not used even if biome.json exists; only reference Biome rules if there is explicit, project-wide usage documented. For TypeScript files, review lint implications without Biome guidance unless the project enables Biome rules.

Applied to files:

  • apps/meteor/client/views/room/Header/Omnichannel/QuickActions/hooks/useDropdownVisibility.ts
  • apps/meteor/client/views/room/providers/hooks/useInstance.ts
  • apps/meteor/client/views/room/composer/messageBox/hooks/useMessageBoxAutoFocus.ts
  • apps/meteor/client/views/room/contextualBar/Threads/hooks/useThreadMainMessageQuery.ts
  • apps/meteor/client/views/room/contexts/ComposerPopupContext.ts
  • apps/meteor/client/views/room/composer/hooks/useComposerBoxPopup.ts
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In this repository (RocketChat/Rocket.Chat), Biome lint rules are not used even if a biome.json exists. When reviewing TypeScript files (e.g., packages/ui-voip/src/providers/useMediaSession.ts), ensure lint suggestions do not reference Biome-specific rules. Rely on general ESLint/TypeScript lint rules and project conventions instead.

Applied to files:

  • apps/meteor/client/views/room/Header/Omnichannel/QuickActions/hooks/useDropdownVisibility.ts
  • apps/meteor/client/views/room/providers/hooks/useInstance.ts
  • apps/meteor/client/views/room/composer/messageBox/hooks/useMessageBoxAutoFocus.ts
  • apps/meteor/client/views/room/contextualBar/Threads/hooks/useThreadMainMessageQuery.ts
  • apps/meteor/client/views/room/contexts/ComposerPopupContext.ts
  • apps/meteor/client/views/room/composer/hooks/useComposerBoxPopup.ts

Comment on lines +60 to +68
{results?.map((room, key) => (
<ChannelDesertionTableRow
key={key}
room={room}
onChange={onChangeRoomSelection}
selected={'_id' in room && room._id ? !!selectedRooms[room._id] : false}
lastOwnerWarning={lastOwnerWarning}
/>
))}

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.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use a stable row key instead of array index.

Lines 60-68 use key={key} on a sorted list, which can cause row state mismatches after reordering. Prefer room._id as key.

Suggested fix
-					{results?.map((room, key) => (
+					{results?.map((room) => (
 						<ChannelDesertionTableRow
-							key={key}
+							key={room._id}
 							room={room}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{results?.map((room, key) => (
<ChannelDesertionTableRow
key={key}
room={room}
onChange={onChangeRoomSelection}
selected={'_id' in room && room._id ? !!selectedRooms[room._id] : false}
lastOwnerWarning={lastOwnerWarning}
/>
))}
{results?.map((room) => (
<ChannelDesertionTableRow
key={room._id}
room={room}
onChange={onChangeRoomSelection}
selected={'_id' in room && room._id ? !!selectedRooms[room._id] : false}
lastOwnerWarning={lastOwnerWarning}
/>
))}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@apps/meteor/client/views/teams/ChannelDesertionTable/ChannelDesertionTable.tsx`
around lines 60 - 68, The list rendering uses the array index as React key which
can cause state mismatches; update the ChannelDesertionTable render so
ChannelDesertionTableRow uses a stable unique key (use room._id) instead of
key={key}; locate the map over results and change key to something like
key={('_id' in room && room._id) ? room._id : `room-${indexOrFallback}`}
ensuring you reference the results variable, each room object, and
ChannelDesertionTableRow and keep the existing selectedRooms logic intact.

@ggazzo ggazzo merged commit ce0340a into develop Jun 9, 2026
46 checks passed
@ggazzo ggazzo deleted the refactor/prepare-types-for-react-19-17 branch June 9, 2026 16:39

@hacktron-app hacktron-app Bot left a comment

Copy link
Copy Markdown

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

Severity Count
HIGH 1

View full scan results

};

function DropTargetOverlay({ enabled, reason, onFileDrop, visible = true, onDismiss }: DropTargetOverlayProps): ReactElement | null {
function DropTargetOverlay({ enabled, reason, onFileDrop, visible = true, onDismiss }: DropTargetOverlayProps) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

HIGH Client-Side SSRF and Same-Origin/Intranet Data Exfiltration via Drag-and-Drop in DropTargetOverlay

In DropTargetOverlay.tsx, when a user performs a drag-and-drop operation, the application checks if the dragged data contains both text/uri-list and text/html. If it does, it parses the HTML data using document.createRange().createContextualFragment(...), queries all <img> elements, and performs a client-side fetch request to the src attribute of each image. The fetched data is then converted into a File object and automatically added to the list of files to be uploaded to the current chat room.

An attacker can exploit this to exfiltrate sensitive data from the Rocket.Chat server (same-origin endpoints requiring the user's active session/cookies) or from any accessible local/intranet services (e.g., local development servers, router admin pages, cloud metadata endpoints).

By hosting a malicious website or sending a crafted message/email that prompts the user to drag an element from the attacker's controlled page into the Rocket.Chat client, the attacker can force the client to:

  1. Fetch sensitive same-origin endpoints (such as API responses containing private keys, list of users, settings, or private messages) using the user's authenticated session.
  2. Fetch sensitive local/intranet resources.
  3. Automatically upload the retrieved data as a file attachment directly into the chat room where the drop occurred. If the attacker is a participant in that room (e.g., a public channel or a shared private room/DM), they can immediately download the uploaded file and access the exfiltrated sensitive data.
Steps to Reproduce
  1. The attacker hosts a web page with the following draggable element:
<div draggable="true" id="drag-me">Drag me to Rocket.Chat to share!</div>
<script>
document.getElementById('drag-me').addEventListener('dragstart', (event) => {
    event.dataTransfer.setData('text/uri-list', 'http://localhost:3000/api/v1/me');
    event.dataTransfer.setData('text/html', '<img src="http://localhost:3000/api/v1/me">');
});
</script>
  1. The victim, logged into Rocket.Chat, drags this element and drops it into a chat room where the attacker is present.
  2. The Rocket.Chat client parses the HTML, finds the <img> tag, and executes fetch('http://localhost:3000/api/v1/me') with the victim's session cookies.
  3. The client receives the JSON response containing the victim's personal profile and session details, packages it as a file, and uploads it to the chat room.
  4. The attacker downloads the uploaded file from the chat room, successfully exfiltrating the victim's sensitive profile data.
Trace
graph TD
    subgraph SG0 ["apps/meteor/client/hooks/useFormatDateAndTime.ts"]
        useFormatDateAndTime["Returns a date and time formatting function based on user preferences and system settings."]
    end
    style SG0 fill:#2a2a2a,stroke:#444,color:#aaa
    subgraph SG1 ["apps/meteor/client/lib/utils/dateFormat.ts"]
        momentFormatToDateFns["momentFormatToDateFns"]
        flushLiteral["flushLiteral"]
        safeFormat["Safely formats a date using date-fns with fallback."]
        formatDate["Formats a date based on a format string."]
    end
    style SG1 fill:#2a2a2a,stroke:#444,color:#aaa
    subgraph SG2 ["apps/meteor/client/views/room/Room.tsx"]
        Room["Main component for rendering a chat room, handling E2EE setup, message lists, and contextual bars."]
    end
    style SG2 fill:#2a2a2a,stroke:#444,color:#aaa
    subgraph SG3 ["apps/meteor/client/views/room/body/DropTargetOverlay.tsx"]
        DropTargetOverlay{{"Overlay component that handles file drag-and-drop events, including processing dropped files and image URLs."}}
    end
    style SG3 fill:#2a2a2a,stroke:#444,color:#aaa
    subgraph SG4 ["apps/meteor/client/views/room/body/RoomBody.tsx"]
        RoomBody["Main container component for the chat room, managing message lists, composer, UI state, and room-specific features."]
    end
    style SG4 fill:#2a2a2a,stroke:#444,color:#aaa
    DropTargetOverlay --> useFormatDateAndTime
    useFormatDateAndTime --> formatDate
    formatDate --> safeFormat
    safeFormat --> momentFormatToDateFns
    momentFormatToDateFns --> flushLiteral
    RoomBody --> DropTargetOverlay
    Room --> RoomBody
Loading
Fix with AI

Open in Cursor Open in Claude

A security vulnerability was found by Hacktron.

File: apps/meteor/client/views/room/body/DropTargetOverlay.tsx
Lines: 18
Severity: high

Vulnerability: Client-Side SSRF and Same-Origin/Intranet Data Exfiltration via Drag-and-Drop in DropTargetOverlay

Description:
In `DropTargetOverlay.tsx`, when a user performs a drag-and-drop operation, the application checks if the dragged data contains both `text/uri-list` and `text/html`. If it does, it parses the HTML data using `document.createRange().createContextualFragment(...)`, queries all `<img>` elements, and performs a client-side `fetch` request to the `src` attribute of each image. The fetched data is then converted into a `File` object and automatically added to the list of files to be uploaded to the current chat room.

An attacker can exploit this to exfiltrate sensitive data from the Rocket.Chat server (same-origin endpoints requiring the user's active session/cookies) or from any accessible local/intranet services (e.g., local development servers, router admin pages, cloud metadata endpoints).

By hosting a malicious website or sending a crafted message/email that prompts the user to drag an element from the attacker's controlled page into the Rocket.Chat client, the attacker can force the client to:
1. Fetch sensitive same-origin endpoints (such as API responses containing private keys, list of users, settings, or private messages) using the user's authenticated session.
2. Fetch sensitive local/intranet resources.
3. Automatically upload the retrieved data as a file attachment directly into the chat room where the drop occurred. If the attacker is a participant in that room (e.g., a public channel or a shared private room/DM), they can immediately download the uploaded file and access the exfiltrated sensitive data.

Proof of Concept:
1. The attacker hosts a web page with the following draggable element:
```html
<div draggable="true" id="drag-me">Drag me to Rocket.Chat to share!</div>
<script>
document.getElementById('drag-me').addEventListener('dragstart', (event) => {
    event.dataTransfer.setData('text/uri-list', 'http://localhost:3000/api/v1/me');
    event.dataTransfer.setData('text/html', '<img src="http://localhost:3000/api/v1/me">');
});
</script>
```
2. The victim, logged into Rocket.Chat, drags this element and drops it into a chat room where the attacker is present.
3. The Rocket.Chat client parses the HTML, finds the `<img>` tag, and executes `fetch('http://localhost:3000/api/v1/me')` with the victim's session cookies.
4. The client receives the JSON response containing the victim's personal profile and session details, packages it as a file, and uploads it to the chat room.
5. The attacker downloads the uploaded file from the chat room, successfully exfiltrating the victim's sensitive profile data.

Affected Code:
```typescript
		if (event.dataTransfer.types.includes('text/uri-list') && event.dataTransfer.types.includes('text/html')) {
			const fragment = document.createRange().createContextualFragment(event.dataTransfer.getData('text/html'));
			for await (const { src } of Array.from(fragment.querySelectorAll('img'))) {
				try {
					const response = await fetch(src);
					const data = await response.blob();
					const extension = (await import('../../../../app/utils/lib/mimeTypes')).mime.extension(data.type);
					const filename = `File - ${formatDateAndTime(new Date())}.${extension}`;
					const file = new File([data], filename, { type: data.type });
					files.push(file);
				} catch (error) {
					console.warn(error);
				}
			}
		}
```

Acceptance criteria:
- Acceptance is defined by the **actual reported behavior**, not by tests passing.
- Reproduce the issue, or narrow the exact code path that produces it, *before* changing code. State what you confirmed.
- Fix the underlying cause. Mitigations that paper over the reported behavior do not count as a fix.
- Add a regression test that fails on the unpatched code and passes on the fix. If a regression test is genuinely impractical (e.g. race condition, infra-level issue), say so and explain why.
- Existing tests passing is **not** the bar. Do not declare done on tests-pass theatre.

Only change what is necessary to fix this vulnerability. Do not refactor adjacent code or modify unrelated files.

Triage: Reply !fp <reason> (false positive), !valid (confirmed), or !accepted_risk <reason>. Any other reply is saved as a triage note.
Reason is optional but improves future scans — e.g. !fp internal endpoint, not user-facing.

View finding in Hacktron

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: chore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants