Skip to content

refactor: remove unnecessary ReactElement type annotations in components#40820

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

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

Conversation

@tassoevan

@tassoevan tassoevan commented Jun 4, 2026

Copy link
Copy Markdown
Member

⚠️ This is part 18/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

Release Notes

  • Refactor
    • Simplified TypeScript type annotations across numerous React components to rely on implicit type inference instead of explicit return types
    • Broadened component prop types to accept more flexible content patterns (e.g., ReactNode instead of ReactElement)
    • Updated reference object types to support nullable values in specific scenarios

@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

This PR removes explicit ReactElement return annotations across many client React components and hooks. It also widens several UI prop and ref types to ReactNode or nullable refs, and updates one empty state component to branch on permissions.

Changes

React typing cleanup across client views

Layer / File(s) Summary
Directory, home, and invite components
apps/meteor/client/views/directory/..., apps/meteor/client/views/home/..., apps/meteor/client/views/invite/...
These components drop explicit ReactElement return annotations and remove related type imports; a few components also adopt local props aliases or ComponentProps-based typing.
Marketplace pages and tabs
apps/meteor/client/views/marketplace/...
Marketplace pages, tabs, cards, and shared components remove explicit ReactElement return types; UnsupportedEmptyState adds permission-based title, description, and action selection.
Omnichannel views and navigation helpers
apps/meteor/client/views/omnichannel/..., apps/meteor/client/views/navigation/...
Omnichannel components, modals, hooks, and navigation items are updated to use inferred returns and broader ReactNode/nullable ref typings, with a few small render and ref handling adjustments.
Shared prop/content types and other views
apps/meteor/client/views/notFound/..., apps/meteor/client/views/notAuthorized/..., apps/meteor/client/views/modal/..., apps/meteor/client/views/outlookCalendar/...
Remaining shared UI and calendar components remove explicit ReactElement annotations; some children/content props widen to ReactNode.

Sequence Diagram(s)

Estimated review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

type: chore

Suggested reviewers

  • ggazzo
  • dougfabris
  • juliajforesti

@changeset-bot

changeset-bot Bot commented Jun 4, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1e54282

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

@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 98.36066% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.15%. Comparing base (1d94933) to head (88890c2).
⚠️ Report is 4 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #40820      +/-   ##
===========================================
- Coverage    70.18%   70.15%   -0.04%     
===========================================
  Files         3342     3341       -1     
  Lines       123685   123656      -29     
  Branches     22092    22077      -15     
