Skip to content

chore: remove orphan modules under apps/meteor/client - #41775

Open
tassoevan wants to merge 1 commit into
developfrom
chore/remove-orphan-client-modules
Open

chore: remove orphan modules under apps/meteor/client#41775
tassoevan wants to merge 1 commit into
developfrom
chore/remove-orphan-client-modules

Conversation

@tassoevan

@tassoevan tassoevan commented Aug 13, 2026

Copy link
Copy Markdown
Member

Proposed changes

Removes client modules that are unreachable from the Meteor client entrypoint (client/main.ts) and not imported by anything else in the monorepo.

I built the module graph for apps/meteor — resolving relative and Meteor-absolute imports, dynamic import(), require, and re-exports across all 3,007 files under client/ — then hand-verified every candidate with direct greps over apps/, packages/, and ee/.

32 files, 1,280 deletions.

Matrix federation search (12 files, ~530 LOC)

The entire sidebar/header/MatrixFederationSearch folder plus its only entry point, useMatrixFederationItems, which nothing imported. No tests or stories referenced it either, so the whole feature was unreachable.

Message notification components (4 files)

MessageNotification and its AllMention / MeMention / UnreadMessages variants. The three leaves imported the base; nothing imported the leaves. The live notification path is hooks/notification/useNewMessageNotification, which is untouched.

Duplicates superseded by surviving copies

Removed Surviving copy
components/Wizard/WizardActions @rocket.chat/ui-client
sidebar/SidebarPortal portals/SidebarPortal
views/navigation/sidebar/hooks/useCollapsedGroups sidebar/hooks and views/navigation/hooks
views/root/LoginRoute only SAMLLoginRoute is routed

Unused barrel

components/message/toolbar/items/actions/Timestamp/TimestampPicker/index.ts — the sole consumer, useTimestampAction, already deep-imports TimestampPickerModal.

Assorted leftovers

ansispan, HomepageGridItem, SidePanelMentions, omnichannel/directory/chats/Chat, VisitorDoesNotExistError, RoomMembers/types, stories/contexts/QueryClientProviderMock.

Dead code kept alive only by its own tests

waitForElement and useLoadSurroundingMessages, along with their specs. Both had no consumer other than the spec file testing them.

Verification

  • tsc --noEmit --skipLibCheck over apps/meteor passes clean.
  • Every deletion was confirmed to have no remaining importer. Greps that returned near-miss hits (useNewMessageNotification, portals/SidebarPortal/SidebarPortal, the two live useCollapsedGroups, SAMLLoginRoute) all resolve to surviving files that remain on disk.
  • No empty directories left behind.

No behavior change, so no changeset. Please add an empty one if CI requires it on apps/meteor diffs.

Kept deliberately

