chore: Upgrade fuselage packages - #39776
Conversation
|
Looks like this PR is ready to merge! 🎉 |
|
WalkthroughThis PR updates the Fuselage design system library dependencies across multiple applications and packages (v0.73/0.40 to v0.74/0.41), adds accessibility labeling to direct message creation UI, and refactors e2e tests to use updated selectors and a streamlined DM creation flow. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
cae61c1 to
823114a
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #39776 +/- ##
========================================
Coverage 70.56% 70.56%
========================================
Files 3256 3256
Lines 115778 115778
Branches 21009 21057 +48
========================================
+ Hits 81694 81697 +3
+ Misses 32027 32018 -9
- Partials 2057 2063 +6
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
389e3e0 to
6b0d6ba
Compare
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/meteor/package.json`:
- Around line 107-109: The package.json specifies unavailable versions for
`@rocket.chat/fuselage`, `@rocket.chat/fuselage-forms`, and
`@rocket.chat/fuselage-hooks`; update the three dependency entries to the
published versions (use `@rocket.chat/fuselage` 0.73.0,
`@rocket.chat/fuselage-forms` 1.0.0, `@rocket.chat/fuselage-hooks` 0.40.0) or
coordinate upstream if newer versions are required; ensure the changes are made
in the apps/meteor package.json dependency block where these package names
appear and run npm install / yarn to verify the constraints are satisfiable.
In `@apps/meteor/tests/e2e/page-objects/fragments/modals/create-new-modal.ts`:
- Around line 78-79: The current call this.listbox.selectOption(username) is
using a page-level listbox (from a .last() locator) and can hit the wrong widget
when multiple listboxes exist; change the locator used by this.listbox to be
scoped to this modal (e.g., derive the listbox from this.modal or this.container
locator rather than the page/global locator) and then call
selectOption(username) on that scoped locator; keep the subsequent
this.page?.keyboard.press('Tab') as-is if tabbing is still required.
- Line 72: Replace the chained locator this.root.getByLabel('Select one or more
people to message', { exact: true }).getByRole('textbox') with a single semantic
role lookup on this.root using getByRole('textbox', { name: 'Select one or more
people to message', exact: true }) so the locator matches both <label> and
aria-label cases; update the locator in the CreateNewModal fragment (where
this.root.getByLabel(...).getByRole is used) accordingly.
In `@apps/uikit-playground/package.json`:
- Around line 21-22: The package.json lists invalid versions for the fuselage
packages; update the dependency entries for "@rocket.chat/fuselage" and
"@rocket.chat/fuselage-hooks" in package.json to actual published versions
(e.g., set "@rocket.chat/fuselage" to "0.73.0" and "@rocket.chat/fuselage-hooks"
to "0.40.0" or to whatever newer valid versions exist on npm), then run your
package manager (npm/yarn/pnpm) to refresh the lockfile and node_modules so the
changes are validated.
In `@packages/livechat/package.json`:
- Line 61: The dependency entry for `@rocket.chat/fuselage-hooks` in
packages/livechat/package.json is pointing to a non-published version (^0.41.0);
change that entry to a published version (e.g., ^0.40.0), then reinstall
dependencies and update the lockfile (npm/yarn install) to ensure the lockfile
reflects the change; verify builds/tests (package.json ->
`@rocket.chat/fuselage-hooks`).
🪄 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: 96ff5853-4dff-46d2-bb02-e879e1cde567
⛔ Files ignored due to path filters (3)
apps/meteor/client/components/CreateDiscussion/__snapshots__/CreateDiscussion.spec.tsx.snapis excluded by!**/*.snapapps/meteor/client/views/admin/ABAC/ABACRoomsTab/__snapshots__/RoomFormAttributeField.spec.tsx.snapis excluded by!**/*.snapyarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (18)
apps/meteor/client/navbar/NavBarPagesGroup/actions/CreateDirectMessage.tsxapps/meteor/package.jsonapps/meteor/tests/e2e/administration.spec.tsapps/meteor/tests/e2e/page-objects/fragments/edit-user-flextab.tsapps/meteor/tests/e2e/page-objects/fragments/modals/create-new-modal.tsapps/meteor/tests/e2e/page-objects/fragments/navbar.tsapps/uikit-playground/package.jsonpackages/fuselage-ui-kit/package.jsonpackages/gazzodown/package.jsonpackages/livechat/package.jsonpackages/storybook-config/package.jsonpackages/ui-avatar/package.jsonpackages/ui-client/package.jsonpackages/ui-composer/package.jsonpackages/ui-contexts/package.jsonpackages/ui-video-conf/package.jsonpackages/ui-voip/package.jsonpackages/web-ui-registration/package.json
📜 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). (1)
- GitHub Check: cubic · AI code reviewer
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{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/navbar/NavBarPagesGroup/actions/CreateDirectMessage.tsxapps/meteor/tests/e2e/page-objects/fragments/navbar.tsapps/meteor/tests/e2e/administration.spec.tsapps/meteor/tests/e2e/page-objects/fragments/edit-user-flextab.tsapps/meteor/tests/e2e/page-objects/fragments/modals/create-new-modal.ts
apps/meteor/tests/e2e/page-objects/**/*.ts
📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
Utilize existing page objects pattern from
apps/meteor/tests/e2e/page-objects/
Files:
apps/meteor/tests/e2e/page-objects/fragments/navbar.tsapps/meteor/tests/e2e/page-objects/fragments/edit-user-flextab.tsapps/meteor/tests/e2e/page-objects/fragments/modals/create-new-modal.ts
apps/meteor/tests/e2e/**/*.{ts,spec.ts}
📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
apps/meteor/tests/e2e/**/*.{ts,spec.ts}: Store commonly used locators in variables/constants for reuse
Follow Page Object Model pattern consistently in Playwright tests
Files:
apps/meteor/tests/e2e/page-objects/fragments/navbar.tsapps/meteor/tests/e2e/administration.spec.tsapps/meteor/tests/e2e/page-objects/fragments/edit-user-flextab.tsapps/meteor/tests/e2e/page-objects/fragments/modals/create-new-modal.ts
**/*.spec.ts
📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
**/*.spec.ts: Use descriptive test names that clearly communicate expected behavior in Playwright tests
Use.spec.tsextension for test files (e.g.,login.spec.ts)
Files:
apps/meteor/tests/e2e/administration.spec.ts
apps/meteor/tests/e2e/**/*.spec.ts
📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
apps/meteor/tests/e2e/**/*.spec.ts: All test files must be created inapps/meteor/tests/e2e/directory
Avoid usingpage.locator()in Playwright tests - always prefer semantic locators such aspage.getByRole(),page.getByLabel(),page.getByText(), orpage.getByTitle()
Usetest.beforeAll()andtest.afterAll()for setup/teardown in Playwright tests
Usetest.step()for complex test scenarios to improve organization in Playwright tests
Group related tests in the same file
Utilize Playwright fixtures (test,page,expect) for consistency in test files
Prefer web-first assertions (toBeVisible,toHaveText, etc.) in Playwright tests
Useexpectmatchers for assertions (toEqual,toContain,toBeTruthy,toHaveLength, etc.) instead ofassertstatements in Playwright tests
Usepage.waitFor()with specific conditions instead of hardcoded timeouts in Playwright tests
Implement proper wait strategies for dynamic content in Playwright tests
Maintain test isolation between test cases in Playwright tests
Ensure clean state for each test execution in Playwright tests
Ensure tests run reliably in parallel without shared state conflicts
Files:
apps/meteor/tests/e2e/administration.spec.ts
🧠 Learnings (34)
📓 Common learnings
Learnt from: ahmed-n-abdeltwab
Repo: RocketChat/Rocket.Chat PR: 0
File: :0-0
Timestamp: 2026-02-24T19:05:56.710Z
Learning: In Rocket.Chat PRs, keep feature PRs free of unrelated lockfile-only dependency bumps; prefer reverting lockfile drift or isolating such bumps into a separate "chore" commit/PR, and always use yarn install --immutable with the Yarn version pinned in package.json via Corepack.
Learnt from: ahmed-n-abdeltwab
Repo: RocketChat/Rocket.Chat PR: 0
File: :0-0
Timestamp: 2026-02-24T19:05:56.710Z
Learning: Rocket.Chat repo context: When a workspace manifest on develop already pins a dependency version (e.g., packages/web-ui-registration → "rocket.chat/ui-contexts": "27.0.1"), a lockfile change in a feature PR that upgrades only that dependency’s resolution is considered a manifest-driven sync and can be kept, preferably as a small "chore: sync yarn.lock with manifests" commit.
📚 Learning: 2026-02-24T19:36:55.089Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 38493
File: apps/meteor/tests/e2e/page-objects/fragments/home-content.ts:60-82
Timestamp: 2026-02-24T19:36:55.089Z
Learning: In RocketChat/Rocket.Chat e2e tests (apps/meteor/tests/e2e/page-objects/fragments/home-content.ts), thread message preview listitems do not have aria-roledescription="message", so lastThreadMessagePreview locator cannot be scoped to messageListItems (which filters for aria-roledescription="message"). It should remain scoped to page.getByRole('listitem') or mainMessageList.getByRole('listitem').
Applied to files:
apps/meteor/client/navbar/NavBarPagesGroup/actions/CreateDirectMessage.tsxapps/meteor/tests/e2e/page-objects/fragments/navbar.tsapps/meteor/tests/e2e/administration.spec.tsapps/meteor/tests/e2e/page-objects/fragments/edit-user-flextab.tsapps/meteor/tests/e2e/page-objects/fragments/modals/create-new-modal.ts
📚 Learning: 2026-03-11T22:04:20.529Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 39545
File: apps/meteor/client/views/room/body/hooks/useHasNewMessages.ts:59-61
Timestamp: 2026-03-11T22:04:20.529Z
Learning: In `apps/meteor/client/views/room/body/hooks/useHasNewMessages.ts`, the `msg.u._id === uid` early-return in the `streamNewMessage` handler is intentional: the "New messages" indicator is designed to notify about messages from other users only. Self-sent messages — including those sent from a different session/device — are always skipped, by design. Do not flag this as a multi-session regression.
Applied to files:
apps/meteor/client/navbar/NavBarPagesGroup/actions/CreateDirectMessage.tsx
📚 Learning: 2026-02-24T19:05:56.710Z
Learnt from: ahmed-n-abdeltwab
Repo: RocketChat/Rocket.Chat PR: 0
File: :0-0
Timestamp: 2026-02-24T19:05:56.710Z
Learning: Rocket.Chat repo context: When a workspace manifest on develop already pins a dependency version (e.g., packages/web-ui-registration → "rocket.chat/ui-contexts": "27.0.1"), a lockfile change in a feature PR that upgrades only that dependency’s resolution is considered a manifest-driven sync and can be kept, preferably as a small "chore: sync yarn.lock with manifests" commit.
Applied to files:
packages/livechat/package.jsonpackages/ui-video-conf/package.jsonpackages/web-ui-registration/package.jsonpackages/ui-client/package.jsonapps/uikit-playground/package.jsonpackages/storybook-config/package.jsonpackages/ui-composer/package.jsonapps/meteor/package.jsonpackages/ui-contexts/package.jsonpackages/gazzodown/package.jsonpackages/ui-avatar/package.jsonpackages/ui-voip/package.jsonpackages/fuselage-ui-kit/package.json
📚 Learning: 2026-02-24T19:05:56.710Z
Learnt from: ahmed-n-abdeltwab
Repo: RocketChat/Rocket.Chat PR: 0
File: :0-0
Timestamp: 2026-02-24T19:05:56.710Z
Learning: In Rocket.Chat PRs, keep feature PRs free of unrelated lockfile-only dependency bumps; prefer reverting lockfile drift or isolating such bumps into a separate "chore" commit/PR, and always use yarn install --immutable with the Yarn version pinned in package.json via Corepack.
Applied to files:
packages/livechat/package.jsonpackages/ui-video-conf/package.jsonpackages/web-ui-registration/package.jsonpackages/ui-client/package.jsonapps/uikit-playground/package.jsonpackages/storybook-config/package.jsonpackages/ui-composer/package.jsonapps/meteor/package.jsonpackages/ui-contexts/package.jsonpackages/gazzodown/package.jsonpackages/ui-avatar/package.jsonpackages/ui-voip/package.jsonpackages/fuselage-ui-kit/package.json
📚 Learning: 2026-02-25T20:10:16.987Z
Learnt from: ahmed-n-abdeltwab
Repo: RocketChat/Rocket.Chat PR: 38913
File: packages/ddp-client/src/legacy/types/SDKLegacy.ts:34-34
Timestamp: 2026-02-25T20:10:16.987Z
Learning: In the RocketChat/Rocket.Chat monorepo, packages/ddp-client and apps/meteor do not use TypeScript project references. Module augmentations in apps/meteor (e.g., declare module 'rocket.chat/rest-typings') are not visible when compiling packages/ddp-client in isolation, which is why legacy SDK methods that depend on OperationResult types for OpenAPI-migrated endpoints must remain commented out.
Applied to files:
packages/livechat/package.jsonpackages/web-ui-registration/package.jsonpackages/ui-client/package.jsonapps/uikit-playground/package.jsonpackages/ui-composer/package.jsonapps/meteor/package.jsonpackages/ui-contexts/package.jsonpackages/gazzodown/package.jsonpackages/ui-avatar/package.jsonpackages/ui-voip/package.jsonpackages/fuselage-ui-kit/package.json
📚 Learning: 2026-03-16T21:50:42.118Z
Learnt from: amitb0ra
Repo: RocketChat/Rocket.Chat PR: 39676
File: .changeset/migrate-users-register-openapi.md:3-3
Timestamp: 2026-03-16T21:50:42.118Z
Learning: In RocketChat/Rocket.Chat OpenAPI migration PRs, removing endpoint types and validators from `rocket.chat/rest-typings` (e.g., `UserRegisterParamsPOST`, `/v1/users.register` entry) is the *required* migration pattern per RocketChat/Rocket.Chat-Open-API#150 Rule 7 ("No More rest-typings or Manual Typings"). The endpoint type is re-exposed via a module augmentation `.d.ts` file in the consuming package (e.g., `packages/web-ui-registration/src/users-register.d.ts`). This is NOT a breaking change — the correct changeset bump for `rocket.chat/rest-typings` in this scenario is `minor`, not `major`. Do not flag this as a breaking change during OpenAPI migration reviews.
Applied to files:
packages/livechat/package.jsonpackages/web-ui-registration/package.jsonpackages/ui-avatar/package.json
📚 Learning: 2026-03-17T16:08:37.572Z
Learnt from: cardoso
Repo: RocketChat/Rocket.Chat PR: 39690
File: packages/ui-voip/package.json:11-11
Timestamp: 2026-03-17T16:08:37.572Z
Learning: In `packages/ui-voip/package.json` (RocketChat/Rocket.Chat), the team deliberately chose to use `rm -rf dist` directly in the `"build"` script instead of `rimraf`, as they decided against introducing the `rimraf` dependency for this package. Do not flag `rm -rf dist` in the ui-voip build script as a cross-platform issue requiring rimraf.
Applied to files:
packages/ui-video-conf/package.jsonpackages/web-ui-registration/package.jsonpackages/ui-client/package.jsonapps/uikit-playground/package.jsonpackages/storybook-config/package.jsonpackages/ui-composer/package.jsonapps/meteor/package.jsonpackages/ui-contexts/package.jsonpackages/gazzodown/package.jsonpackages/ui-avatar/package.jsonpackages/ui-voip/package.jsonpackages/fuselage-ui-kit/package.json
📚 Learning: 2026-03-12T10:26:26.697Z
Learnt from: ahmed-n-abdeltwab
Repo: RocketChat/Rocket.Chat PR: 39340
File: apps/meteor/app/api/server/v1/im.ts:1349-1398
Timestamp: 2026-03-12T10:26:26.697Z
Learning: In `apps/meteor/app/api/server/v1/im.ts` (PR `#39340`), the `DmEndpoints` type intentionally includes temporary stub entries for `/v1/im.kick`, `/v1/dm.kick`, `/v1/im.leave`, and `/v1/dm.leave` (using `DmKickProps` and `DmLeaveProps`) even though no route handlers exist for them yet. These stubs were added to preserve type compatibility after removing the original `DmLeaveProps` and related files. They are planned for cleanup in a follow-up PR. Do not flag these as missing implementations when reviewing this file until the follow-up is merged.
Applied to files:
apps/meteor/tests/e2e/page-objects/fragments/navbar.tsapps/meteor/tests/e2e/page-objects/fragments/modals/create-new-modal.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/page-objects/**/*.ts : Utilize existing page objects pattern from `apps/meteor/tests/e2e/page-objects/`
Applied to files:
apps/meteor/tests/e2e/page-objects/fragments/navbar.tsapps/meteor/tests/e2e/administration.spec.tsapps/meteor/tests/e2e/page-objects/fragments/edit-user-flextab.tsapps/meteor/tests/e2e/page-objects/fragments/modals/create-new-modal.ts
📚 Learning: 2025-12-16T17:29:40.430Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37834
File: apps/meteor/tests/e2e/page-objects/fragments/admin-flextab-emoji.ts:12-22
Timestamp: 2025-12-16T17:29:40.430Z
Learning: In all page-object files under apps/meteor/tests/e2e/page-objects/, import expect from ../../utils/test (Playwright's async expect) instead of from Jest. Jest's expect is synchronous and incompatible with web-first assertions like toBeVisible, which can cause TypeScript errors.
Applied to files:
apps/meteor/tests/e2e/page-objects/fragments/navbar.tsapps/meteor/tests/e2e/page-objects/fragments/edit-user-flextab.tsapps/meteor/tests/e2e/page-objects/fragments/modals/create-new-modal.ts
📚 Learning: 2026-02-24T19:39:42.247Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 38493
File: apps/meteor/tests/e2e/page-objects/fragments/message.ts:7-7
Timestamp: 2026-02-24T19:39:42.247Z
Learning: In RocketChat e2e tests, avoid using data-qa attributes to locate elements. Prefer semantic locators such as getByRole, getByLabel, getByText, getByTitle and ARIA-based selectors. Apply this rule to all TypeScript files under apps/meteor/tests/e2e to improve test reliability, accessibility, and maintainability.
Applied to files:
apps/meteor/tests/e2e/page-objects/fragments/navbar.tsapps/meteor/tests/e2e/administration.spec.tsapps/meteor/tests/e2e/page-objects/fragments/edit-user-flextab.tsapps/meteor/tests/e2e/page-objects/fragments/modals/create-new-modal.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/tests/e2e/page-objects/fragments/navbar.tsapps/meteor/tests/e2e/administration.spec.tsapps/meteor/tests/e2e/page-objects/fragments/edit-user-flextab.tsapps/meteor/tests/e2e/page-objects/fragments/modals/create-new-modal.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/tests/e2e/page-objects/fragments/navbar.tsapps/meteor/tests/e2e/administration.spec.tsapps/meteor/tests/e2e/page-objects/fragments/edit-user-flextab.tsapps/meteor/tests/e2e/page-objects/fragments/modals/create-new-modal.ts
📚 Learning: 2026-02-24T19:09:09.561Z
Learnt from: ahmed-n-abdeltwab
Repo: RocketChat/Rocket.Chat PR: 38974
File: apps/meteor/app/api/server/v1/im.ts:220-221
Timestamp: 2026-02-24T19:09:09.561Z
Learning: In RocketChat/Rocket.Chat OpenAPI migration PRs for apps/meteor/app/api/server/v1 endpoints, maintainers prefer to avoid any logic changes; style-only cleanups (like removing inline comments) may be deferred to follow-ups to keep scope tight.
Applied to files:
apps/meteor/package.json
📚 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-11-19T12:32:29.696Z
Learnt from: d-gubert
Repo: RocketChat/Rocket.Chat PR: 37547
File: packages/i18n/src/locales/en.i18n.json:634-634
Timestamp: 2025-11-19T12:32:29.696Z
Learning: Repo: RocketChat/Rocket.Chat
Context: i18n workflow
Learning: In this repository, new translation keys should be added to packages/i18n/src/locales/en.i18n.json only; other locale files are populated via the external translation pipeline and/or fall back to English. Do not request adding the same key to all locale files in future reviews.
Applied to files:
packages/ui-contexts/package.json
📚 Learning: 2025-12-10T21:00:54.909Z
Learnt from: KevLehman
Repo: RocketChat/Rocket.Chat PR: 37091
File: ee/packages/abac/jest.config.ts:4-7
Timestamp: 2025-12-10T21:00:54.909Z
Learning: Rocket.Chat monorepo: Jest testMatch pattern '<rootDir>/src/**/*.spec.(ts|js|mjs)' is valid in this repo and used across multiple packages (e.g., packages/tools, ee/packages/omnichannel-services). Do not flag it as invalid in future reviews.
Applied to files:
packages/gazzodown/package.jsonpackages/ui-voip/package.jsonpackages/fuselage-ui-kit/package.json
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use `expect` matchers for assertions (`toEqual`, `toContain`, `toBeTruthy`, `toHaveLength`, etc.) instead of `assert` statements in Playwright tests
Applied to files:
apps/meteor/tests/e2e/administration.spec.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Utilize Playwright fixtures (`test`, `page`, `expect`) for consistency in test files
Applied to files:
apps/meteor/tests/e2e/administration.spec.tsapps/meteor/tests/e2e/page-objects/fragments/edit-user-flextab.tsapps/meteor/tests/e2e/page-objects/fragments/modals/create-new-modal.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Ensure tests run reliably in parallel without shared state conflicts
Applied to files:
apps/meteor/tests/e2e/administration.spec.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : All test files must be created in `apps/meteor/tests/e2e/` directory
Applied to files:
apps/meteor/tests/e2e/administration.spec.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Prefer web-first assertions (`toBeVisible`, `toHaveText`, etc.) in Playwright tests
Applied to files:
apps/meteor/tests/e2e/administration.spec.tsapps/meteor/tests/e2e/page-objects/fragments/edit-user-flextab.tsapps/meteor/tests/e2e/page-objects/fragments/modals/create-new-modal.ts
📚 Learning: 2026-03-15T14:31:23.493Z
Learnt from: amitb0ra
Repo: RocketChat/Rocket.Chat PR: 39647
File: apps/meteor/app/api/server/v1/users.ts:891-899
Timestamp: 2026-03-15T14:31:23.493Z
Learning: In RocketChat/Rocket.Chat, `IUser.inactiveReason` in `packages/core-typings/src/IUser.ts` is typed as `'deactivated' | 'pending_approval' | 'idle_too_long'` (optional, no `null`), but the database stores `null` for newly created users. The Typia-generated `$ref: '#/components/schemas/IUser'` schema therefore correctly rejects `null` for `inactiveReason`. This causes the test "should create a new user with default roles" to fail when response validation is active (TEST_MODE). The fix is to add `| null` to `inactiveReason` in core-typings and rebuild Typia schemas in a separate PR. Do not flag this test failure as a bug introduced by the users.create OpenAPI migration (PR `#39647`). Do not suggest inlining a custom schema to work around it, as migration rules require using `$ref` when a Typia schema exists.
Applied to files:
apps/meteor/tests/e2e/administration.spec.ts
📚 Learning: 2026-03-16T11:57:17.987Z
Learnt from: ricardogarim
Repo: RocketChat/Rocket.Chat PR: 39657
File: apps/meteor/tests/end-to-end/apps/app-resolve-visitor.ts:43-45
Timestamp: 2026-03-16T11:57:17.987Z
Learning: In `apps/meteor/tests/end-to-end/apps/app-resolve-visitor.ts`, `externalIds` lookups are namespaced per `app.id`. Because `cleanupApps()` is called before each test run and a fresh app is installed (giving a new unique `app.id`), fixed `userId` strings like `'nonexistent-id'` in null-path tests are safe and cannot collide with stale visitor records from previous runs. Do not flag these as needing unique/random values.
Applied to files:
apps/meteor/tests/e2e/administration.spec.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Group related tests in the same file
Applied to files:
apps/meteor/tests/e2e/administration.spec.ts
📚 Learning: 2026-02-24T19:22:48.358Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 38493
File: apps/meteor/tests/e2e/omnichannel/omnichannel-send-pdf-transcript.spec.ts:66-67
Timestamp: 2026-02-24T19:22:48.358Z
Learning: In Playwright end-to-end tests (e.g., under apps/meteor/tests/e2e/...), prefer locating elements by translated text (getByText) and ARIA roles (getByRole) over data-qa attributes. If translation values change, update the corresponding test locators accordingly. Never use data-qa locators. This guideline applies to all Playwright e2e test specs in the repository and helps keep tests robust to UI text changes and accessible semantics.
Applied to files:
apps/meteor/tests/e2e/administration.spec.ts
📚 Learning: 2026-03-06T18:10:15.268Z
Learnt from: tassoevan
Repo: RocketChat/Rocket.Chat PR: 39397
File: packages/gazzodown/src/code/CodeBlock.spec.tsx:47-68
Timestamp: 2026-03-06T18:10:15.268Z
Learning: In tests (especially those using testing-library/dom/jsdom) for Rocket.Chat components, the HTML <code> element has an implicit ARIA role of 'code'. Therefore, screen.getByRole('code') or screen.findByRole('code') will locate <code> elements even without a role attribute. Do not flag findByRole('code') as invalid in reviews; prefer using the implicit role instead of adding role="code" unless necessary for accessibility.
Applied to files:
apps/meteor/tests/e2e/administration.spec.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Avoid using `page.locator()` in Playwright tests - always prefer semantic locators such as `page.getByRole()`, `page.getByLabel()`, `page.getByText()`, or `page.getByTitle()`
Applied to files:
apps/meteor/tests/e2e/page-objects/fragments/edit-user-flextab.tsapps/meteor/tests/e2e/page-objects/fragments/modals/create-new-modal.ts
📚 Learning: 2026-02-24T19:22:52.984Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 38493
File: apps/meteor/tests/e2e/omnichannel/omnichannel-send-pdf-transcript.spec.ts:66-67
Timestamp: 2026-02-24T19:22:52.984Z
Learning: In RocketChat/Rocket.Chat Playwright e2e tests, prefer using translated text and ARIA roles (getByRole, getByText, etc.) over data-qa locators. If translation values change, update the corresponding test locators accordingly. Never prefer data-qa locators.
Applied to files:
apps/meteor/tests/e2e/page-objects/fragments/edit-user-flextab.tsapps/meteor/tests/e2e/page-objects/fragments/modals/create-new-modal.ts
📚 Learning: 2025-09-23T19:22:59.217Z
Learnt from: dougfabris
Repo: RocketChat/Rocket.Chat PR: 36987
File: apps/meteor/tests/e2e/page-objects/fragments/room-toolbar.ts:10-20
Timestamp: 2025-09-23T19:22:59.217Z
Learning: In Playwright e2e tests, prefer stable selectors like data-qa-id attributes over localized text in getByRole() or getByText() calls to prevent test failures when UI language changes. Test translations separately by validating actual text content after ensuring UI interactions work with stable selectors.
Applied to files:
apps/meteor/tests/e2e/page-objects/fragments/edit-user-flextab.ts
📚 Learning: 2026-03-06T18:10:23.330Z
Learnt from: tassoevan
Repo: RocketChat/Rocket.Chat PR: 39397
File: packages/gazzodown/src/code/CodeBlock.spec.tsx:47-68
Timestamp: 2026-03-06T18:10:23.330Z
Learning: In the RocketChat/Rocket.Chat `packages/gazzodown` package and more broadly, the HTML `<code>` element has an implicit ARIA role of `code` per WAI-ARIA 1.3, and `testing-library/dom` / jsdom supports it. Therefore, `screen.getByRole('code')` / `screen.findByRole('code')` correctly locates `<code>` elements without needing an explicit `role="code"` attribute. Do NOT flag `findByRole('code')` as invalid in future reviews.
Applied to files:
apps/meteor/tests/e2e/page-objects/fragments/edit-user-flextab.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,spec.ts} : Follow Page Object Model pattern consistently in Playwright tests
Applied to files:
apps/meteor/tests/e2e/page-objects/fragments/edit-user-flextab.tsapps/meteor/tests/e2e/page-objects/fragments/modals/create-new-modal.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,spec.ts} : Store commonly used locators in variables/constants for reuse
Applied to files:
apps/meteor/tests/e2e/page-objects/fragments/edit-user-flextab.tsapps/meteor/tests/e2e/page-objects/fragments/modals/create-new-modal.ts
🔇 Additional comments (14)
packages/web-ui-registration/package.json (1)
26-27: LGTM!Dependency version bumps are consistent with the PR objectives and align with the Fuselage package upgrades across the repository.
packages/ui-composer/package.json (1)
25-26: LGTM!Dependency version bumps are consistent with the PR objectives and align with the Fuselage package upgrades across the repository.
packages/ui-avatar/package.json (1)
20-21: LGTM!Dependency version bumps are consistent with the PR objectives and align with the Fuselage package upgrades across the repository.
packages/ui-voip/package.json (1)
33-34: LGTM!Dependency version bumps are consistent with the PR objectives and align with the Fuselage package upgrades across the repository.
apps/meteor/client/navbar/NavBarPagesGroup/actions/CreateDirectMessage.tsx (1)
97-97: Verify aria-label forwarding to underlying input element in Fuselage's MultiSelectFiltered component.The
aria-labelprop is passed toUserAutoCompleteMultipleand spread ontoMultiSelectFilteredfrom Fuselage, but cannot verify whether the component forwards it to its internal input element. This requires inspecting the Fuselage source code or testing with a screen reader, as Fuselage's implementation is external to this codebase.packages/fuselage-ui-kit/package.json (1)
49-50: No actionable issues in this segment.packages/ui-video-conf/package.json (1)
25-26: No actionable issues in this segment.packages/ui-contexts/package.json (1)
26-27: No actionable issues in this segment.packages/ui-client/package.json (1)
29-30: No actionable issues in this segment.packages/storybook-config/package.json (1)
23-23: No actionable issues in this segment.Also applies to: 39-39
packages/gazzodown/package.json (1)
34-35: No actionable issues in this segment.apps/meteor/tests/e2e/administration.spec.ts (1)
80-80: Locator update looks correct.Switching the visibility checks to
chipUserRoleis consistent and keeps the assertions web-first.Also applies to: 100-100
apps/meteor/tests/e2e/page-objects/fragments/navbar.ts (1)
218-218: Good page-object delegation.Using
inviteUserToDM(username)keeps the DM flow encapsulated in the modal abstraction and improves maintainability.As per coding guidelines, "Follow Page Object Model pattern consistently in Playwright tests."
apps/meteor/tests/e2e/page-objects/fragments/edit-user-flextab.ts (1)
42-43: Good locator upgrade and clearer getter naming.This keeps the page-object API clearer and uses a semantic role-based locator.
Based on learnings: In RocketChat e2e tests, avoid data-qa attributes and prefer semantic locators such as
getByRole,getByLabel,getByText, andgetByTitle.
Proposed changes (including videos or screenshots)
Release changes:
@rocket.chat/fuselage@0.74.0
@rocket.chat/fuselage-hooks@0.41.0
@rocket.chat/fuselage-forms@1.1.0
changes necessary for: WA-46
Issue(s)
Steps to test or reproduce
Further comments
Summary by CodeRabbit
Bug Fixes
Chores