===========================================
- Hits         86813    86747      -66     
- Misses       33534    33558      +24     
- Partials      3338     3351      +13     
Flag Coverage Δ
e2e 59.28% <95.74%> (-0.09%) ⬇️
e2e-api 46.24% <ø> (-0.07%) ⬇️
unit 71.00% <94.64%> (-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.

@tassoevan tassoevan force-pushed the refactor/prepare-types-for-react-19-18 branch from 1cb0582 to 1e54282 Compare June 9, 2026 16:14
- Removed ReactElement type annotations from various components to simplify type definitions.
- Updated components such as AutoCompleteDepartmentAgent, AutoCompleteOutboundProvider, RecipientSelect, and others to use implicit return types.
- Improved code readability and maintainability by streamlining type imports and component definitions.
@tassoevan tassoevan force-pushed the refactor/prepare-types-for-react-19-18 branch from 1e54282 to 88890c2 Compare June 9, 2026 16:16
@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 removed the stat: QA assured Means it has been tested and approved by a company insider label Jun 9, 2026
@tassoevan tassoevan marked this pull request as ready for review June 9, 2026 16:17
@tassoevan tassoevan requested a review from a team as a code owner June 9, 2026 16:17
@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

@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: 1

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/marketplace/AppsPage/UnsupportedEmptyState.tsx (1)

8-26: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Behavioral change inconsistent with PR objectives.

This component introduces permission-based conditional rendering (isAdmin check on line 9) that changes the displayed title, description, and optionally shows UpdateRocketChatButton (line 25). While the review stack context mentions "with one permission-based empty-state branch update," the PR objectives explicitly state "No runtime behavior changes are expected."

The logic appears functionally correct, but this behavioral change should be acknowledged in the PR description or split into a separate commit/PR for clarity.

🤖 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/marketplace/AppsPage/UnsupportedEmptyState.tsx`
around lines 8 - 26, The new permission-based behavior in UnsupportedEmptyState
(usePermission/isAdmin, conditional title/description and conditional
<UpdateRocketChatButton />) changed runtime behavior; revert this by removing
usePermission and the isAdmin branching: set title and description to the
original static marketplace strings (e.g., t('Marketplace_unavailable') and
t('Marketplace_unavailable_description')) and remove the conditional rendering
of <UpdateRocketChatButton /> so the component's output remains unchanged; if
you need the admin-specific branch, introduce it in a separate commit/PR.
🤖 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/navigation/sidebar/hooks/useShortcutOpenMenu.ts`:
- Around line 6-9: The hook useShortcutOpenMenu currently calls
tinykeys(ref.current...) unconditionally which can throw when ref.current is
null; guard by checking that ref.current is non-null before invoking tinykeys
(e.g., if (!ref.current) return/skip), assign the unsubscribe only inside that
guarded branch, and in the useEffect cleanup check/unsubscribe only if
unsubscribe was created (or return a noop) so no attempt is made to call an
undefined unsubscribe; reference useShortcutOpenMenu, ref.current and tinykeys
when locating the call to change.

---

Outside diff comments:
In `@apps/meteor/client/views/marketplace/AppsPage/UnsupportedEmptyState.tsx`:
- Around line 8-26: The new permission-based behavior in UnsupportedEmptyState
(usePermission/isAdmin, conditional title/description and conditional
<UpdateRocketChatButton />) changed runtime behavior; revert this by removing
usePermission and the isAdmin branching: set title and description to the
original static marketplace strings (e.g., t('Marketplace_unavailable') and
t('Marketplace_unavailable_description')) and remove the conditional rendering
of <UpdateRocketChatButton /> so the component's output remains unchanged; if
you need the admin-specific branch, introduce it in a separate commit/PR.
🪄 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: e125990c-19dc-4565-8303-13b864dcc838

📥 Commits

Reviewing files that changed from the base of the PR and between 1d94933 and 88890c2.

📒 Files selected for processing (121)
  • apps/meteor/client/views/directory/DirectoryPage.tsx
  • apps/meteor/client/views/directory/tabs/channels/ChannelsTab.tsx
  • apps/meteor/client/views/directory/tabs/teams/TeamsTab.tsx
  • apps/meteor/client/views/directory/tabs/users/UsersTab.tsx
  • apps/meteor/client/views/directory/tabs/users/UsersTable/UsersTable.tsx
  • apps/meteor/client/views/e2e/SaveE2EPasswordModal.tsx
  • apps/meteor/client/views/home/CustomHomePage.tsx
  • apps/meteor/client/views/home/CustomHomePageContent.tsx
  • apps/meteor/client/views/home/DefaultHomePage.tsx
  • apps/meteor/client/views/home/HomePage.tsx
  • apps/meteor/client/views/home/HomePageHeader.tsx
  • apps/meteor/client/views/home/HomepageGridItem.tsx
  • apps/meteor/client/views/home/cards/AddUsersCard.tsx
  • apps/meteor/client/views/home/cards/CreateChannelsCard.tsx
  • apps/meteor/client/views/home/cards/CustomContentCard.tsx
  • apps/meteor/client/views/home/cards/DesktopAppsCard.tsx
  • apps/meteor/client/views/home/cards/DocumentationCard.tsx
  • apps/meteor/client/views/home/cards/JoinRoomsCard.tsx
  • apps/meteor/client/views/home/cards/MobileAppsCard.tsx
  • apps/meteor/client/views/invite/InvitePage.tsx
  • apps/meteor/client/views/invite/SecretURLPage.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/AppDetailsPage.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/AppDetailsPageHeader.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/AppDetailsPageTabs.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppInstances/AppInstances.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/AppLogs.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppReleases/AppReleases.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppReleases/AppReleasesItem.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppRequests/AppRequestItem.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppRequests/AppRequests.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppRequests/AppRequestsLoading.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppSecurity/AppSecurity.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppSecurity/AppSecurityLabel.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppSettings/AppSetting.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppStatus/AppStatus.tsx
  • apps/meteor/client/views/marketplace/AppsList/AppRow.tsx
  • apps/meteor/client/views/marketplace/AppsList/AppsList.tsx
  • apps/meteor/client/views/marketplace/AppsPage/AppsFilters.tsx
  • apps/meteor/client/views/marketplace/AppsPage/AppsPage.tsx
  • apps/meteor/client/views/marketplace/AppsPage/AppsPageConnectionError.tsx
  • apps/meteor/client/views/marketplace/AppsPage/AppsPageContentSkeleton.tsx
  • apps/meteor/client/views/marketplace/AppsPage/FeaturedAppsSections.tsx
  • apps/meteor/client/views/marketplace/AppsPage/NoInstalledAppMatchesEmptyState.tsx
  • apps/meteor/client/views/marketplace/AppsPage/NoInstalledAppsEmptyState.tsx
  • apps/meteor/client/views/marketplace/AppsPage/NoMarketplaceOrInstalledAppMatchesEmptyState.tsx
  • apps/meteor/client/views/marketplace/AppsPage/UnsupportedEmptyState.tsx
  • apps/meteor/client/views/marketplace/AppsRoute.tsx
  • apps/meteor/client/views/marketplace/BundleChips.tsx
  • apps/meteor/client/views/marketplace/MarketplaceRouter.tsx
  • apps/meteor/client/views/marketplace/MarketplaceSidebar.tsx
  • apps/meteor/client/views/marketplace/components/AppPermissionsList.tsx
  • apps/meteor/client/views/marketplace/components/BannerEnterpriseTrialEnded.tsx
  • apps/meteor/client/views/marketplace/components/CategoryFilter/CategoryDropDown.tsx
  • apps/meteor/client/views/marketplace/components/CategoryFilter/CategoryDropDownList.tsx
  • apps/meteor/client/views/marketplace/components/EnabledAppsCount.tsx
  • apps/meteor/client/views/marketplace/components/MarketplaceHeader.tsx
  • apps/meteor/client/views/marketplace/components/RadioButtonList.tsx
  • apps/meteor/client/views/marketplace/components/RadioDropDown/RadioDropDown.tsx
  • apps/meteor/client/views/marketplace/components/ScreenshotCarousel.tsx
  • apps/meteor/client/views/marketplace/components/ScreenshotCarouselAnchor.tsx
  • apps/meteor/client/views/marketplace/helpers/isValidReference.tsx
  • apps/meteor/client/views/modal/uikit/ModalBlock.tsx
  • apps/meteor/client/views/navigation/sidebar/RoomList/SidebarItem.tsx
  • apps/meteor/client/views/navigation/sidebar/hooks/usePreventDefault.ts
  • apps/meteor/client/views/navigation/sidebar/hooks/useShortcutOpenMenu.ts
  • apps/meteor/client/views/navigation/sidepanel/SidepanelItem/SidepanelItem.tsx
  • apps/meteor/client/views/notAuthorized/NotAuthorizedPage.tsx
  • apps/meteor/client/views/notFound/NotFoundPage.tsx
  • apps/meteor/client/views/omnichannel/OmnichannelRouter.tsx
  • apps/meteor/client/views/omnichannel/additionalForms/AutoCompleteUnits.tsx
  • apps/meteor/client/views/omnichannel/agents/AgentEditWithData.tsx
  • apps/meteor/client/views/omnichannel/agents/AgentsPage.tsx
  • apps/meteor/client/views/omnichannel/agents/AgentsTable/AgentsTableRow.tsx
  • apps/meteor/client/views/omnichannel/analytics/InterchangeableChart.tsx
  • apps/meteor/client/views/omnichannel/cannedResponses/components/CannedResponsesComposer/InsertPlaceholderDropdown.tsx
  • apps/meteor/client/views/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponseList.tsx
  • apps/meteor/client/views/omnichannel/components/AgentInfoDetails.tsx
  • apps/meteor/client/views/omnichannel/components/AutoCompleteAgent.tsx
  • apps/meteor/client/views/omnichannel/components/AutoCompleteContact/AutoCompleteContact.tsx
  • apps/meteor/client/views/omnichannel/components/AutoCompleteDepartment.tsx
  • apps/meteor/client/views/omnichannel/components/AutoCompleteMonitors.tsx
  • apps/meteor/client/views/omnichannel/components/AutoCompleteMultipleAgent.tsx
  • apps/meteor/client/views/omnichannel/components/RoomActivityIcon.tsx
  • apps/meteor/client/views/omnichannel/components/Tags.tsx
  • apps/meteor/client/views/omnichannel/components/outboundMessage/components/AutoCompleteDepartmentAgent.tsx
  • apps/meteor/client/views/omnichannel/components/outboundMessage/components/AutoCompleteOutboundProvider.tsx
  • apps/meteor/client/views/omnichannel/components/outboundMessage/components/RecipientSelect.tsx
  • apps/meteor/client/views/omnichannel/components/outboundMessage/modals/OutboundMessageModal/OutboundMessageCloseConfirmationModal.tsx
  • apps/meteor/client/views/omnichannel/contactInfo/EditContactInfo.tsx
  • apps/meteor/client/views/omnichannel/departments/DepartmentsTable/DepartmentItemMenu.tsx
  • apps/meteor/client/views/omnichannel/departments/DepartmentsTable/RemoveDepartmentModal.tsx
  • apps/meteor/client/views/omnichannel/directory/chats/Chat.tsx
  • apps/meteor/client/views/omnichannel/directory/chats/ChatsTable/ChatsTableFilter.tsx
  • apps/meteor/client/views/omnichannel/directory/contacts/ContactItemMenu.tsx
  • apps/meteor/client/views/omnichannel/directory/contacts/RemoveContactModal.tsx
  • apps/meteor/client/views/omnichannel/directory/contexts/ChatsContext.ts
  • apps/meteor/client/views/omnichannel/installation/Installation.tsx
  • apps/meteor/client/views/omnichannel/managers/AddManager.tsx
  • apps/meteor/client/views/omnichannel/managers/ManagersRoute.tsx
  • apps/meteor/client/views/omnichannel/managers/RemoveManagerButton.tsx
  • apps/meteor/client/views/omnichannel/modals/EnterpriseDepartmentsModal.tsx
  • apps/meteor/client/views/omnichannel/modals/ForwardChatModal.tsx
  • apps/meteor/client/views/omnichannel/priorities/PrioritiesPage.tsx
  • apps/meteor/client/views/omnichannel/priorities/PrioritiesResetModal.tsx
  • apps/meteor/client/views/omnichannel/priorities/PrioritiesRoute.tsx
  • apps/meteor/client/views/omnichannel/priorities/PrioritiesTable.tsx
  • apps/meteor/client/views/omnichannel/priorities/PriorityEditForm.tsx
  • apps/meteor/client/views/omnichannel/priorities/PriorityEditFormWithData.tsx
  • apps/meteor/client/views/omnichannel/priorities/PriorityIcon.tsx
  • apps/meteor/client/views/omnichannel/priorities/PriorityList.tsx
  • apps/meteor/client/views/omnichannel/queueList/QueueListTable.tsx
  • apps/meteor/client/views/omnichannel/realTimeMonitoring/counter/CounterItem.tsx
  • apps/meteor/client/views/omnichannel/reports/components/BarChart.tsx
  • apps/meteor/client/views/omnichannel/reports/components/ReportCard.tsx
  • apps/meteor/client/views/omnichannel/reports/components/ReportCardContent.tsx
  • apps/meteor/client/views/omnichannel/reports/components/ReportCardErrorState.tsx
  • apps/meteor/client/views/omnichannel/slaPolicies/SlaEdit.tsx
  • apps/meteor/client/views/omnichannel/slaPolicies/SlaEditWithData.tsx
  • apps/meteor/client/views/omnichannel/slaPolicies/SlaNew.tsx
  • apps/meteor/client/views/outlookCalendar/OutlookEventsList/OutlookEventsList.tsx
  • apps/meteor/client/views/outlookCalendar/OutlookSettingsList/OutlookSettingsList.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). (4)
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: Hacktron Security Check
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
🧰 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/home/cards/AddUsersCard.tsx
  • apps/meteor/client/views/invite/InvitePage.tsx
  • apps/meteor/client/views/home/cards/DocumentationCard.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/AppDetailsPageHeader.tsx
  • apps/meteor/client/views/home/CustomHomePage.tsx
  • apps/meteor/client/views/home/cards/JoinRoomsCard.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppSecurity/AppSecurityLabel.tsx
  • apps/meteor/client/views/omnichannel/components/AutoCompleteMultipleAgent.tsx
  • apps/meteor/client/views/home/HomePageHeader.tsx
  • apps/meteor/client/views/omnichannel/directory/chats/ChatsTable/ChatsTableFilter.tsx
  • apps/meteor/client/views/home/HomepageGridItem.tsx
  • apps/meteor/client/views/home/DefaultHomePage.tsx
  • apps/meteor/client/views/omnichannel/components/AutoCompleteMonitors.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppSecurity/AppSecurity.tsx
  • apps/meteor/client/views/omnichannel/components/AgentInfoDetails.tsx
  • apps/meteor/client/views/invite/SecretURLPage.tsx
  • apps/meteor/client/views/marketplace/components/CategoryFilter/CategoryDropDown.tsx
  • apps/meteor/client/views/e2e/SaveE2EPasswordModal.tsx
  • apps/meteor/client/views/navigation/sidebar/hooks/usePreventDefault.ts
  • apps/meteor/client/views/marketplace/AppsPage/NoInstalledAppsEmptyState.tsx
  • apps/meteor/client/views/home/CustomHomePageContent.tsx
  • apps/meteor/client/views/omnichannel/agents/AgentsPage.tsx
  • apps/meteor/client/views/omnichannel/components/outboundMessage/modals/OutboundMessageModal/OutboundMessageCloseConfirmationModal.tsx
  • apps/meteor/client/views/omnichannel/slaPolicies/SlaNew.tsx
  • apps/meteor/client/views/omnichannel/reports/components/ReportCardContent.tsx
  • apps/meteor/client/views/omnichannel/analytics/InterchangeableChart.tsx
  • apps/meteor/client/views/omnichannel/priorities/PriorityIcon.tsx
  • apps/meteor/client/views/omnichannel/managers/ManagersRoute.tsx
  • apps/meteor/client/views/marketplace/components/RadioButtonList.tsx
  • apps/meteor/client/views/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponseList.tsx
  • apps/meteor/client/views/notFound/NotFoundPage.tsx
  • apps/meteor/client/views/home/cards/DesktopAppsCard.tsx
  • apps/meteor/client/views/omnichannel/directory/chats/Chat.tsx
  • apps/meteor/client/views/omnichannel/additionalForms/AutoCompleteUnits.tsx
  • apps/meteor/client/views/omnichannel/components/outboundMessage/components/AutoCompleteOutboundProvider.tsx
  • apps/meteor/client/views/omnichannel/priorities/PrioritiesResetModal.tsx
  • apps/meteor/client/views/omnichannel/components/outboundMessage/components/RecipientSelect.tsx
  • apps/meteor/client/views/marketplace/AppsPage/AppsPageContentSkeleton.tsx
  • apps/meteor/client/views/marketplace/AppsPage/UnsupportedEmptyState.tsx
  • apps/meteor/client/views/omnichannel/installation/Installation.tsx
  • apps/meteor/client/views/marketplace/AppsList/AppsList.tsx
  • apps/meteor/client/views/omnichannel/reports/components/BarChart.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppReleases/AppReleases.tsx
  • apps/meteor/client/views/navigation/sidebar/hooks/useShortcutOpenMenu.ts
  • apps/meteor/client/views/home/cards/MobileAppsCard.tsx
  • apps/meteor/client/views/navigation/sidebar/RoomList/SidebarItem.tsx
  • apps/meteor/client/views/omnichannel/cannedResponses/components/CannedResponsesComposer/InsertPlaceholderDropdown.tsx
  • apps/meteor/client/views/home/HomePage.tsx
  • apps/meteor/client/views/omnichannel/priorities/PriorityEditFormWithData.tsx
  • apps/meteor/client/views/omnichannel/components/AutoCompleteDepartment.tsx
  • apps/meteor/client/views/omnichannel/reports/components/ReportCardErrorState.tsx
  • apps/meteor/client/views/marketplace/components/MarketplaceHeader.tsx
  • apps/meteor/client/views/home/cards/CustomContentCard.tsx
  • apps/meteor/client/views/omnichannel/realTimeMonitoring/counter/CounterItem.tsx
  • apps/meteor/client/views/marketplace/helpers/isValidReference.tsx
  • apps/meteor/client/views/marketplace/AppsPage/AppsPage.tsx
  • apps/meteor/client/views/marketplace/components/BannerEnterpriseTrialEnded.tsx
  • apps/meteor/client/views/omnichannel/components/RoomActivityIcon.tsx
  • apps/meteor/client/views/omnichannel/directory/contacts/ContactItemMenu.tsx
  • apps/meteor/client/views/directory/tabs/teams/TeamsTab.tsx
  • apps/meteor/client/views/omnichannel/directory/contexts/ChatsContext.ts
  • apps/meteor/client/views/omnichannel/managers/AddManager.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppRequests/AppRequestsLoading.tsx
  • apps/meteor/client/views/marketplace/AppsPage/AppsFilters.tsx
  • apps/meteor/client/views/marketplace/AppsPage/AppsPageConnectionError.tsx
  • apps/meteor/client/views/omnichannel/components/AutoCompleteAgent.tsx
  • apps/meteor/client/views/marketplace/AppsList/AppRow.tsx
  • apps/meteor/client/views/home/cards/CreateChannelsCard.tsx
  • apps/meteor/client/views/omnichannel/OmnichannelRouter.tsx
  • apps/meteor/client/views/omnichannel/agents/AgentEditWithData.tsx
  • apps/meteor/client/views/modal/uikit/ModalBlock.tsx
  • apps/meteor/client/views/omnichannel/contactInfo/EditContactInfo.tsx
  • apps/meteor/client/views/omnichannel/managers/RemoveManagerButton.tsx
  • apps/meteor/client/views/omnichannel/agents/AgentsTable/AgentsTableRow.tsx
  • apps/meteor/client/views/marketplace/MarketplaceRouter.tsx
  • apps/meteor/client/views/marketplace/components/RadioDropDown/RadioDropDown.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppSettings/AppSetting.tsx
  • apps/meteor/client/views/notAuthorized/NotAuthorizedPage.tsx
  • apps/meteor/client/views/marketplace/components/ScreenshotCarousel.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppRequests/AppRequests.tsx
  • apps/meteor/client/views/omnichannel/queueList/QueueListTable.tsx
  • apps/meteor/client/views/marketplace/AppsPage/FeaturedAppsSections.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/AppLogs.tsx
  • apps/meteor/client/views/navigation/sidepanel/SidepanelItem/SidepanelItem.tsx
  • apps/meteor/client/views/directory/DirectoryPage.tsx
  • apps/meteor/client/views/omnichannel/reports/components/ReportCard.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppStatus/AppStatus.tsx
  • apps/meteor/client/views/omnichannel/priorities/PriorityEditForm.tsx
  • apps/meteor/client/views/omnichannel/directory/contacts/RemoveContactModal.tsx
  • apps/meteor/client/views/marketplace/components/AppPermissionsList.tsx
  • apps/meteor/client/views/directory/tabs/channels/ChannelsTab.tsx
  • apps/meteor/client/views/outlookCalendar/OutlookEventsList/OutlookEventsList.tsx
  • apps/meteor/client/views/omnichannel/departments/DepartmentsTable/RemoveDepartmentModal.tsx
  • apps/meteor/client/views/omnichannel/priorities/PrioritiesRoute.tsx
  • apps/meteor/client/views/omnichannel/components/outboundMessage/components/AutoCompleteDepartmentAgent.tsx
  • apps/meteor/client/views/omnichannel/components/Tags.tsx
  • apps/meteor/client/views/directory/tabs/users/UsersTable/UsersTable.tsx
  • apps/meteor/client/views/marketplace/components/ScreenshotCarouselAnchor.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/AppDetailsPageTabs.tsx
  • apps/meteor/client/views/marketplace/components/CategoryFilter/CategoryDropDownList.tsx
  • apps/meteor/client/views/marketplace/BundleChips.tsx
  • apps/meteor/client/views/marketplace/components/EnabledAppsCount.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppRequests/AppRequestItem.tsx
  • apps/meteor/client/views/marketplace/AppsPage/NoInstalledAppMatchesEmptyState.tsx
  • apps/meteor/client/views/omnichannel/departments/DepartmentsTable/DepartmentItemMenu.tsx
  • apps/meteor/client/views/marketplace/AppsPage/NoMarketplaceOrInstalledAppMatchesEmptyState.tsx
  • apps/meteor/client/views/marketplace/MarketplaceSidebar.tsx
  • apps/meteor/client/views/directory/tabs/users/UsersTab.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppReleases/AppReleasesItem.tsx
  • apps/meteor/client/views/omnichannel/priorities/PrioritiesTable.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppInstances/AppInstances.tsx
  • apps/meteor/client/views/marketplace/AppsRoute.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/AppDetailsPage.tsx
  • apps/meteor/client/views/omnichannel/priorities/PriorityList.tsx
  • apps/meteor/client/views/outlookCalendar/OutlookSettingsList/OutlookSettingsList.tsx
  • apps/meteor/client/views/omnichannel/components/AutoCompleteContact/AutoCompleteContact.tsx
  • apps/meteor/client/views/omnichannel/priorities/PrioritiesPage.tsx
  • apps/meteor/client/views/omnichannel/modals/ForwardChatModal.tsx
  • apps/meteor/client/views/omnichannel/slaPolicies/SlaEdit.tsx
  • apps/meteor/client/views/omnichannel/slaPolicies/SlaEditWithData.tsx
  • apps/meteor/client/views/omnichannel/modals/EnterpriseDepartmentsModal.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/home/cards/AddUsersCard.tsx
  • apps/meteor/client/views/invite/InvitePage.tsx
  • apps/meteor/client/views/home/cards/DocumentationCard.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/AppDetailsPageHeader.tsx
  • apps/meteor/client/views/home/CustomHomePage.tsx
  • apps/meteor/client/views/home/cards/JoinRoomsCard.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppSecurity/AppSecurityLabel.tsx
  • apps/meteor/client/views/omnichannel/components/AutoCompleteMultipleAgent.tsx
  • apps/meteor/client/views/home/HomePageHeader.tsx
  • apps/meteor/client/views/omnichannel/directory/chats/ChatsTable/ChatsTableFilter.tsx
  • apps/meteor/client/views/home/HomepageGridItem.tsx
  • apps/meteor/client/views/home/DefaultHomePage.tsx
  • apps/meteor/client/views/omnichannel/components/AutoCompleteMonitors.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppSecurity/AppSecurity.tsx
  • apps/meteor/client/views/omnichannel/components/AgentInfoDetails.tsx
  • apps/meteor/client/views/invite/SecretURLPage.tsx
  • apps/meteor/client/views/marketplace/components/CategoryFilter/CategoryDropDown.tsx
  • apps/meteor/client/views/e2e/SaveE2EPasswordModal.tsx
  • apps/meteor/client/views/marketplace/AppsPage/NoInstalledAppsEmptyState.tsx
  • apps/meteor/client/views/home/CustomHomePageContent.tsx
  • apps/meteor/client/views/omnichannel/agents/AgentsPage.tsx
  • apps/meteor/client/views/omnichannel/components/outboundMessage/modals/OutboundMessageModal/OutboundMessageCloseConfirmationModal.tsx
  • apps/meteor/client/views/omnichannel/slaPolicies/SlaNew.tsx
  • apps/meteor/client/views/omnichannel/reports/components/ReportCardContent.tsx
  • apps/meteor/client/views/omnichannel/analytics/InterchangeableChart.tsx
  • apps/meteor/client/views/omnichannel/priorities/PriorityIcon.tsx
  • apps/meteor/client/views/omnichannel/managers/ManagersRoute.tsx
  • apps/meteor/client/views/marketplace/components/RadioButtonList.tsx
  • apps/meteor/client/views/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponseList.tsx
  • apps/meteor/client/views/notFound/NotFoundPage.tsx
  • apps/meteor/client/views/home/cards/DesktopAppsCard.tsx
  • apps/meteor/client/views/omnichannel/directory/chats/Chat.tsx
  • apps/meteor/client/views/omnichannel/additionalForms/AutoCompleteUnits.tsx
  • apps/meteor/client/views/omnichannel/components/outboundMessage/components/AutoCompleteOutboundProvider.tsx
  • apps/meteor/client/views/omnichannel/priorities/PrioritiesResetModal.tsx
  • apps/meteor/client/views/omnichannel/components/outboundMessage/components/RecipientSelect.tsx
  • apps/meteor/client/views/marketplace/AppsPage/AppsPageContentSkeleton.tsx
  • apps/meteor/client/views/marketplace/AppsPage/UnsupportedEmptyState.tsx
  • apps/meteor/client/views/omnichannel/installation/Installation.tsx
  • apps/meteor/client/views/marketplace/AppsList/AppsList.tsx
  • apps/meteor/client/views/omnichannel/reports/components/BarChart.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppReleases/AppReleases.tsx
  • apps/meteor/client/views/home/cards/MobileAppsCard.tsx
  • apps/meteor/client/views/navigation/sidebar/RoomList/SidebarItem.tsx
  • apps/meteor/client/views/omnichannel/cannedResponses/components/CannedResponsesComposer/InsertPlaceholderDropdown.tsx
  • apps/meteor/client/views/home/HomePage.tsx
  • apps/meteor/client/views/omnichannel/priorities/PriorityEditFormWithData.tsx
  • apps/meteor/client/views/omnichannel/components/AutoCompleteDepartment.tsx
  • apps/meteor/client/views/omnichannel/reports/components/ReportCardErrorState.tsx
  • apps/meteor/client/views/marketplace/components/MarketplaceHeader.tsx
  • apps/meteor/client/views/home/cards/CustomContentCard.tsx
  • apps/meteor/client/views/omnichannel/realTimeMonitoring/counter/CounterItem.tsx
  • apps/meteor/client/views/marketplace/helpers/isValidReference.tsx
  • apps/meteor/client/views/marketplace/AppsPage/AppsPage.tsx
  • apps/meteor/client/views/marketplace/components/BannerEnterpriseTrialEnded.tsx
  • apps/meteor/client/views/omnichannel/components/RoomActivityIcon.tsx
  • apps/meteor/client/views/omnichannel/directory/contacts/ContactItemMenu.tsx
  • apps/meteor/client/views/directory/tabs/teams/TeamsTab.tsx
  • apps/meteor/client/views/omnichannel/managers/AddManager.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppRequests/AppRequestsLoading.tsx
  • apps/meteor/client/views/marketplace/AppsPage/AppsFilters.tsx
  • apps/meteor/client/views/marketplace/AppsPage/AppsPageConnectionError.tsx
  • apps/meteor/client/views/omnichannel/components/AutoCompleteAgent.tsx
  • apps/meteor/client/views/marketplace/AppsList/AppRow.tsx
  • apps/meteor/client/views/home/cards/CreateChannelsCard.tsx
  • apps/meteor/client/views/omnichannel/OmnichannelRouter.tsx
  • apps/meteor/client/views/omnichannel/agents/AgentEditWithData.tsx
  • apps/meteor/client/views/modal/uikit/ModalBlock.tsx
  • apps/meteor/client/views/omnichannel/contactInfo/EditContactInfo.tsx
  • apps/meteor/client/views/omnichannel/managers/RemoveManagerButton.tsx
  • apps/meteor/client/views/omnichannel/agents/AgentsTable/AgentsTableRow.tsx
  • apps/meteor/client/views/marketplace/MarketplaceRouter.tsx
  • apps/meteor/client/views/marketplace/components/RadioDropDown/RadioDropDown.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppSettings/AppSetting.tsx
  • apps/meteor/client/views/notAuthorized/NotAuthorizedPage.tsx
  • apps/meteor/client/views/marketplace/components/ScreenshotCarousel.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppRequests/AppRequests.tsx
  • apps/meteor/client/views/omnichannel/queueList/QueueListTable.tsx
  • apps/meteor/client/views/marketplace/AppsPage/FeaturedAppsSections.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/AppLogs.tsx
  • apps/meteor/client/views/navigation/sidepanel/SidepanelItem/SidepanelItem.tsx
  • apps/meteor/client/views/directory/DirectoryPage.tsx
  • apps/meteor/client/views/omnichannel/reports/components/ReportCard.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppStatus/AppStatus.tsx
  • apps/meteor/client/views/omnichannel/priorities/PriorityEditForm.tsx
  • apps/meteor/client/views/omnichannel/directory/contacts/RemoveContactModal.tsx
  • apps/meteor/client/views/marketplace/components/AppPermissionsList.tsx
  • apps/meteor/client/views/directory/tabs/channels/ChannelsTab.tsx
  • apps/meteor/client/views/outlookCalendar/OutlookEventsList/OutlookEventsList.tsx
  • apps/meteor/client/views/omnichannel/departments/DepartmentsTable/RemoveDepartmentModal.tsx
  • apps/meteor/client/views/omnichannel/priorities/PrioritiesRoute.tsx
  • apps/meteor/client/views/omnichannel/components/outboundMessage/components/AutoCompleteDepartmentAgent.tsx
  • apps/meteor/client/views/omnichannel/components/Tags.tsx
  • apps/meteor/client/views/directory/tabs/users/UsersTable/UsersTable.tsx
  • apps/meteor/client/views/marketplace/components/ScreenshotCarouselAnchor.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/AppDetailsPageTabs.tsx
  • apps/meteor/client/views/marketplace/components/CategoryFilter/CategoryDropDownList.tsx
  • apps/meteor/client/views/marketplace/BundleChips.tsx
  • apps/meteor/client/views/marketplace/components/EnabledAppsCount.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppRequests/AppRequestItem.tsx
  • apps/meteor/client/views/marketplace/AppsPage/NoInstalledAppMatchesEmptyState.tsx
  • apps/meteor/client/views/omnichannel/departments/DepartmentsTable/DepartmentItemMenu.tsx
  • apps/meteor/client/views/marketplace/AppsPage/NoMarketplaceOrInstalledAppMatchesEmptyState.tsx
  • apps/meteor/client/views/marketplace/MarketplaceSidebar.tsx
  • apps/meteor/client/views/directory/tabs/users/UsersTab.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppReleases/AppReleasesItem.tsx
  • apps/meteor/client/views/omnichannel/priorities/PrioritiesTable.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppInstances/AppInstances.tsx
  • apps/meteor/client/views/marketplace/AppsRoute.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/AppDetailsPage.tsx
  • apps/meteor/client/views/omnichannel/priorities/PriorityList.tsx
  • apps/meteor/client/views/outlookCalendar/OutlookSettingsList/OutlookSettingsList.tsx
  • apps/meteor/client/views/omnichannel/components/AutoCompleteContact/AutoCompleteContact.tsx
  • apps/meteor/client/views/omnichannel/priorities/PrioritiesPage.tsx
  • apps/meteor/client/views/omnichannel/modals/ForwardChatModal.tsx
  • apps/meteor/client/views/omnichannel/slaPolicies/SlaEdit.tsx
  • apps/meteor/client/views/omnichannel/slaPolicies/SlaEditWithData.tsx
  • apps/meteor/client/views/omnichannel/modals/EnterpriseDepartmentsModal.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/home/cards/AddUsersCard.tsx
  • apps/meteor/client/views/invite/InvitePage.tsx
  • apps/meteor/client/views/home/cards/DocumentationCard.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/AppDetailsPageHeader.tsx
  • apps/meteor/client/views/home/CustomHomePage.tsx
  • apps/meteor/client/views/home/cards/JoinRoomsCard.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppSecurity/AppSecurityLabel.tsx
  • apps/meteor/client/views/omnichannel/components/AutoCompleteMultipleAgent.tsx
  • apps/meteor/client/views/home/HomePageHeader.tsx
  • apps/meteor/client/views/omnichannel/directory/chats/ChatsTable/ChatsTableFilter.tsx
  • apps/meteor/client/views/home/HomepageGridItem.tsx
  • apps/meteor/client/views/home/DefaultHomePage.tsx
  • apps/meteor/client/views/omnichannel/components/AutoCompleteMonitors.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppSecurity/AppSecurity.tsx
  • apps/meteor/client/views/omnichannel/components/AgentInfoDetails.tsx
  • apps/meteor/client/views/invite/SecretURLPage.tsx
  • apps/meteor/client/views/marketplace/components/CategoryFilter/CategoryDropDown.tsx
  • apps/meteor/client/views/e2e/SaveE2EPasswordModal.tsx
  • apps/meteor/client/views/navigation/sidebar/hooks/usePreventDefault.ts
  • apps/meteor/client/views/marketplace/AppsPage/NoInstalledAppsEmptyState.tsx
  • apps/meteor/client/views/home/CustomHomePageContent.tsx
  • apps/meteor/client/views/omnichannel/agents/AgentsPage.tsx
  • apps/meteor/client/views/omnichannel/components/outboundMessage/modals/OutboundMessageModal/OutboundMessageCloseConfirmationModal.tsx
  • apps/meteor/client/views/omnichannel/slaPolicies/SlaNew.tsx
  • apps/meteor/client/views/omnichannel/reports/components/ReportCardContent.tsx
  • apps/meteor/client/views/omnichannel/analytics/InterchangeableChart.tsx
  • apps/meteor/client/views/omnichannel/priorities/PriorityIcon.tsx
  • apps/meteor/client/views/omnichannel/managers/ManagersRoute.tsx
  • apps/meteor/client/views/marketplace/components/RadioButtonList.tsx
  • apps/meteor/client/views/omnichannel/cannedResponses/contextualBar/CannedResponse/CannedResponseList.tsx
  • apps/meteor/client/views/notFound/NotFoundPage.tsx
  • apps/meteor/client/views/home/cards/DesktopAppsCard.tsx
  • apps/meteor/client/views/omnichannel/directory/chats/Chat.tsx
  • apps/meteor/client/views/omnichannel/additionalForms/AutoCompleteUnits.tsx
  • apps/meteor/client/views/omnichannel/components/outboundMessage/components/AutoCompleteOutboundProvider.tsx
  • apps/meteor/client/views/omnichannel/priorities/PrioritiesResetModal.tsx
  • apps/meteor/client/views/omnichannel/components/outboundMessage/components/RecipientSelect.tsx
  • apps/meteor/client/views/marketplace/AppsPage/AppsPageContentSkeleton.tsx
  • apps/meteor/client/views/marketplace/AppsPage/UnsupportedEmptyState.tsx
  • apps/meteor/client/views/omnichannel/installation/Installation.tsx
  • apps/meteor/client/views/marketplace/AppsList/AppsList.tsx
  • apps/meteor/client/views/omnichannel/reports/components/BarChart.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppReleases/AppReleases.tsx
  • apps/meteor/client/views/navigation/sidebar/hooks/useShortcutOpenMenu.ts
  • apps/meteor/client/views/home/cards/MobileAppsCard.tsx
  • apps/meteor/client/views/navigation/sidebar/RoomList/SidebarItem.tsx
  • apps/meteor/client/views/omnichannel/cannedResponses/components/CannedResponsesComposer/InsertPlaceholderDropdown.tsx
  • apps/meteor/client/views/home/HomePage.tsx
  • apps/meteor/client/views/omnichannel/priorities/PriorityEditFormWithData.tsx
  • apps/meteor/client/views/omnichannel/components/AutoCompleteDepartment.tsx
  • apps/meteor/client/views/omnichannel/reports/components/ReportCardErrorState.tsx
  • apps/meteor/client/views/marketplace/components/MarketplaceHeader.tsx
  • apps/meteor/client/views/home/cards/CustomContentCard.tsx
  • apps/meteor/client/views/omnichannel/realTimeMonitoring/counter/CounterItem.tsx
  • apps/meteor/client/views/marketplace/helpers/isValidReference.tsx
  • apps/meteor/client/views/marketplace/AppsPage/AppsPage.tsx
  • apps/meteor/client/views/marketplace/components/BannerEnterpriseTrialEnded.tsx
  • apps/meteor/client/views/omnichannel/components/RoomActivityIcon.tsx
  • apps/meteor/client/views/omnichannel/directory/contacts/ContactItemMenu.tsx
  • apps/meteor/client/views/directory/tabs/teams/TeamsTab.tsx
  • apps/meteor/client/views/omnichannel/directory/contexts/ChatsContext.ts
  • apps/meteor/client/views/omnichannel/managers/AddManager.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppRequests/AppRequestsLoading.tsx
  • apps/meteor/client/views/marketplace/AppsPage/AppsFilters.tsx
  • apps/meteor/client/views/marketplace/AppsPage/AppsPageConnectionError.tsx
  • apps/meteor/client/views/omnichannel/components/AutoCompleteAgent.tsx
  • apps/meteor/client/views/marketplace/AppsList/AppRow.tsx
  • apps/meteor/client/views/home/cards/CreateChannelsCard.tsx
  • apps/meteor/client/views/omnichannel/OmnichannelRouter.tsx
  • apps/meteor/client/views/omnichannel/agents/AgentEditWithData.tsx
  • apps/meteor/client/views/modal/uikit/ModalBlock.tsx
  • apps/meteor/client/views/omnichannel/contactInfo/EditContactInfo.tsx
  • apps/meteor/client/views/omnichannel/managers/RemoveManagerButton.tsx
  • apps/meteor/client/views/omnichannel/agents/AgentsTable/AgentsTableRow.tsx
  • apps/meteor/client/views/marketplace/MarketplaceRouter.tsx
  • apps/meteor/client/views/marketplace/components/RadioDropDown/RadioDropDown.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppSettings/AppSetting.tsx
  • apps/meteor/client/views/notAuthorized/NotAuthorizedPage.tsx
  • apps/meteor/client/views/marketplace/components/ScreenshotCarousel.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppRequests/AppRequests.tsx
  • apps/meteor/client/views/omnichannel/queueList/QueueListTable.tsx
  • apps/meteor/client/views/marketplace/AppsPage/FeaturedAppsSections.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/AppLogs.tsx
  • apps/meteor/client/views/navigation/sidepanel/SidepanelItem/SidepanelItem.tsx
  • apps/meteor/client/views/directory/DirectoryPage.tsx
  • apps/meteor/client/views/omnichannel/reports/components/ReportCard.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppStatus/AppStatus.tsx
  • apps/meteor/client/views/omnichannel/priorities/PriorityEditForm.tsx
  • apps/meteor/client/views/omnichannel/directory/contacts/RemoveContactModal.tsx
  • apps/meteor/client/views/marketplace/components/AppPermissionsList.tsx
  • apps/meteor/client/views/directory/tabs/channels/ChannelsTab.tsx
  • apps/meteor/client/views/outlookCalendar/OutlookEventsList/OutlookEventsList.tsx
  • apps/meteor/client/views/omnichannel/departments/DepartmentsTable/RemoveDepartmentModal.tsx
  • apps/meteor/client/views/omnichannel/priorities/PrioritiesRoute.tsx
  • apps/meteor/client/views/omnichannel/components/outboundMessage/components/AutoCompleteDepartmentAgent.tsx
  • apps/meteor/client/views/omnichannel/components/Tags.tsx
  • apps/meteor/client/views/directory/tabs/users/UsersTable/UsersTable.tsx
  • apps/meteor/client/views/marketplace/components/ScreenshotCarouselAnchor.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/AppDetailsPageTabs.tsx
  • apps/meteor/client/views/marketplace/components/CategoryFilter/CategoryDropDownList.tsx
  • apps/meteor/client/views/marketplace/BundleChips.tsx
  • apps/meteor/client/views/marketplace/components/EnabledAppsCount.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppRequests/AppRequestItem.tsx
  • apps/meteor/client/views/marketplace/AppsPage/NoInstalledAppMatchesEmptyState.tsx
  • apps/meteor/client/views/omnichannel/departments/DepartmentsTable/DepartmentItemMenu.tsx
  • apps/meteor/client/views/marketplace/AppsPage/NoMarketplaceOrInstalledAppMatchesEmptyState.tsx
  • apps/meteor/client/views/marketplace/MarketplaceSidebar.tsx
  • apps/meteor/client/views/directory/tabs/users/UsersTab.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppReleases/AppReleasesItem.tsx
  • apps/meteor/client/views/omnichannel/priorities/PrioritiesTable.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppInstances/AppInstances.tsx
  • apps/meteor/client/views/marketplace/AppsRoute.tsx
  • apps/meteor/client/views/marketplace/AppDetailsPage/AppDetailsPage.tsx
  • apps/meteor/client/views/omnichannel/priorities/PriorityList.tsx
  • apps/meteor/client/views/outlookCalendar/OutlookSettingsList/OutlookSettingsList.tsx
  • apps/meteor/client/views/omnichannel/components/AutoCompleteContact/AutoCompleteContact.tsx
  • apps/meteor/client/views/omnichannel/priorities/PrioritiesPage.tsx
  • apps/meteor/client/views/omnichannel/modals/ForwardChatModal.tsx
  • apps/meteor/client/views/omnichannel/slaPolicies/SlaEdit.tsx
  • apps/meteor/client/views/omnichannel/slaPolicies/SlaEditWithData.tsx
  • apps/meteor/client/views/omnichannel/modals/EnterpriseDepartmentsModal.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/navigation/sidebar/hooks/usePreventDefault.ts
  • apps/meteor/client/views/navigation/sidebar/hooks/useShortcutOpenMenu.ts
  • apps/meteor/client/views/omnichannel/directory/contexts/ChatsContext.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/navigation/sidebar/hooks/usePreventDefault.ts
  • apps/meteor/client/views/navigation/sidebar/hooks/useShortcutOpenMenu.ts
  • apps/meteor/client/views/omnichannel/directory/contexts/ChatsContext.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/navigation/sidebar/hooks/usePreventDefault.ts
  • apps/meteor/client/views/navigation/sidebar/hooks/useShortcutOpenMenu.ts
  • apps/meteor/client/views/omnichannel/directory/contexts/ChatsContext.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/navigation/sidebar/hooks/usePreventDefault.ts
  • apps/meteor/client/views/navigation/sidebar/hooks/useShortcutOpenMenu.ts
  • apps/meteor/client/views/omnichannel/directory/contexts/ChatsContext.ts