client/definitions/*.d.ts are ambient declarations pulled in via tsconfig include, and stories/hooks/useAutoSequence plus engagementDashboard/dataView/colors are reachable from .stories.tsx — that is their intended role. None are orphans.

🤖 Generated with Claude Code

Review in cubic

Task: ARCH-2373

Summary by CodeRabbit

  • Removed Features

    • Removed Matrix federation tools, including server management and federated room search.
    • Removed the mentions side panel and related mention notification displays.
    • Removed the legacy login redirect route.
    • Removed surrounding-message navigation and several unused sidebar, homepage, chat, and notification components.
  • Refactor

    • Cleaned up obsolete utilities, error handling, testing helpers, and exports that supported retired functionality.

Delete client modules that are unreachable from the Meteor client
entrypoint and not imported by anything else in the monorepo.

Removed:

- Matrix federation search (12 files): the whole
  `sidebar/header/MatrixFederationSearch` folder plus its only entry
  point, `useMatrixFederationItems`, which nothing imported.
- Message notification components (4 files): `MessageNotification` and
  its `AllMention`/`MeMention`/`UnreadMessages` variants. The live
  notification path is `hooks/notification/useNewMessageNotification`.
- Duplicates superseded by surviving copies elsewhere:
  `Wizard/WizardActions` (see `@rocket.chat/ui-client`),
  `sidebar/SidebarPortal` (see `portals/SidebarPortal`),
  `views/navigation/sidebar/hooks/useCollapsedGroups` (see
  `sidebar/hooks` and `views/navigation/hooks`), and
  `views/root/LoginRoute` (only `SAMLLoginRoute` is routed).
- Unused barrel `Timestamp/TimestampPicker/index.ts`; consumers already
  deep-import `TimestampPickerModal`.
- Assorted leftovers: `ansispan`, `HomepageGridItem`,
  `SidePanelMentions`, `omnichannel/directory/chats/Chat`,
  `VisitorDoesNotExistError`, `RoomMembers/types`,
  `stories/contexts/QueryClientProviderMock`.
- `waitForElement` and `useLoadSurroundingMessages`, along with their
  specs; both were kept alive only by their own tests.

No behavior change: every deletion was verified to have no remaining
importer across apps/, packages/ and ee/.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@tassoevan
tassoevan requested a review from a team as a code owner August 13, 2026 14:30
@tassoevan tassoevan added this to the 8.8.0 milestone Aug 13, 2026
@dionisio-bot

dionisio-bot Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

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

  • This PR is missing the 'stat: QA assured' label

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot

changeset-bot Bot commented Aug 13, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 00fff1c

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 Aug 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 888c12c8-5cf7-406b-b615-37646c680457

📥 Commits

Reviewing files that changed from the base of the PR and between 5deefe2 and 00fff1c.

📒 Files selected for processing (32)
  • apps/meteor/client/components/Wizard/WizardActions.tsx
  • apps/meteor/client/components/message/notification/AllMentionNotification.tsx
  • apps/meteor/client/components/message/notification/MeMentionNotification.tsx
  • apps/meteor/client/components/message/notification/MessageNotification.tsx
  • apps/meteor/client/components/message/notification/UnreadMessagesNotification.tsx
  • apps/meteor/client/components/message/toolbar/items/actions/Timestamp/TimestampPicker/index.ts
  • apps/meteor/client/lib/errors/VisitorDoesNotExistError.ts
  • apps/meteor/client/lib/utils/waitForElement.spec.ts
  • apps/meteor/client/lib/utils/waitForElement.ts
  • apps/meteor/client/navbar/NavBarPagesGroup/hooks/useMatrixFederationItems.ts
  • apps/meteor/client/sidebar/SidebarPortal.tsx
  • apps/meteor/client/sidebar/header/MatrixFederationSearch/FederatedRoomList.tsx
  • apps/meteor/client/sidebar/header/MatrixFederationSearch/FederatedRoomListEmptyPlaceholder.tsx
  • apps/meteor/client/sidebar/header/MatrixFederationSearch/FederatedRoomListErrorBoundary.tsx
  • apps/meteor/client/sidebar/header/MatrixFederationSearch/FederatedRoomListItem.tsx
  • apps/meteor/client/sidebar/header/MatrixFederationSearch/MatrixFederationManageServerModal.tsx
  • apps/meteor/client/sidebar/header/MatrixFederationSearch/MatrixFederationRemoveServerList.tsx
  • apps/meteor/client/sidebar/header/MatrixFederationSearch/MatrixFederationSearch.tsx
  • apps/meteor/client/sidebar/header/MatrixFederationSearch/MatrixFederationSearchModalContent.tsx
  • apps/meteor/client/sidebar/header/MatrixFederationSearch/index.ts
  • apps/meteor/client/sidebar/header/MatrixFederationSearch/useInfiniteFederationSearchPublicRooms.ts
  • apps/meteor/client/sidebar/header/MatrixFederationSearch/useMatrixServerList.ts
  • apps/meteor/client/stories/contexts/QueryClientProviderMock.tsx
  • apps/meteor/client/views/admin/viewLogs/ansispan.ts
  • apps/meteor/client/views/home/HomepageGridItem.tsx
  • apps/meteor/client/views/navigation/sidebar/hooks/useCollapsedGroups.ts
  • apps/meteor/client/views/navigation/sidepanel/tabs/SidePanelMentions.tsx
  • apps/meteor/client/views/omnichannel/directory/chats/Chat.tsx
  • apps/meteor/client/views/room/MessageList/hooks/useLoadSurroundingMessages.spec.ts
  • apps/meteor/client/views/room/MessageList/hooks/useLoadSurroundingMessages.ts
  • apps/meteor/client/views/room/contextualBar/RoomMembers/types.ts
  • apps/meteor/client/views/root/LoginRoute.tsx
💤 Files with no reviewable changes (32)
  • apps/meteor/client/sidebar/header/MatrixFederationSearch/useMatrixServerList.ts
  • apps/meteor/client/views/root/LoginRoute.tsx
  • apps/meteor/client/components/message/notification/UnreadMessagesNotification.tsx
  • apps/meteor/client/lib/utils/waitForElement.ts
  • apps/meteor/client/components/Wizard/WizardActions.tsx
  • apps/meteor/client/sidebar/SidebarPortal.tsx
  • apps/meteor/client/components/message/notification/MeMentionNotification.tsx
  • apps/meteor/client/components/message/notification/AllMentionNotification.tsx
  • apps/meteor/client/sidebar/header/MatrixFederationSearch/FederatedRoomListErrorBoundary.tsx
  • apps/meteor/client/views/navigation/sidebar/hooks/useCollapsedGroups.ts
  • apps/meteor/client/views/omnichannel/directory/chats/Chat.tsx
  • apps/meteor/client/sidebar/header/MatrixFederationSearch/FederatedRoomListEmptyPlaceholder.tsx
  • apps/meteor/client/components/message/toolbar/items/actions/Timestamp/TimestampPicker/index.ts
  • apps/meteor/client/sidebar/header/MatrixFederationSearch/useInfiniteFederationSearchPublicRooms.ts
  • apps/meteor/client/lib/errors/VisitorDoesNotExistError.ts
  • apps/meteor/client/sidebar/header/MatrixFederationSearch/index.ts
  • apps/meteor/client/sidebar/header/MatrixFederationSearch/FederatedRoomListItem.tsx
  • apps/meteor/client/views/navigation/sidepanel/tabs/SidePanelMentions.tsx
  • apps/meteor/client/lib/utils/waitForElement.spec.ts
  • apps/meteor/client/sidebar/header/MatrixFederationSearch/MatrixFederationManageServerModal.tsx
  • apps/meteor/client/views/home/HomepageGridItem.tsx
  • apps/meteor/client/views/admin/viewLogs/ansispan.ts
  • apps/meteor/client/components/message/notification/MessageNotification.tsx
  • apps/meteor/client/navbar/NavBarPagesGroup/hooks/useMatrixFederationItems.ts
  • apps/meteor/client/views/room/MessageList/hooks/useLoadSurroundingMessages.spec.ts
  • apps/meteor/client/sidebar/header/MatrixFederationSearch/MatrixFederationSearch.tsx
  • apps/meteor/client/sidebar/header/MatrixFederationSearch/MatrixFederationRemoveServerList.tsx
  • apps/meteor/client/sidebar/header/MatrixFederationSearch/MatrixFederationSearchModalContent.tsx
  • apps/meteor/client/sidebar/header/MatrixFederationSearch/FederatedRoomList.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/types.ts
  • apps/meteor/client/views/room/MessageList/hooks/useLoadSurroundingMessages.ts
  • apps/meteor/client/stories/contexts/QueryClientProviderMock.tsx
📜 Recent review details
⏰ Context from checks skipped due to timeout. (5)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: Hacktron Security Check
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build

Walkthrough

The change removes obsolete client components, hooks, utilities, types, tests, and exports. It includes removal of the Matrix federation search flow and related server and room management UI.

Changes

Client module cleanup

Layer / File(s) Summary
Remove Matrix federation search flow
apps/meteor/client/sidebar/header/MatrixFederationSearch/*
Removes federation search, server management, room listing, query hooks, error handling, and related exports.
Remove obsolete client components and utilities
apps/meteor/client/components/*, apps/meteor/client/lib/*, apps/meteor/client/sidebar/*, apps/meteor/client/views/*
Removes unused notifications, layout components, navigation hooks, error types, view components, and utility implementations.
Remove associated tests and supporting modules
apps/meteor/client/lib/utils/*, apps/meteor/client/views/room/MessageList/hooks/*, apps/meteor/client/stories/contexts/*
Deletes tests and mock providers for removed utilities and hooks.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Mergeability Score: ⚪ Minimal · up to 00fff

This change removes unreachable client files without altering the live application paths; no actionable merge-blocking risk remains after normal checks and review.

Suggested labels: type: chore

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the removal of unused modules under apps/meteor/client.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tassoevan

Copy link
Copy Markdown
Member Author

/jira ARCH

@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 32 files

Re-trigger cubic

@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.97%. Comparing base (5deefe2) to head (00fff1c).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #41775      +/-   ##
===========================================
- Coverage    69.00%   68.97%   -0.03%     
===========================================
  Files         4224     4222       -2     
  Lines       166094   165998      -96     
  Branches     29564    29550      -14     
===========================================
- Hits        114608   114497     -111     
- Misses       46330    46349      +19     
+ Partials      5156     5152       -4     
Flag Coverage Δ
e2e 58.87% <ø> (-0.03%) ⬇️
e2e-api 45.75% <ø> (+<0.01%) ⬆️
unit 70.88% <ø> (-0.05%) ⬇️

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants