chore: remove orphan modules under apps/meteor/client - #41775
Conversation
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>
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (32)
💤 Files with no reviewable changes (32)
📜 Recent review details⏰ Context from checks skipped due to timeout. (5)
WalkthroughThe 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. ChangesClient module cleanup
Estimated code review effort: 3 (Moderate) | ~20 minutes Mergeability Score: ⚪ Minimal · up to 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: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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. Comment |
|
/jira ARCH |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
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, dynamicimport(),require, and re-exports across all 3,007 files underclient/— then hand-verified every candidate with direct greps overapps/,packages/, andee/.32 files, 1,280 deletions.
Matrix federation search (12 files, ~530 LOC)
The entire
sidebar/header/MatrixFederationSearchfolder 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)
MessageNotificationand itsAllMention/MeMention/UnreadMessagesvariants. The three leaves imported the base; nothing imported the leaves. The live notification path ishooks/notification/useNewMessageNotification, which is untouched.Duplicates superseded by surviving copies
components/Wizard/WizardActions@rocket.chat/ui-clientsidebar/SidebarPortalportals/SidebarPortalviews/navigation/sidebar/hooks/useCollapsedGroupssidebar/hooksandviews/navigation/hooksviews/root/LoginRouteSAMLLoginRouteis routedUnused barrel
components/message/toolbar/items/actions/Timestamp/TimestampPicker/index.ts— the sole consumer,useTimestampAction, already deep-importsTimestampPickerModal.Assorted leftovers
ansispan,HomepageGridItem,SidePanelMentions,omnichannel/directory/chats/Chat,VisitorDoesNotExistError,RoomMembers/types,stories/contexts/QueryClientProviderMock.Dead code kept alive only by its own tests
waitForElementanduseLoadSurroundingMessages, along with their specs. Both had no consumer other than the spec file testing them.Verification
tsc --noEmit --skipLibCheckoverapps/meteorpasses clean.useNewMessageNotification,portals/SidebarPortal/SidebarPortal, the two liveuseCollapsedGroups,SAMLLoginRoute) all resolve to surviving files that remain on disk.No behavior change, so no changeset. Please add an empty one if CI requires it on
apps/meteordiffs.Kept deliberately
client/definitions/*.d.tsare ambient declarations pulled in via tsconfiginclude, andstories/hooks/useAutoSequenceplusengagementDashboard/dataView/colorsare reachable from.stories.tsx— that is their intended role. None are orphans.🤖 Generated with Claude Code
Task: ARCH-2373
Summary by CodeRabbit
Removed Features
Refactor