Comment on lines +6 to 9
export const useShortcutOpenMenu = (ref: RefObject<Element | null>): void => {
useEffect(() => {
const unsubscribe = tinykeys(ref.current as HTMLElement, {
Alt: (event) => {

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 | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate and display the target file (small, line-bounded)
FILE="apps/meteor/client/views/navigation/sidebar/hooks/useShortcutOpenMenu.ts"
if [ -f "$FILE" ]; then
  echo "== $FILE =="
  sed -n '1,160p' "$FILE" | cat -n
else
  echo "Missing file: $FILE" >&2
  exit 1
fi

# Search for tinykeys usage in repo (to see common guarding patterns)
echo
echo "== Search: tinykeys( usage patterns =="
rg -n "tinykeys\(" . | head -n 50

# Search for hook usage (to understand ref type / assignment)
echo
echo "== Search: useShortcutOpenMenu( usage =="
rg -n "useShortcutOpenMenu\(" . | head -n 50

Repository: RocketChat/Rocket.Chat

Length of output: 1730


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the call site to see the ref type and what element it points to
sed -n '1,120p' apps/meteor/client/views/navigation/sidebar/RoomList/RoomList.tsx | cat -n

echo
echo "----"
# Inspect the alternate hook implementation (if present)
ALT="apps/meteor/client/sidebar/hooks/useShortcutOpenMenu.ts"
if [ -f "$ALT" ]; then
  sed -n '1,140p' "$ALT" | cat -n
else
  echo "Missing: $ALT" >&2
fi

echo
echo "----"
# Check if tinykeys target types are present anywhere in repo (sometimes via vendored d.ts)
rg -n "declare function tinykeys|tinykeys\(" apps/meteor -S || true

Repository: RocketChat/Rocket.Chat

Length of output: 4547


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Try to find tinykeys type signatures in-repo (d.ts vendored somewhere)
rg -n "declare\s+(function|const)\s+tinykeys|declare\s+module\s+['\"]tinykeys['\"]|tinykeys\s*:\s*\(" . -S || true

# Also check if tinykeys types are referenced via imports (TS will use node_modules types, but might be vendored)
rg -n "from 'tinykeys'|import\s+tinykeys\s+from\s+'tinykeys'" apps -S

# Inspect the non-v2 sidebar hook (same logic, possibly safer typing/callsites)
sed -n '1,120p' apps/meteor/client/sidebar/hooks/useShortcutOpenMenu.ts | cat -n

Repository: RocketChat/Rocket.Chat

Length of output: 1308


🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n "useShortcutOpenMenu" apps/meteor/client -S | head -n 50

echo
echo "----"
# find imports that reference the non-v2 sidebar hook path
rg -n "from\s+['\"].*sidebar/hooks/useShortcutOpenMenu['\"]" apps/meteor/client -S || true

Repository: RocketChat/Rocket.Chat

Length of output: 795


🏁 Script executed:

#!/bin/bash
set -euo pipefail

sed -n '1,120p' apps/meteor/client/sidebar/RoomList/RoomList.tsx | cat -n

Repository: RocketChat/Rocket.Chat

Length of output: 3374


🌐 Web query:

tinykeys API accepts null target throws when target is null

💡 Result:

tinykeys does not explicitly guard against target === null; passing null will fail when it tries to register the event listener (i.e., it calls target.addEventListener(...)), which will throw a runtime error like “Cannot read properties of null (reading 'addEventListener')”. [1] In the current implementation, tinykeys(target, ...) is typed as target: Window | HTMLElement and immediately calls target.addEventListener(event, onKeyEvent, capture), so there’s no code path that handles a null target. [1] Workaround: ensure the value you pass as target is a real Window/HTMLElement (not null) before calling tinykeys, or conditionally delay/skip registration until the element exists.

Citations:


Guard ref.current before calling tinykeys

tinykeys registers the handler by immediately calling target.addEventListener; if ref.current is null, it will throw before unsubscribe is created/cleanup is registered.

Suggested fix
 export const useShortcutOpenMenu = (ref: RefObject<Element | null>): void => {
 	useEffect(() => {
-		const unsubscribe = tinykeys(ref.current as HTMLElement, {
+		if (!(ref.current instanceof HTMLElement)) {
+			return;
+		}
+		const unsubscribe = tinykeys(ref.current, {
 			Alt: (event) => {
 				if (!(event.target as HTMLElement).className.includes('rcx-sidebar-v2-item')) {
 					return;
 				}
🤖 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/navigation/sidebar/hooks/useShortcutOpenMenu.ts`
around lines 6 - 9, The hook useShortcutOpenMenu currently calls
tinykeys(ref.current...) unconditionally which can throw when ref.current is
null; guard by checking that ref.current is non-null before invoking tinykeys
(e.g., if (!ref.current) return/skip), assign the unsubscribe only inside that
guarded branch, and in the useEffect cleanup check/unsubscribe only if
unsubscribe was created (or return a noop) so no attempt is made to call an
undefined unsubscribe; reference useShortcutOpenMenu, ref.current and tinykeys
when locating the call to change.

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

@ggazzo ggazzo merged commit b901d7c into develop Jun 9, 2026
46 checks passed
@ggazzo ggazzo deleted the refactor/prepare-types-for-react-19-18 branch June 9, 2026 16:42
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