Skip to content

Conversation

@juliajforesti
Copy link
Contributor

@juliajforesti juliajforesti commented Sep 22, 2025

FDR-136

Proposed changes (including videos or screenshots)

Remove Search federated rooms from Create new menu

Issue(s)

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Refactor
    • Simplified room creation menus by removing federation/Matrix “Explore” options. Users will now only see the “Create new” options when permitted, resulting in a cleaner, more consistent experience.
  • Chores
    • Updated release metadata to reflect a patch update.
    • Removed the deprecated “search federated rooms” entry from release data (no functional impact).

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Sep 22, 2025

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
Copy link

changeset-bot bot commented Sep 22, 2025

🦋 Changeset detected

Latest commit: e2c46e6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 39 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/freeswitch Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/http-router Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/models Patch
@rocket.chat/network-broker Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/mock-providers Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/ui-voip Patch
@rocket.chat/instance-status Patch
@rocket.chat/omni-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 22, 2025

Walkthrough

Removes federation-related logic from two client hooks that build “Create New” menus, eliminating the “Explore/Search federated rooms” section. Menus now return only the permission-gated “Create new” items. Adds a changeset entry for a patch bump noting the removal of deprecated federated search.

Changes

Cohort / File(s) Summary
Release metadata
\.changeset/bright-boats-speak.md
Adds patch changeset for @rocket.chat/meteor, noting removal of deprecated “search federated rooms”.
NavBar Create New menu
apps/meteor/client/NavBarV2/NavBarPagesGroup/hooks/useCreateNewMenu.tsx
Removes federation/enterprise imports and logic; deletes “Explore” section; always returns only Create_new section filtered by permissions.
Sidebar Create Room menu
apps/meteor/client/sidebar/header/actions/hooks/useCreateRoomMenu.tsx
Removes federation/enterprise checks and matrix items; drops “Explore” section; returns only Create_new section when showCreate is true.

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant UI as Client UI
  participant Hook as useCreateNewMenu / useCreateRoom
  participant ACL as Permissions

  User->>UI: Open "Create New" menu
  UI->>Hook: Build sections
  Hook->>ACL: Check create permissions
  ACL-->>Hook: Allowed actions
  Hook-->>UI: Sections: [Create_new(items)]
  UI-->>User: Render only Create_new options
  Note over Hook,UI: Federation/Explore logic removed
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • ggazzo
  • dougfabris

Poem

I nibbled old links from the menu’s bloom,
Snipped the federated path of doom.
Now only fresh sprouts greet the view—
“Create new” greens, crisp and true.
Thump-thump! My paws approve this prune,
Fewer trails, less chance to swoon.
Onward, carrots—ship it soon! 🥕🐇

Pre-merge checks and finishing touches

✅ 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 "fix: remove search federated" directly relates to removing the broken "Search federated rooms" option from the Create New menu as described in the PR objectives and linked issue, and therefore summarizes the primary change. It is concise but slightly terse and could be clearer by quoting the option name or using more natural wording such as 'fix: remove "Search federated rooms" option'.
Linked Issues Check ✅ Passed The changes remove federation-related imports and menu items in useCreateNewMenu and useCreateRoomMenu and include a changeset entry noting removal of the deprecated "search federated rooms" option, which satisfies FDR-136's requirement to stop displaying the broken option in the Create New menu. No other code relevant to the feature remains and there are no public API changes that conflict with the linked issue's objective.
Out of Scope Changes Check ✅ Passed All modified files are limited to removing federation-related UI items and a changeset entry; there are no unrelated feature additions or edits to files outside the scope of removing the broken "Search federated rooms" option. Therefore no out-of-scope changes were detected.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/remove-search-federated

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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

@codecov
Copy link

codecov bot commented Sep 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.32%. Comparing base (ad9dbd7) to head (e2c46e6).
⚠️ Report is 30 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #37031      +/-   ##
===========================================
- Coverage    66.33%   66.32%   -0.02%     
===========================================
  Files         3391     3381      -10     
  Lines       115308   115325      +17     
  Branches     21129    21233     +104     
===========================================
- Hits         76494    76488       -6     
- Misses       36198    36226      +28     
+ Partials      2616     2611       -5     
Flag Coverage Δ
e2e 57.17% <100.00%> (+0.26%) ⬆️
unit 71.24% <ø> (-0.15%) ⬇️

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.

@rodrigok rodrigok added this to the 7.11.0 milestone Sep 22, 2025
@juliajforesti juliajforesti marked this pull request as ready for review September 23, 2025 15:43
@juliajforesti juliajforesti requested a review from a team as a code owner September 23, 2025 15:43
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (3)
.changeset/bright-boats-speak.md (1)

2-5: Changelog is fine; consider clarifying scope in the note.

Suggest: “Remove ‘Search federated rooms’ entry from the Create New menu (FDR-136)” for clearer release notes context.

apps/meteor/client/NavBarV2/NavBarPagesGroup/hooks/useCreateNewMenu.tsx (1)

14-17: Minor: align variable naming with hook for readability.

useCreateNewItems()createRoomItems is slightly inconsistent. Consider createNewItems.

Apply within this block:

- const sections = [{ title: t('Create_new'), items: createRoomItems, permission: showCreate }];
+ const sections = [{ title: t('Create_new'), items: createNewItems, permission: showCreate }];

And also update the declaration above:

// elsewhere in this file:
const createNewItems = useCreateNewItems();
apps/meteor/client/sidebar/header/actions/hooks/useCreateRoomMenu.tsx (1)

6-6: Reduce duplication: extract shared CREATE_ROOM_PERMISSIONS.

The same permissions array appears in multiple hooks. Extract to a shared module (e.g., a permissions constants file) and import from both to keep them in sync.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 24fba8d and e2c46e6.

📒 Files selected for processing (3)
  • .changeset/bright-boats-speak.md (1 hunks)
  • apps/meteor/client/NavBarV2/NavBarPagesGroup/hooks/useCreateNewMenu.tsx (1 hunks)
  • apps/meteor/client/sidebar/header/actions/hooks/useCreateRoomMenu.tsx (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-19T15:15:04.642Z
Learnt from: rodrigok
PR: RocketChat/Rocket.Chat#36991
File: apps/meteor/server/services/federation/infrastructure/rocket-chat/adapters/Settings.ts:219-221
Timestamp: 2025-09-19T15:15:04.642Z
Learning: The Federation_Matrix_homeserver_domain setting in apps/meteor/server/services/federation/infrastructure/rocket-chat/adapters/Settings.ts is part of the old federation system and is being deprecated/removed, so configuration issues with this setting should not be flagged for improvement.

Applied to files:

  • .changeset/bright-boats-speak.md
  • apps/meteor/client/sidebar/header/actions/hooks/useCreateRoomMenu.tsx
🔇 Additional comments (1)
apps/meteor/client/NavBarV2/NavBarPagesGroup/hooks/useCreateNewMenu.tsx (1)

14-17: Action required — federation UI items remain; do not approve

Search found federation-related UI hooks/labels still present; remove or update these before approving:

  • apps/meteor/client/sidebar/header/actions/hooks/useMatrixFederationItems.ts
  • apps/meteor/client/NavBarV2/NavBarPagesGroup/hooks/useMatrixFederationItems.ts
  • apps/meteor/client/hooks/useIsFederationEnabled.ts
  • apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx
  • apps/meteor/client/views/room/composer/ComposerFederation/ComposerFederation.tsx
  • apps/meteor/client/sidebar/header/CreateChannel/CreateChannelModal.tsx
  • apps/meteor/client/NavBarV2/NavBarPagesGroup/actions/CreateChannelModal.tsx

Likely an incorrect or invalid review comment.

Comment on lines +14 to 17
const sections = [{ title: t('Create_new'), items: createRoomItems, permission: showCreate }];

return sections.filter((section) => section.permission);
};
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

🧩 Analysis chain

LGTM — menu now only shows valid “Create new” actions.

Matches the goal to remove the federated search entry.

Quick check for leftovers:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n -C2 --type=ts --type=tsx -S \
  -e 'useMatrixFederationItems' \
  -e 'useIsFederationEnabled' \
  -e '\bisMatrixEnabled\b' \
  -e 'Search[_ ]federated[_ ]rooms' \
  apps/meteor || true

Length of output: 27


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== show file (if exists) =="
sed -n '1,240p' apps/meteor/client/sidebar/header/actions/hooks/useCreateRoomMenu.tsx || true

echo
echo "== search for federation-related symbols =="
rg -n -C2 -S \
  -e 'useMatrixFederationItems' \
  -e 'useIsFederationEnabled' \
  -e '\bisMatrixEnabled\b' \
  -e 'Search[_ ]federated[_ ]rooms' \
  apps/meteor || true

echo
echo "== broader search for 'federat' occurrences =="
rg -n -C2 -S 'federat' apps/meteor || true

Length of output: 302103


LGTM — Create menu now filters correctly; leftover federated search items remain

useCreateRoomMenu.tsx correctly filters the Create_new section by permission. The Matrix federation search item still exists in:

  • apps/meteor/client/sidebar/header/actions/hooks/useMatrixFederationItems.ts
  • apps/meteor/client/NavBarV2/NavBarPagesGroup/hooks/useMatrixFederationItems.ts

Remove or gate those if the intent was to remove the federated search entry globally.

🤖 Prompt for AI Agents
In apps/meteor/client/sidebar/header/actions/hooks/useCreateRoomMenu.tsx lines
14-17 you correctly filter the Create_new section by permission, but federated
search menu items still appear elsewhere; update
apps/meteor/client/sidebar/header/actions/hooks/useMatrixFederationItems.ts and
apps/meteor/client/NavBarV2/NavBarPagesGroup/hooks/useMatrixFederationItems.ts
to either remove the Matrix federation search item or gate it behind the same
permission check used for Create_new (add a permission prop/flag, return [] when
not allowed), ensuring these hooks return no items when the user lacks the
permission so the federated search entry is removed globally.

@ggazzo ggazzo merged commit 898d8b8 into develop Sep 24, 2025
73 of 75 checks passed
@ggazzo ggazzo deleted the fix/remove-search-federated branch September 24, 2025 21:57
ggazzo added a commit that referenced this pull request Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants