-
Notifications
You must be signed in to change notification settings - Fork 13k
chore: bump fuselage package #37699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: bump fuselage package #37699
Conversation
|
Looks like this PR is ready to merge! 🎉 |
WalkthroughReordered object spreads when building room props for avatars, strengthened typing and option shapes for several autocomplete components, removed ref destructuring from some renderItem handlers, and updated many package.json files to bump Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (3)
⏰ 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). (3)
🔇 Additional comments (1)
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 |
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #37699 +/- ##
===========================================
- Coverage 67.79% 67.78% -0.01%
===========================================
Files 3449 3449
Lines 114030 113987 -43
Branches 20963 20956 -7
===========================================
- Hits 77305 77266 -39
+ Misses 34606 34603 -3
+ Partials 2119 2118 -1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (3)
packages/ui-video-conf/package.json (1)
26-26: Verify version range expansion and fuselage 0.69.0 compatibility.The version constraint has been expanded from ~0.68.1 to ^0.69.0. This allows for any minor version within 0.x (0.69.0, 0.70.0, etc.) rather than just patch updates. Confirm that code changes elsewhere in the PR are compatible with this broader version range, and that unit tests pass.
ee/packages/ui-theming/package.json (1)
8-8: Verify version range expansion and fuselage 0.69.0 compatibility.The version constraint has been broadened from ~0.68.1 to ^0.69.0, permitting any minor version within 0.x. Ensure that EE-specific code changes are compatible with the new version and that all tests pass.
packages/ui-contexts/package.json (1)
25-25: Verify version range expansion and fuselage 0.69.0 compatibility.The version constraint has been expanded from ~0.68.1 to ^0.69.0. Note that fuselage is listed as a devDependency but not in peerDependencies. Confirm that any type definitions or runtime utilities exported from this package remain compatible with the broader version range.
🧹 Nitpick comments (4)
apps/meteor/client/views/teams/contextualBar/channels/AddExistingModal/RoomsAvailableForTeamsAutoComplete.tsx (1)
56-63: Consider aligning avatar construction pattern withrenderSelected.
renderItemexplicitly constructs the room object{ _id: value, type: label.type, avatarETag: label.avatarETag }whilerenderSelecteduses{ ...label, type: label?.type || 'c', _id: value }. For consistency and maintainability, consider spreadinglabelhere as well:-avatar={<RoomAvatar room={{ _id: value, type: label.type, avatarETag: label.avatarETag }} size='x20' />} +avatar={<RoomAvatar room={{ ...label, type: label.type, _id: value }} size='x20' />}apps/meteor/client/components/UserAndRoomAutoCompleteMultiple/UserAndRoomAutoCompleteMultiple.tsx (1)
38-69: Consider avoiding array spread in reduce for better performance.The current implementation creates a new array on each iteration with
[...acc, {...}], resulting in O(n²) time complexity. With up to 100 rooms being processed, consider usingpushwith a mutable accumulator:const options = useMemo( () => - rooms.reduce<Exclude<UserAndRoomAutoCompleteMultipleProps['options'], undefined>>((acc, room) => { + rooms.reduce<{ value: string; label: { name: string | undefined; avatarETag: string | undefined; type: RoomType } }[]>((acc, room) => { if (acc.length === limit) return acc; if (isDirectMessageRoom(room) && (room.blocked || room.blocker)) { return acc; } if (roomCoordinator.readOnly(Rooms.state.get(room.rid), user)) return acc; - return [ - ...acc, - { - value: room.rid, - label: { - name: room.fname || room.name, - avatarETag: room.avatarETag, - type: room.t, - }, + acc.push({ + value: room.rid, + label: { + name: room.fname || room.name, + avatarETag: room.avatarETag, + type: room.t, }, - ]; + }); + return acc; }, []), [limit, rooms, user], -) as { - value: string; - label: { - name: string | undefined; - avatarETag: string | undefined; - type: RoomType; - }; -}[]; +);This also eliminates the need for the type assertion at lines 62-69.
apps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultipleOption.tsx (1)
31-31: Thekeyprop onOptionmay be unnecessary.The
keyprop is typically needed on elements within a mapped list, not on the rendered element itself. If this component is rendered within a map (e.g., by the autocomplete), the key should be set at the call site, not internally. Thiskeywill be ignored by React.-key={username}apps/meteor/client/components/RoomAutoComplete/RoomAutoComplete.tsx (1)
71-84: Unify RoomAvatar room prop construction betweenrenderSelectedandrenderItemThe new
renderSelectedpattern ({ ...label, type: label?.type || 'c', _id: value }) is good: it preserves label fields, ensures a fallbacktype, and guarantees_idcomes fromvalue. For consistency and to avoid subtle differences in avatar behavior, I’d recommend using the same pattern inrenderIteminstead ofroom={{ _id: value, ...label }}.Suggested change:
- renderItem={({ value, label, ...props }) => ( - <Option {...props} label={label.name} avatar={<RoomAvatar size={AVATAR_SIZE} room={{ _id: value, ...label }} />} /> - )} + renderItem={({ value, label, ...props }) => ( + <Option + {...props} + label={label.name} + avatar={ + <RoomAvatar size={AVATAR_SIZE} room={{ ...label, type: label?.type || 'c', _id: value }} /> + } + /> + )}
📜 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.
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (20)
apps/meteor/client/components/RoomAutoComplete/RoomAutoComplete.tsx(1 hunks)apps/meteor/client/components/RoomAutoCompleteMultiple/RoomAutoCompleteMultiple.tsx(2 hunks)apps/meteor/client/components/UserAndRoomAutoCompleteMultiple/UserAndRoomAutoCompleteMultiple.tsx(4 hunks)apps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultipleOption.tsx(2 hunks)apps/meteor/client/views/omnichannel/components/AutoCompleteDepartmentMultiple.tsx(1 hunks)apps/meteor/client/views/omnichannel/components/AutoCompleteMonitors.tsx(1 hunks)apps/meteor/client/views/teams/contextualBar/channels/AddExistingModal/RoomsAvailableForTeamsAutoComplete.tsx(1 hunks)apps/meteor/package.json(1 hunks)apps/uikit-playground/package.json(1 hunks)ee/packages/ui-theming/package.json(1 hunks)packages/fuselage-ui-kit/package.json(1 hunks)packages/gazzodown/package.json(1 hunks)packages/storybook-config/package.json(1 hunks)packages/ui-avatar/package.json(1 hunks)packages/ui-client/package.json(1 hunks)packages/ui-composer/package.json(1 hunks)packages/ui-contexts/package.json(1 hunks)packages/ui-video-conf/package.json(1 hunks)packages/ui-voip/package.json(1 hunks)packages/web-ui-registration/package.json(1 hunks)
🧰 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/teams/contextualBar/channels/AddExistingModal/RoomsAvailableForTeamsAutoComplete.tsxapps/meteor/client/components/RoomAutoCompleteMultiple/RoomAutoCompleteMultiple.tsxapps/meteor/client/components/UserAndRoomAutoCompleteMultiple/UserAndRoomAutoCompleteMultiple.tsxapps/meteor/client/components/RoomAutoComplete/RoomAutoComplete.tsxapps/meteor/client/views/omnichannel/components/AutoCompleteDepartmentMultiple.tsxapps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultipleOption.tsxapps/meteor/client/views/omnichannel/components/AutoCompleteMonitors.tsx
🧠 Learnings (4)
📚 Learning: 2025-09-19T15:15:04.642Z
Learnt from: rodrigok
Repo: RocketChat/Rocket.Chat PR: 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:
apps/meteor/package.json
📚 Learning: 2025-10-28T16:53:42.761Z
Learnt from: ricardogarim
Repo: RocketChat/Rocket.Chat PR: 37205
File: ee/packages/federation-matrix/src/FederationMatrix.ts:296-301
Timestamp: 2025-10-28T16:53:42.761Z
Learning: In the Rocket.Chat federation-matrix integration (ee/packages/federation-matrix/), the createRoom method from rocket.chat/federation-sdk will support a 4-argument signature (userId, roomName, visibility, displayName) in newer versions. Code using this 4-argument call is forward-compatible with planned library updates and should not be flagged as an error.
Applied to files:
apps/meteor/package.jsonapps/meteor/client/views/teams/contextualBar/channels/AddExistingModal/RoomsAvailableForTeamsAutoComplete.tsxapps/meteor/client/components/RoomAutoCompleteMultiple/RoomAutoCompleteMultiple.tsxapps/meteor/client/components/UserAndRoomAutoCompleteMultiple/UserAndRoomAutoCompleteMultiple.tsxapps/meteor/client/components/RoomAutoComplete/RoomAutoComplete.tsx
📚 Learning: 2025-11-27T17:56:26.050Z
Learnt from: MartinSchoeler
Repo: RocketChat/Rocket.Chat PR: 37557
File: apps/meteor/client/views/admin/ABAC/AdminABACRooms.tsx:115-116
Timestamp: 2025-11-27T17:56:26.050Z
Learning: In Rocket.Chat, the GET /v1/abac/rooms endpoint (implemented in ee/packages/abac/src/index.ts) only returns rooms where abacAttributes exists and is not an empty array (query: { abacAttributes: { $exists: true, $ne: [] } }). Therefore, in components consuming this endpoint (like AdminABACRooms.tsx), room.abacAttributes is guaranteed to be defined for all returned rooms, and optional chaining before calling array methods like .join() is sufficient without additional null coalescing.
Applied to files:
apps/meteor/client/views/teams/contextualBar/channels/AddExistingModal/RoomsAvailableForTeamsAutoComplete.tsxapps/meteor/client/components/RoomAutoCompleteMultiple/RoomAutoCompleteMultiple.tsxapps/meteor/client/components/UserAndRoomAutoCompleteMultiple/UserAndRoomAutoCompleteMultiple.tsxapps/meteor/client/components/RoomAutoComplete/RoomAutoComplete.tsx
📚 Learning: 2025-11-17T15:07:13.273Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37398
File: packages/fuselage-ui-kit/src/surfaces/FuselageSurfaceRenderer.tsx:357-363
Timestamp: 2025-11-17T15:07:13.273Z
Learning: In packages/fuselage-ui-kit/src/surfaces/FuselageSurfaceRenderer.tsx, IconElement is a presentational, non-actionable element that does not require wrapping in AppIdProvider, similar to plain_text and mrkdwn renderers. Only actionable elements (those with actions, actionId, or interactive behavior) should be wrapped in AppIdProvider.
Applied to files:
apps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultipleOption.tsx
🧬 Code graph analysis (2)
apps/meteor/client/components/UserAndRoomAutoCompleteMultiple/UserAndRoomAutoCompleteMultiple.tsx (1)
packages/core-typings/src/IRoom.ts (1)
isDirectMessageRoom(154-154)
apps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultipleOption.tsx (1)
packages/core-typings/src/IUser.ts (1)
IUser(186-256)
🔇 Additional comments (12)
apps/meteor/client/views/omnichannel/components/AutoCompleteMonitors.tsx (1)
34-36: LGTM!The simplified destructuring pattern aligns with the fuselage 0.69.0 API update. The ref is now correctly forwarded via props spread to
CheckOption.apps/meteor/client/views/teams/contextualBar/channels/AddExistingModal/RoomsAvailableForTeamsAutoComplete.tsx (1)
48-55: LGTM!The avatar prop construction correctly spreads
labelfirst, then explicitly setstypewith a fallback to'c'and_idfromvalue. This ensures deterministic field precedence and aligns with the pattern used in other autocomplete components in this PR.apps/meteor/client/views/omnichannel/components/AutoCompleteDepartmentMultiple.tsx (1)
69-81: LGTM!The simplified destructuring pattern is consistent with other autocomplete components in this PR and aligns with the fuselage 0.69.0 API changes.
apps/meteor/client/components/UserAndRoomAutoCompleteMultiple/UserAndRoomAutoCompleteMultiple.tsx (2)
43-47: Good defensive guards for blocked DMs and read-only rooms.These guards appropriately filter out rooms where the user cannot meaningfully interact: blocked direct messages and read-only rooms. This prevents user confusion when selecting rooms.
79-86: LGTM!The
ReactElementreturn type annotation and the updatedRoomAvatarprop construction align with the broader refactoring pattern in this PR.apps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultipleOption.tsx (3)
6-12: The broadenedlabeltype requires runtime validation.Changing
labelfrom a specific object type toReactNodenecessitates the runtime type guard at lines 19-21. While this works, it shifts type safety from compile-time to runtime. Consider whether the upstream component could provide better typing for the label prop to avoid the runtime check.
18-23: Runtime type guard and assertion pattern is acceptable.The guard at lines 19-21 correctly validates the label structure before the type assertion. This is a reasonable pattern when the parent component passes broadly-typed props.
29-30: Good handling of federated users.The conditional avatar/icon rendering properly distinguishes federated users (globe icon) from regular users (avatar), providing appropriate visual feedback.
apps/meteor/client/components/RoomAutoCompleteMultiple/RoomAutoCompleteMultiple.tsx (1)
53-67: Avatar room prop construction is correct and consistentSpreading
labelfirst and then overridingtype(with a'c'fallback) and_idfromvaluemakes theroomobject deterministic while preserving all label-derived fields, and you’ve applied the same pattern in bothrenderSelectedandrenderItem, which looks solid.packages/storybook-config/package.json (1)
24-24: Verify version constraint change from tilde to caret and compatibility with fuselage 0.69.0.The version constraint is changing from
~0.68.1(patch-level range) to^0.69.0(minor-level range), which allows any version from 0.69.0 to <1.0.0 in future installs. While this is a factual change, fuselage version 0.69.0 does not appear to have a public release in the RocketChat/fuselage repository, making it unclear whether this update is necessary or what breaking changes may be introduced. Confirm that fuselage 0.69.0 is a valid release and verify that all consuming components have been updated accordingly before merging.apps/meteor/package.json (1)
258-258: Critical: Verify runtime dependency upgrade and test coverage for apps/meteor.This is a runtime dependency (not devDependency) for the main Meteor application. The version range change from ~0.68.1 to ^0.69.0 is significant—it permits any minor version within 0.x (0.70.0, 0.71.0, etc.). Given that fuselage is a core UI component library, any incompatibility could break the entire application.
Ensure that:
- The autocomplete and type annotation refactors mentioned in the PR summary have been fully applied to this package
- All end-to-end tests (test:e2e) pass with fuselage 0.69.0
- UI regression testing has been performed
- No breaking changes in fuselage 0.69.0 affect this application
- Version locking or constraint tightening is considered if stability is critical
packages/gazzodown/package.json (1)
35-35: This version update is compatible and requires no action.@rocket.chat/fuselage 0.69.0 contains no breaking changes—only minor updates (FramedIcon style refinement and Menu scroll fix). The caret version range (^0.69.0) is appropriate for semantic versioning and is safer than the previous tilde constraint, as it allows compatible minor and patch updates. The gazzodown package's existing imports (Message, CheckBox, Tag, Box, etc.) remain fully compatible with this release.
Likely an incorrect or invalid review comment.
82ae6ac to
6f1cdd4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
apps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultipleOption.tsx (1)
27-27: Consider removingkeyprop from this component.The
keyprop is typically needed on elements rendered in a list by the parent component, not on the child component itself. Since this is used asrenderIteminOptions, the parent likely handles keying. This won't cause issues but is unnecessary here.<Option {...props} data-qa-type='autocomplete-user-option' avatar={_federated ? undefined : <UserAvatar username={username || ''} size='x20' />} icon={_federated ? 'globe' : undefined} - key={username} label={apps/meteor/client/components/UserAndRoomAutoCompleteMultiple/UserAndRoomAutoCompleteMultiple.tsx (1)
38-69: Consider extracting the options type for cleaner typing.The type assertion after reduce works but is verbose. You could extract a type alias to avoid the cast.
+type RoomOption = { + value: string; + label: { + name: string | undefined; + avatarETag: string | undefined; + type: RoomType; + }; +}; + const options = useMemo( () => - rooms.reduce<Exclude<UserAndRoomAutoCompleteMultipleProps['options'], undefined>>((acc, room) => { + rooms.reduce<RoomOption[]>((acc, room) => { // ... existing logic }, []), [limit, rooms, user], -) as { - value: string; - label: { - name: string | undefined; - avatarETag: string | undefined; - type: RoomType; - }; -}[]; +);
📜 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.
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (22)
apps/meteor/client/components/RoomAutoComplete/RoomAutoComplete.tsx(1 hunks)apps/meteor/client/components/RoomAutoCompleteMultiple/RoomAutoCompleteMultiple.tsx(2 hunks)apps/meteor/client/components/UserAndRoomAutoCompleteMultiple/UserAndRoomAutoCompleteMultiple.tsx(4 hunks)apps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultipleFederated.tsx(1 hunks)apps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultipleOption.tsx(2 hunks)apps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultipleOptions.tsx(1 hunks)apps/meteor/client/views/omnichannel/components/AutoCompleteDepartmentMultiple.tsx(1 hunks)apps/meteor/client/views/omnichannel/components/AutoCompleteMonitors.tsx(1 hunks)apps/meteor/client/views/teams/contextualBar/channels/AddExistingModal/RoomsAvailableForTeamsAutoComplete.tsx(1 hunks)apps/meteor/package.json(1 hunks)apps/uikit-playground/package.json(1 hunks)ee/packages/ui-theming/package.json(1 hunks)packages/fuselage-ui-kit/package.json(1 hunks)packages/gazzodown/package.json(1 hunks)packages/storybook-config/package.json(1 hunks)packages/ui-avatar/package.json(1 hunks)packages/ui-client/package.json(1 hunks)packages/ui-composer/package.json(1 hunks)packages/ui-contexts/package.json(1 hunks)packages/ui-video-conf/package.json(1 hunks)packages/ui-voip/package.json(1 hunks)packages/web-ui-registration/package.json(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (14)
- packages/storybook-config/package.json
- apps/meteor/client/views/omnichannel/components/AutoCompleteMonitors.tsx
- packages/ui-voip/package.json
- packages/gazzodown/package.json
- packages/ui-client/package.json
- apps/uikit-playground/package.json
- packages/ui-video-conf/package.json
- apps/meteor/client/components/RoomAutoCompleteMultiple/RoomAutoCompleteMultiple.tsx
- packages/ui-composer/package.json
- ee/packages/ui-theming/package.json
- packages/ui-avatar/package.json
- apps/meteor/client/views/teams/contextualBar/channels/AddExistingModal/RoomsAvailableForTeamsAutoComplete.tsx
- apps/meteor/client/components/RoomAutoComplete/RoomAutoComplete.tsx
- apps/meteor/client/views/omnichannel/components/AutoCompleteDepartmentMultiple.tsx
🧰 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/components/UserAutoCompleteMultiple/UserAutoCompleteMultipleOption.tsxapps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultipleOptions.tsxapps/meteor/client/components/UserAndRoomAutoCompleteMultiple/UserAndRoomAutoCompleteMultiple.tsxapps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultipleFederated.tsx
🧠 Learnings (5)
📓 Common learnings
Learnt from: ricardogarim
Repo: RocketChat/Rocket.Chat PR: 37205
File: ee/packages/federation-matrix/src/FederationMatrix.ts:296-301
Timestamp: 2025-10-28T16:53:42.761Z
Learning: In the Rocket.Chat federation-matrix integration (ee/packages/federation-matrix/), the createRoom method from rocket.chat/federation-sdk will support a 4-argument signature (userId, roomName, visibility, displayName) in newer versions. Code using this 4-argument call is forward-compatible with planned library updates and should not be flagged as an error.
Learnt from: ricardogarim
Repo: RocketChat/Rocket.Chat PR: 37205
File: ee/packages/federation-matrix/src/FederationMatrix.ts:296-301
Timestamp: 2025-10-28T16:53:42.761Z
Learning: In the Rocket.Chat federation-matrix integration (ee/packages/federation-matrix/), the createRoom method from rocket.chat/federation-sdk will support a 4-argument signature (userId, roomName, visibility, displayName) in newer versions. Code using this 4-argument call is forward-compatible with planned library updates and should not be flagged as an error.
📚 Learning: 2025-09-19T15:15:04.642Z
Learnt from: rodrigok
Repo: RocketChat/Rocket.Chat PR: 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:
apps/meteor/package.jsonapps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultipleFederated.tsx
📚 Learning: 2025-10-28T16:53:42.761Z
Learnt from: ricardogarim
Repo: RocketChat/Rocket.Chat PR: 37205
File: ee/packages/federation-matrix/src/FederationMatrix.ts:296-301
Timestamp: 2025-10-28T16:53:42.761Z
Learning: In the Rocket.Chat federation-matrix integration (ee/packages/federation-matrix/), the createRoom method from rocket.chat/federation-sdk will support a 4-argument signature (userId, roomName, visibility, displayName) in newer versions. Code using this 4-argument call is forward-compatible with planned library updates and should not be flagged as an error.
Applied to files:
apps/meteor/package.jsonapps/meteor/client/components/UserAndRoomAutoCompleteMultiple/UserAndRoomAutoCompleteMultiple.tsx
📚 Learning: 2025-11-17T15:07:13.273Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37398
File: packages/fuselage-ui-kit/src/surfaces/FuselageSurfaceRenderer.tsx:357-363
Timestamp: 2025-11-17T15:07:13.273Z
Learning: In packages/fuselage-ui-kit/src/surfaces/FuselageSurfaceRenderer.tsx, IconElement is a presentational, non-actionable element that does not require wrapping in AppIdProvider, similar to plain_text and mrkdwn renderers. Only actionable elements (those with actions, actionId, or interactive behavior) should be wrapped in AppIdProvider.
Applied to files:
apps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultipleOption.tsx
📚 Learning: 2025-11-27T17:56:26.050Z
Learnt from: MartinSchoeler
Repo: RocketChat/Rocket.Chat PR: 37557
File: apps/meteor/client/views/admin/ABAC/AdminABACRooms.tsx:115-116
Timestamp: 2025-11-27T17:56:26.050Z
Learning: In Rocket.Chat, the GET /v1/abac/rooms endpoint (implemented in ee/packages/abac/src/index.ts) only returns rooms where abacAttributes exists and is not an empty array (query: { abacAttributes: { $exists: true, $ne: [] } }). Therefore, in components consuming this endpoint (like AdminABACRooms.tsx), room.abacAttributes is guaranteed to be defined for all returned rooms, and optional chaining before calling array methods like .join() is sufficient without additional null coalescing.
Applied to files:
apps/meteor/client/components/UserAndRoomAutoCompleteMultiple/UserAndRoomAutoCompleteMultiple.tsx
🧬 Code graph analysis (2)
apps/meteor/client/components/UserAndRoomAutoCompleteMultiple/UserAndRoomAutoCompleteMultiple.tsx (1)
packages/core-typings/src/IRoom.ts (1)
isDirectMessageRoom(154-154)
apps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultipleFederated.tsx (1)
apps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultipleOptions.tsx (1)
OptionsContext(22-24)
⏰ 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). (3)
- GitHub Check: 📦 Build Packages
- GitHub Check: CodeQL-Build
- GitHub Check: CodeQL-Build
🔇 Additional comments (8)
packages/web-ui-registration/package.json (1)
26-26: LGTM!Consistent fuselage version bump across the monorepo.
packages/fuselage-ui-kit/package.json (1)
56-56: LGTM!Consistent fuselage version bump in devDependencies.
packages/ui-contexts/package.json (1)
25-25: LGTM!Consistent fuselage version bump.
apps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultipleOptions.tsx (1)
12-19: LGTM!The new
UserLabeltype provides proper structure for the user autocomplete options, and usingOptionType<string, UserLabel>[]improves type safety by eliminating the need for type assertions in consuming components.apps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultipleOption.tsx (1)
14-17: Defensive runtime guard is appropriate.The null check handles edge cases where
labelmight be malformed at runtime, despite TypeScript typing. This is a good defensive pattern for a component used as a render function.apps/meteor/package.json (1)
103-103: Dependency bump to fuselage 0.69.0 is appropriate.The version range change from
~0.68.1to^0.69.0is well-suited for this release, which contains only minor styling improvements and patch fixes with no breaking changes. For0.xversions, caret (^) allows updates to any0.y.zwherey >= 69, providing appropriate flexibility while related fuselage packages (fuselage-forms, fuselage-hooks, etc.) use tilde ranges for stricter patch-level constraints.apps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultipleFederated.tsx (1)
96-96: Type cast removal is correct.The
optionstuple structure[string, UserAutoCompleteOptionType][]is compatible withOptionType<string, UserLabel>[]expected byOptionsContext. SinceUserAutoCompleteOptionTypehas required properties (name,username,_federated?) that structurally match the optional counterparts inUserLabel, the assignment is valid without theas unknown as OptionType[]cast.apps/meteor/client/components/UserAndRoomAutoCompleteMultiple/UserAndRoomAutoCompleteMultiple.tsx (1)
79-94: Consistent RoomAvatar construction pattern.The unified approach of spreading
labelfirst and then setting_id: valueensures explicit values take precedence, which is consistent with the related changes inRoomAutoComplete.tsxandRoomAutoCompleteMultiple.tsx.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
apps/meteor/client/components/UserAndRoomAutoCompleteMultiple/UserAndRoomAutoCompleteMultiple.tsx (1)
13-24: OptionType alias could model the element rather than the whole array
OptionTypecurrently aliases the entire array ({ ... }[]) and is then used as the accumulator type inrooms.reduce<OptionType>(...). This works, but it’s slightly counter‑intuitive and makes it harder to reuse the option element shape elsewhere.Consider making
OptionTypethe element type and usingOptionType[]for the array; this also lets you giveuseMemoan explicit return type:-type OptionType = { - value: string; - label: { - name: string | undefined; - avatarETag: string | undefined; - type: RoomType; - }; -}[]; +type OptionType = { + value: string; + label: { + name: string | undefined; + avatarETag: string | undefined; + type: RoomType; + }; +}; -const options = useMemo( - () => - rooms.reduce<OptionType>((acc, room) => { +const options = useMemo<OptionType[]>( + () => + rooms.reduce<OptionType[]>((acc, room) => { if (acc.length === limit) return acc; // ... - }, []), + }, []),Also applies to: 49-73
📜 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.
📒 Files selected for processing (1)
apps/meteor/client/components/UserAndRoomAutoCompleteMultiple/UserAndRoomAutoCompleteMultiple.tsx(4 hunks)
🧰 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/components/UserAndRoomAutoCompleteMultiple/UserAndRoomAutoCompleteMultiple.tsx
🧠 Learnings (3)
📓 Common learnings
Learnt from: ricardogarim
Repo: RocketChat/Rocket.Chat PR: 37205
File: ee/packages/federation-matrix/src/FederationMatrix.ts:296-301
Timestamp: 2025-10-28T16:53:42.761Z
Learning: In the Rocket.Chat federation-matrix integration (ee/packages/federation-matrix/), the createRoom method from rocket.chat/federation-sdk will support a 4-argument signature (userId, roomName, visibility, displayName) in newer versions. Code using this 4-argument call is forward-compatible with planned library updates and should not be flagged as an error.
Learnt from: ricardogarim
Repo: RocketChat/Rocket.Chat PR: 37205
File: ee/packages/federation-matrix/src/FederationMatrix.ts:296-301
Timestamp: 2025-10-28T16:53:42.761Z
Learning: In the Rocket.Chat federation-matrix integration (ee/packages/federation-matrix/), the createRoom method from rocket.chat/federation-sdk will support a 4-argument signature (userId, roomName, visibility, displayName) in newer versions. Code using this 4-argument call is forward-compatible with planned library updates and should not be flagged as an error.
📚 Learning: 2025-10-28T16:53:42.761Z
Learnt from: ricardogarim
Repo: RocketChat/Rocket.Chat PR: 37205
File: ee/packages/federation-matrix/src/FederationMatrix.ts:296-301
Timestamp: 2025-10-28T16:53:42.761Z
Learning: In the Rocket.Chat federation-matrix integration (ee/packages/federation-matrix/), the createRoom method from rocket.chat/federation-sdk will support a 4-argument signature (userId, roomName, visibility, displayName) in newer versions. Code using this 4-argument call is forward-compatible with planned library updates and should not be flagged as an error.
Applied to files:
apps/meteor/client/components/UserAndRoomAutoCompleteMultiple/UserAndRoomAutoCompleteMultiple.tsx
📚 Learning: 2025-11-27T17:56:26.050Z
Learnt from: MartinSchoeler
Repo: RocketChat/Rocket.Chat PR: 37557
File: apps/meteor/client/views/admin/ABAC/AdminABACRooms.tsx:115-116
Timestamp: 2025-11-27T17:56:26.050Z
Learning: In Rocket.Chat, the GET /v1/abac/rooms endpoint (implemented in ee/packages/abac/src/index.ts) only returns rooms where abacAttributes exists and is not an empty array (query: { abacAttributes: { $exists: true, $ne: [] } }). Therefore, in components consuming this endpoint (like AdminABACRooms.tsx), room.abacAttributes is guaranteed to be defined for all returned rooms, and optional chaining before calling array methods like .join() is sufficient without additional null coalescing.
Applied to files:
apps/meteor/client/components/UserAndRoomAutoCompleteMultiple/UserAndRoomAutoCompleteMultiple.tsx
🧬 Code graph analysis (1)
apps/meteor/client/components/UserAndRoomAutoCompleteMultiple/UserAndRoomAutoCompleteMultiple.tsx (1)
packages/core-typings/src/IRoom.ts (1)
isDirectMessageRoom(154-154)
⏰ 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). (3)
- GitHub Check: 📦 Build Packages
- GitHub Check: CodeQL-Build
- GitHub Check: CodeQL-Build
🔇 Additional comments (2)
apps/meteor/client/components/UserAndRoomAutoCompleteMultiple/UserAndRoomAutoCompleteMultiple.tsx (2)
26-73: Filtering and options construction look consistent and safeThe options builder correctly:
- Applies the debounced text filter at the subscription query level,
- Skips blocked direct messages,
- Skips read‑only rooms for the current user, and
- Honors the
limitprop while still capping the upstream query at 100.The overall control flow and memoization dependencies (
[limit, rooms, user]) look sound and should behave as intended.
83-98: TherenderSelectedandrenderItemsignatures are correct for @rocket.chat/fuselage 0.69.0—no adjustments needed.The destructuring pattern
({ selected: { value, label }, onRemove, ...props }): ReactElementforrenderSelectedand({ value, label, ...props })forrenderItemmatches the established pattern across the codebase (e.g.,MultiUsersSelectElement,MultiChannelsSelectElement). Both renderers correctly returnReactElement, and thelabeltype properly accommodates the custom room metadata object. No type mismatches with fuselage 0.69.0.
Proposed changes (including videos or screenshots)
release changes
SUP-924
Issue(s)
Steps to test or reproduce
Further comments
Summary by CodeRabbit
Chores
Bug Fixes / Improvements
✏️ Tip: You can customize this high-level summary in your review settings.