chore: OXC - #7515
Conversation
Migrate linting from ESLint 8 to Oxlint. `pnpm lint` drops from ~1min to ~0.6s and 17 eslint packages are removed from devDependencies. Config lives in `.oxlintrc.json`, generated with `@oxlint/migrate` from the old `.eslintrc.js` and then tuned: - `eslint-plugin-react-native` is loaded through `jsPlugins`, since Oxlint has no built-in equivalent. - `import/extensions` is off. Its old options (`js: 'warning'`, ...) were not valid values for the rule, so it never reported anything under ESLint. - `no-unused-vars` sets `caughtErrors: 'none'` to match the ESLint 8 default. - `import/no-cycle` and the React Compiler rules report as warnings. They surface findings ESLint never showed, so they are not gated yet. Rules with no Oxlint equivalent are dropped: `no-restricted-syntax` (the ban on `React.*` member syntax), `import/order`, `import/no-unresolved` and `import/named`. ESLint 8 skipped dot-directories, so files under `.rnstorybook/` and `.maestro/` were never linted. Oxlint does lint them, which surfaced four violations that are fixed here. The CI workflow keeps its filename and job id so branch protection checks stay valid.
Migrate formatting from Prettier 2.8.8 to Oxfmt via `oxfmt --migrate prettier`. - `.oxfmtrc.json` carries every previous Prettier option unchanged (tabs, single quotes, printWidth 130, no trailing comma, avoid arrow parens, bracketSameLine) plus the `.prettierignore` patterns as `ignorePatterns`. `sortPackageJson` is disabled to match previous behavior. - `.prettierrc.js` and `.prettierignore` removed; `prettier` dropped from devDependencies. - `prettier-lint` script renamed to `format-lint` and now runs `oxfmt`. - 44 files reformatted: Oxfmt follows Prettier 3 style, so nested ternaries and `extends`/type-argument wrapping indent differently than under Prettier 2. No semantic changes. - prettier.yml still ran `eslint --fix`, missed in the Oxlint migration; it now runs `oxfmt` and `oxlint --fix`. `react/exhaustive-deps` is allowed there because its autofix rewrites dependency arrays, which changes behavior and must not land unreviewed from CI. - Workflow filename kept as prettier.yml to avoid disturbing branch protection checks, same as eslint.yml. Verified: `pnpm lint` exit 0 (0 errors), `tsc` clean, 217/217 suites and 2032/2032 tests pass, `oxfmt --check` clean.
WalkthroughThe repository replaces ESLint and Prettier with Oxlint and Oxfmt, updates CI and documentation, and reformats source and test expressions. Two behavioral adjustments affect Maestro helper return handling and message-list index fallback evaluation. ChangesTooling migration
Code and test updates
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.oxlintrc.json:
- Line 3: Restore the complete intended plugin set in the root plugins
configuration at .oxlintrc.json:3, including the existing default plugins
alongside import, React, and Jest. Remove the TypeScript override plugins field
at .oxlintrc.json:90 so the override inherits the full root plugin set instead
of replacing it.
🪄 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 Plus
Run ID: 00d54fd1-d8d2-45d7-86ea-44addfc4b1f7
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (60)
.eslintignore.eslintrc.js.github/README.md.github/workflows/eslint.yml.github/workflows/prettier.yml.maestro/scripts/data-setup.js.oxfmtrc.json.oxlintrc.json.prettierignore.prettierrc.js.rnstorybook/generateSnapshots.tsx.rnstorybook/main.ts.rnstorybook/preview.tsxCLAUDE.mdCONTRIBUTING.mdapp/containers/ActionSheet/ActionSheet.tsxapp/containers/CustomIcon/index.tsxapp/containers/LoginServices/LoginServices.test.tsxapp/containers/MessageComposer/MessageComposer.test.tsxapp/containers/MessageComposer/MessageComposer.tsxapp/containers/MessageComposer/hooks/useAutocomplete.tsapp/containers/NewMediaCall/VoipCallLifecycle.integration.test.tsxapp/containers/TextInput/FormTextInput.tsxapp/containers/UIKit/MessageBlock.tsxapp/containers/message/__tests__/index.test.tsxapp/containers/message/components/__tests__/Blocks.test.tsxapp/containers/message/components/__tests__/Content.test.tsxapp/containers/message/components/__tests__/Quote.test.tsxapp/containers/message/components/__tests__/RepliedThread.test.tsxapp/containers/message/components/__tests__/Reply.test.tsxapp/containers/message/components/__tests__/Thread.test.tsxapp/containers/message/hooks/__tests__/useMessageAccessibilityHint.test.tsxapp/containers/message/hooks/__tests__/useMessageAccessibilityLabel.test.tsxapp/containers/message/stores/__tests__/MessageStore.test.tsxapp/definitions/ILoggedUser.tsapp/definitions/ITeam.tsapp/definitions/rest/helpers/index.tsapp/definitions/utils.tsapp/lib/database/interfaces.tsapp/lib/methods/helpers/mergeSubscriptionsRooms.tsapp/lib/methods/loadMessagesForRoom.test.tsapp/lib/methods/roomTypeToApiType.tsapp/lib/methods/search.test.tsapp/lib/services/restApi.tsapp/lib/services/voip/MediaSessionInstance.test.tsapp/lib/services/voip/getPeerAutocompleteOptions.tsapp/reducers/login.tsapp/views/AddChannelTeamView.tsxapp/views/CannedResponsesListView/CannedResponseItem.tsxapp/views/ModalBlockView.tsxapp/views/RoomActionsView/components/CallSection.stories.tsxapp/views/RoomActionsView/components/CallSection.test.tsxapp/views/RoomInfoEditView/index.tsxapp/views/RoomInfoView/components/RoomInfoButtons.stories.tsxapp/views/RoomInfoView/components/RoomInfoButtons.test.tsxapp/views/RoomView/List/hooks/useMessages.test.tsxapp/views/RoomView/List/hooks/useScroll.tsapp/views/RoomView/List/index.tsxapp/views/RoomView/index.tsxpackage.json
💤 Files with no reviewable changes (5)
- .eslintignore
- .prettierignore
- .eslintrc.js
- .prettierrc.js
- .rnstorybook/preview.tsx
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
- GitHub Check: ESLint and Test / run-eslint-and-test
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{js,ts,jsx,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{js,ts,jsx,tsx}: Use descriptive names for functions, variables, and classes that clearly convey their purpose
Write comments that explain the 'why' behind code decisions, not the 'what'
Keep functions small and focused on a single responsibility
Use const by default, let when reassignment is needed, and avoid var
Prefer async/await over .then() chains for handling asynchronous operations
Use explicit error handling with try/catch blocks for async operations
Avoid deeply nested code; refactor complex logic into helper functions
Files:
app/containers/message/hooks/__tests__/useMessageAccessibilityHint.test.tsxapp/containers/message/components/__tests__/Thread.test.tsxapp/definitions/utils.tsapp/views/CannedResponsesListView/CannedResponseItem.tsxapp/containers/message/components/__tests__/RepliedThread.test.tsxapp/views/RoomInfoEditView/index.tsxapp/lib/methods/loadMessagesForRoom.test.tsapp/containers/UIKit/MessageBlock.tsxapp/lib/methods/search.test.tsapp/containers/message/components/__tests__/Reply.test.tsxapp/views/RoomInfoView/components/RoomInfoButtons.stories.tsxapp/containers/message/components/__tests__/Quote.test.tsxapp/containers/MessageComposer/hooks/useAutocomplete.tsapp/containers/CustomIcon/index.tsxapp/containers/MessageComposer/MessageComposer.test.tsxapp/lib/methods/roomTypeToApiType.tsapp/containers/message/stores/__tests__/MessageStore.test.tsxapp/containers/LoginServices/LoginServices.test.tsxapp/containers/message/components/__tests__/Content.test.tsxapp/containers/TextInput/FormTextInput.tsxapp/views/RoomInfoView/components/RoomInfoButtons.test.tsxapp/lib/services/voip/MediaSessionInstance.test.tsapp/views/RoomView/List/hooks/useMessages.test.tsxapp/views/AddChannelTeamView.tsxapp/containers/message/components/__tests__/Blocks.test.tsxapp/views/RoomView/List/index.tsxapp/definitions/ILoggedUser.tsapp/lib/methods/helpers/mergeSubscriptionsRooms.tsapp/definitions/ITeam.tsapp/views/RoomView/index.tsxapp/lib/services/voip/getPeerAutocompleteOptions.tsapp/containers/MessageComposer/MessageComposer.tsxapp/lib/database/interfaces.tsapp/containers/ActionSheet/ActionSheet.tsxapp/views/RoomActionsView/components/CallSection.stories.tsxapp/reducers/login.tsapp/containers/message/hooks/__tests__/useMessageAccessibilityLabel.test.tsxapp/views/ModalBlockView.tsxapp/views/RoomActionsView/components/CallSection.test.tsxapp/containers/message/__tests__/index.test.tsxapp/definitions/rest/helpers/index.tsapp/containers/NewMediaCall/VoipCallLifecycle.integration.test.tsxapp/views/RoomView/List/hooks/useScroll.tsapp/lib/services/restApi.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx}: Use TypeScript for type safety; add explicit type annotations to function parameters and return types
Prefer interfaces over type aliases for defining object shapes in TypeScript
Use enums for sets of related constants rather than magic strings or numbers
**/*.{ts,tsx}: Use TypeScript strict mode for the React Native application.
Resolve application imports relative toapp/, using the configuredbaseUrlwhere appropriate.
Use Redux and Redux-Saga for application state management; keep actions as plain action creators, reducers responsible for state shape, and sagas responsible for side effects.
Run the formatter/linter and tests for modified files before committing; pre-commit hooks enforce these checks.
Files:
app/containers/message/hooks/__tests__/useMessageAccessibilityHint.test.tsxapp/containers/message/components/__tests__/Thread.test.tsxapp/definitions/utils.tsapp/views/CannedResponsesListView/CannedResponseItem.tsxapp/containers/message/components/__tests__/RepliedThread.test.tsxapp/views/RoomInfoEditView/index.tsxapp/lib/methods/loadMessagesForRoom.test.tsapp/containers/UIKit/MessageBlock.tsxapp/lib/methods/search.test.tsapp/containers/message/components/__tests__/Reply.test.tsxapp/views/RoomInfoView/components/RoomInfoButtons.stories.tsxapp/containers/message/components/__tests__/Quote.test.tsxapp/containers/MessageComposer/hooks/useAutocomplete.tsapp/containers/CustomIcon/index.tsxapp/containers/MessageComposer/MessageComposer.test.tsxapp/lib/methods/roomTypeToApiType.tsapp/containers/message/stores/__tests__/MessageStore.test.tsxapp/containers/LoginServices/LoginServices.test.tsxapp/containers/message/components/__tests__/Content.test.tsxapp/containers/TextInput/FormTextInput.tsxapp/views/RoomInfoView/components/RoomInfoButtons.test.tsxapp/lib/services/voip/MediaSessionInstance.test.tsapp/views/RoomView/List/hooks/useMessages.test.tsxapp/views/AddChannelTeamView.tsxapp/containers/message/components/__tests__/Blocks.test.tsxapp/views/RoomView/List/index.tsxapp/definitions/ILoggedUser.tsapp/lib/methods/helpers/mergeSubscriptionsRooms.tsapp/definitions/ITeam.tsapp/views/RoomView/index.tsxapp/lib/services/voip/getPeerAutocompleteOptions.tsapp/containers/MessageComposer/MessageComposer.tsxapp/lib/database/interfaces.tsapp/containers/ActionSheet/ActionSheet.tsxapp/views/RoomActionsView/components/CallSection.stories.tsxapp/reducers/login.tsapp/containers/message/hooks/__tests__/useMessageAccessibilityLabel.test.tsxapp/views/ModalBlockView.tsxapp/views/RoomActionsView/components/CallSection.test.tsxapp/containers/message/__tests__/index.test.tsxapp/definitions/rest/helpers/index.tsapp/containers/NewMediaCall/VoipCallLifecycle.integration.test.tsxapp/views/RoomView/List/hooks/useScroll.tsapp/lib/services/restApi.ts
**/*.{ts,tsx,js,jsx,json}
📄 CodeRabbit inference engine (CLAUDE.md)
Follow Oxfmt formatting: tabs, single quotes, 130-character width, no trailing commas, omitted arrow-function parentheses where allowed, and same-line brackets.
Files:
app/containers/message/hooks/__tests__/useMessageAccessibilityHint.test.tsxapp/containers/message/components/__tests__/Thread.test.tsxapp/definitions/utils.tsapp/views/CannedResponsesListView/CannedResponseItem.tsxapp/containers/message/components/__tests__/RepliedThread.test.tsxapp/views/RoomInfoEditView/index.tsxapp/lib/methods/loadMessagesForRoom.test.tsapp/containers/UIKit/MessageBlock.tsxapp/lib/methods/search.test.tsapp/containers/message/components/__tests__/Reply.test.tsxapp/views/RoomInfoView/components/RoomInfoButtons.stories.tsxapp/containers/message/components/__tests__/Quote.test.tsxapp/containers/MessageComposer/hooks/useAutocomplete.tsapp/containers/CustomIcon/index.tsxapp/containers/MessageComposer/MessageComposer.test.tsxapp/lib/methods/roomTypeToApiType.tsapp/containers/message/stores/__tests__/MessageStore.test.tsxapp/containers/LoginServices/LoginServices.test.tsxapp/containers/message/components/__tests__/Content.test.tsxapp/containers/TextInput/FormTextInput.tsxapp/views/RoomInfoView/components/RoomInfoButtons.test.tsxapp/lib/services/voip/MediaSessionInstance.test.tsapp/views/RoomView/List/hooks/useMessages.test.tsxapp/views/AddChannelTeamView.tsxapp/containers/message/components/__tests__/Blocks.test.tsxapp/views/RoomView/List/index.tsxapp/definitions/ILoggedUser.tsapp/lib/methods/helpers/mergeSubscriptionsRooms.tsapp/definitions/ITeam.tsapp/views/RoomView/index.tsxapp/lib/services/voip/getPeerAutocompleteOptions.tsapp/containers/MessageComposer/MessageComposer.tsxapp/lib/database/interfaces.tsapp/containers/ActionSheet/ActionSheet.tsxapp/views/RoomActionsView/components/CallSection.stories.tsxapp/reducers/login.tsapp/containers/message/hooks/__tests__/useMessageAccessibilityLabel.test.tsxapp/views/ModalBlockView.tsxapp/views/RoomActionsView/components/CallSection.test.tsxapp/containers/message/__tests__/index.test.tsxapp/definitions/rest/helpers/index.tsapp/containers/NewMediaCall/VoipCallLifecycle.integration.test.tsxapp/views/RoomView/List/hooks/useScroll.tspackage.jsonapp/lib/services/restApi.ts
app/lib/services/voip/**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
Implement VoIP using Zustand stores and native CallKit/Telecom integration; do not conflate VoIP with the Redux/Saga-based VideoConf feature.
Files:
app/lib/services/voip/MediaSessionInstance.test.tsapp/lib/services/voip/getPeerAutocompleteOptions.ts
app/lib/database/**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
Use WatermelonDB for local database models and schema, maintaining the local-first approach where the UI reads from the database and sagas synchronize with the server.
Files:
app/lib/database/interfaces.ts
app/lib/services/restApi.ts
📄 CodeRabbit inference engine (CLAUDE.md)
Use
fetchfor HTTP REST API requests through the REST API service.
Files:
app/lib/services/restApi.ts
🧠 Learnings (8)
📚 Learning: 2026-04-30T17:07:51.020Z
Learnt from: diegolmello
Repo: RocketChat/Rocket.Chat.ReactNative PR: 7274
File: app/lib/services/voip/MediaCallEvents.ts:0-0
Timestamp: 2026-04-30T17:07:51.020Z
Learning: In this Rocket.Chat React Native codebase, the ESLint rule `no-void: error` is enforced. When you see a promise returned from an async call that is not awaited (a “floating promise”), do not silence it with the `void somePromise()` pattern. Instead, handle the promise explicitly by attaching `.catch(...)` (or otherwise awaiting/handling the error) so unhandled-rejection risks are addressed in a way that satisfies the existing ESLint configuration.
Applied to files:
app/containers/message/hooks/__tests__/useMessageAccessibilityHint.test.tsxapp/containers/message/components/__tests__/Thread.test.tsxapp/definitions/utils.tsapp/views/CannedResponsesListView/CannedResponseItem.tsxapp/containers/message/components/__tests__/RepliedThread.test.tsxapp/views/RoomInfoEditView/index.tsxapp/lib/methods/loadMessagesForRoom.test.tsapp/containers/UIKit/MessageBlock.tsxapp/lib/methods/search.test.tsapp/containers/message/components/__tests__/Reply.test.tsxapp/views/RoomInfoView/components/RoomInfoButtons.stories.tsxapp/containers/message/components/__tests__/Quote.test.tsxapp/containers/MessageComposer/hooks/useAutocomplete.tsapp/containers/CustomIcon/index.tsxapp/containers/MessageComposer/MessageComposer.test.tsxapp/lib/methods/roomTypeToApiType.tsapp/containers/message/stores/__tests__/MessageStore.test.tsxapp/containers/LoginServices/LoginServices.test.tsxapp/containers/message/components/__tests__/Content.test.tsxapp/containers/TextInput/FormTextInput.tsxapp/views/RoomInfoView/components/RoomInfoButtons.test.tsxapp/lib/services/voip/MediaSessionInstance.test.tsapp/views/RoomView/List/hooks/useMessages.test.tsxapp/views/AddChannelTeamView.tsxapp/containers/message/components/__tests__/Blocks.test.tsxapp/views/RoomView/List/index.tsxapp/definitions/ILoggedUser.tsapp/lib/methods/helpers/mergeSubscriptionsRooms.tsapp/definitions/ITeam.tsapp/views/RoomView/index.tsxapp/lib/services/voip/getPeerAutocompleteOptions.tsapp/containers/MessageComposer/MessageComposer.tsxapp/lib/database/interfaces.tsapp/containers/ActionSheet/ActionSheet.tsxapp/views/RoomActionsView/components/CallSection.stories.tsxapp/reducers/login.tsapp/containers/message/hooks/__tests__/useMessageAccessibilityLabel.test.tsxapp/views/ModalBlockView.tsxapp/views/RoomActionsView/components/CallSection.test.tsxapp/containers/message/__tests__/index.test.tsxapp/definitions/rest/helpers/index.tsapp/containers/NewMediaCall/VoipCallLifecycle.integration.test.tsxapp/views/RoomView/List/hooks/useScroll.tsapp/lib/services/restApi.ts
📚 Learning: 2026-06-25T18:37:25.526Z
Learnt from: diegolmello
Repo: RocketChat/Rocket.Chat.ReactNative PR: 7434
File: app/views/ScreenLockConfigView.test.tsx:16-22
Timestamp: 2026-06-25T18:37:25.526Z
Learning: In Rocket.Chat ReactNative tests that mock selectors for `useAppSelector`, don’t require the mocked selector input to be typed as `IApplicationState` when the fixture only includes a partial Redux state slice (e.g., only `server` and `settings`). Requiring the full `IApplicationState` type in that scenario forces unsafe `as IApplicationState` casts and undermines type-safety. For these narrowly scoped selector-mock fixtures, use a less strict type (e.g., `any`) to keep the mock focused on the slice under test.
Applied to files:
app/containers/message/hooks/__tests__/useMessageAccessibilityHint.test.tsxapp/containers/message/components/__tests__/Thread.test.tsxapp/containers/message/components/__tests__/RepliedThread.test.tsxapp/lib/methods/loadMessagesForRoom.test.tsapp/lib/methods/search.test.tsapp/containers/message/components/__tests__/Reply.test.tsxapp/containers/message/components/__tests__/Quote.test.tsxapp/containers/MessageComposer/MessageComposer.test.tsxapp/containers/message/stores/__tests__/MessageStore.test.tsxapp/containers/LoginServices/LoginServices.test.tsxapp/containers/message/components/__tests__/Content.test.tsxapp/views/RoomInfoView/components/RoomInfoButtons.test.tsxapp/lib/services/voip/MediaSessionInstance.test.tsapp/views/RoomView/List/hooks/useMessages.test.tsxapp/containers/message/components/__tests__/Blocks.test.tsxapp/containers/message/hooks/__tests__/useMessageAccessibilityLabel.test.tsxapp/views/RoomActionsView/components/CallSection.test.tsxapp/containers/message/__tests__/index.test.tsxapp/containers/NewMediaCall/VoipCallLifecycle.integration.test.tsx
📚 Learning: 2026-06-25T18:37:44.793Z
Learnt from: diegolmello
Repo: RocketChat/Rocket.Chat.ReactNative PR: 7434
File: app/views/ScreenLockConfigView.tsx:101-141
Timestamp: 2026-06-25T18:37:44.793Z
Learning: In the Rocket.Chat React Native codebase, do not treat passing an `async` function directly to an event prop in React/React Native UI components (e.g., `onPress={async () => ...}` in TSX) as a “floating promises” CI-blocking lint issue—this repo does not enable the ESLint `no-floating-promises` rule (while `no-void` is enforced). Only raise robustness follow-ups when there are genuinely unhandled promise paths (e.g., fire-and-forget calls like `save()` that return a Promise that is neither awaited nor handled), and prefer making sure failure paths are explicitly handled/reported rather than blocking on lint-style floating-promise concerns.
Applied to files:
app/containers/message/hooks/__tests__/useMessageAccessibilityHint.test.tsxapp/containers/message/components/__tests__/Thread.test.tsxapp/views/CannedResponsesListView/CannedResponseItem.tsxapp/containers/message/components/__tests__/RepliedThread.test.tsxapp/views/RoomInfoEditView/index.tsxapp/containers/UIKit/MessageBlock.tsxapp/containers/message/components/__tests__/Reply.test.tsxapp/views/RoomInfoView/components/RoomInfoButtons.stories.tsxapp/containers/message/components/__tests__/Quote.test.tsxapp/containers/CustomIcon/index.tsxapp/containers/MessageComposer/MessageComposer.test.tsxapp/containers/message/stores/__tests__/MessageStore.test.tsxapp/containers/LoginServices/LoginServices.test.tsxapp/containers/message/components/__tests__/Content.test.tsxapp/containers/TextInput/FormTextInput.tsxapp/views/RoomInfoView/components/RoomInfoButtons.test.tsxapp/views/RoomView/List/hooks/useMessages.test.tsxapp/views/AddChannelTeamView.tsxapp/containers/message/components/__tests__/Blocks.test.tsxapp/views/RoomView/List/index.tsxapp/views/RoomView/index.tsxapp/containers/MessageComposer/MessageComposer.tsxapp/containers/ActionSheet/ActionSheet.tsxapp/views/RoomActionsView/components/CallSection.stories.tsxapp/containers/message/hooks/__tests__/useMessageAccessibilityLabel.test.tsxapp/views/ModalBlockView.tsxapp/views/RoomActionsView/components/CallSection.test.tsxapp/containers/message/__tests__/index.test.tsxapp/containers/NewMediaCall/VoipCallLifecycle.integration.test.tsx
📚 Learning: 2026-06-24T22:58:43.390Z
Learnt from: Rohit3523
Repo: RocketChat/Rocket.Chat.ReactNative PR: 7157
File: app/views/MessagesView/index.tsx:392-392
Timestamp: 2026-06-24T22:58:43.390Z
Learning: When wrapping a React Native component (e.g., via `withSafeAreaInsets`) ensure `hoistNonReactStatics` is only required if the wrapped component actually defines static properties/methods that consumers rely on. If the component has no statics (as in `app/views/MessagesView/index.tsx`), you can omit `hoistNonReactStatics` for this case.
Applied to files:
app/views/CannedResponsesListView/CannedResponseItem.tsxapp/views/RoomInfoEditView/index.tsxapp/views/RoomInfoView/components/RoomInfoButtons.stories.tsxapp/views/RoomInfoView/components/RoomInfoButtons.test.tsxapp/views/RoomView/List/hooks/useMessages.test.tsxapp/views/AddChannelTeamView.tsxapp/views/RoomView/List/index.tsxapp/views/RoomView/index.tsxapp/views/RoomActionsView/components/CallSection.stories.tsxapp/views/ModalBlockView.tsxapp/views/RoomActionsView/components/CallSection.test.tsx
📚 Learning: 2026-03-15T13:55:42.038Z
Learnt from: Rohit3523
Repo: RocketChat/Rocket.Chat.ReactNative PR: 6911
File: app/containers/markdown/Markdown.stories.tsx:104-104
Timestamp: 2026-03-15T13:55:42.038Z
Learning: In Rocket.Chat React Native, the markdown parser requires a space between the underscore wrapping italic text and a mention sigil (_ mention _ instead of _mention_). Ensure stories and tests that include italic-wrapped mentions follow this form to guarantee proper parsing. Specifically, for files like app/containers/markdown/Markdown.stories.tsx, and any test/content strings that exercise italic-mentions, use the pattern _ mention _ (with spaces) to prevent the mention from being treated as plain text. Validate any test strings or story content accordingly.
Applied to files:
app/views/RoomInfoView/components/RoomInfoButtons.stories.tsxapp/views/RoomActionsView/components/CallSection.stories.tsx
📚 Learning: 2026-06-26T19:40:06.327Z
Learnt from: diegolmello
Repo: RocketChat/Rocket.Chat.ReactNative PR: 7449
File: app/containers/ActionSheet/useActionSheetItemHeight.ts:0-0
Timestamp: 2026-06-26T19:40:06.327Z
Learning: In Rocket.Chat’s React Native ActionSheet implementation, avoid introducing a dependency on the responsive-layout provider (useResponsiveLayout) for ActionSheet sizing. In ActionSheet-related files (e.g., app/containers/ActionSheet/useActionSheetItemHeight.ts), it’s acceptable to read `fontScale` directly from `useWindowDimensions()` when it would yield the identical value; only couple to `useResponsiveLayout` if `useWindowDimensions().fontScale` would differ and would affect sizing.
Applied to files:
app/containers/ActionSheet/ActionSheet.tsx
📚 Learning: 2026-02-05T13:55:00.974Z
Learnt from: Rohit3523
Repo: RocketChat/Rocket.Chat.ReactNative PR: 6930
File: package.json:101-101
Timestamp: 2026-02-05T13:55:00.974Z
Learning: In this repository, the dependency on react-native-image-crop-picker should reference the RocketChat fork (RocketChat/react-native-image-crop-picker) with explicit commit pins, not the upstream ivpusic/react-native-image-crop-picker. Update package.json dependencies (and any lockfile) to point to the fork URL and a specific commit, ensuring edge-to-edge Android fixes are included. This pattern should apply to all package.json files in the repo that declare this dependency.
Applied to files:
package.json
📚 Learning: 2026-05-07T17:47:14.516Z
Learnt from: diegolmello
Repo: RocketChat/Rocket.Chat.ReactNative PR: 7303
File: package.json:5-5
Timestamp: 2026-05-07T17:47:14.516Z
Learning: When reviewing pnpm `packageManager` version pins in any `package.json` (e.g., `"packageManager": "pnpm@<version>"`), don’t rely solely on web-search results to determine whether a version exists. For very recently published versions, cross-check the target version against the official pnpm release page (https://github.com/pnpm/pnpm/releases) and the npm registry page for pnpm (https://www.npmjs.com/package/pnpm) before flagging the pinned version as non-existent.
Applied to files:
package.json
🔇 Additional comments (47)
.maestro/scripts/data-setup.js (1)
73-73: LGTM!app/views/RoomView/List/hooks/useScroll.ts (1)
154-154: LGTM!Also applies to: 229-229
app/views/RoomInfoEditView/index.tsx (1)
457-457: LGTM!app/containers/TextInput/FormTextInput.tsx (1)
176-180: LGTM!.rnstorybook/generateSnapshots.tsx (1)
1-1: LGTM!Also applies to: 17-17
app/containers/message/components/__tests__/Thread.test.tsx (1)
17-17: LGTM!app/containers/message/hooks/__tests__/useMessageAccessibilityHint.test.tsx (1)
11-11: LGTM!app/containers/message/hooks/__tests__/useMessageAccessibilityLabel.test.tsx (1)
27-27: LGTM!app/lib/methods/loadMessagesForRoom.test.ts (1)
47-47: LGTM!app/lib/methods/search.test.ts (1)
77-77: LGTM!app/lib/services/voip/MediaSessionInstance.test.ts (1)
173-187: LGTM!app/views/RoomActionsView/components/CallSection.stories.tsx (1)
46-46: LGTM!app/views/RoomActionsView/components/CallSection.test.tsx (1)
79-79: LGTM!app/views/RoomInfoView/components/RoomInfoButtons.stories.tsx (1)
46-46: LGTM!app/views/RoomInfoView/components/RoomInfoButtons.test.tsx (1)
63-63: LGTM!.rnstorybook/main.ts (1)
1-1: LGTM!app/containers/ActionSheet/ActionSheet.tsx (1)
125-125: LGTM!app/containers/CustomIcon/index.tsx (1)
17-17: LGTM!app/containers/MessageComposer/MessageComposer.tsx (1)
117-117: LGTM!app/containers/MessageComposer/hooks/useAutocomplete.ts (1)
31-33: LGTM!app/containers/UIKit/MessageBlock.tsx (1)
4-8: LGTM!app/definitions/ILoggedUser.ts (1)
33-36: LGTM!app/definitions/ITeam.ts (1)
51-54: LGTM!app/definitions/rest/helpers/index.ts (1)
7-10: LGTM!Also applies to: 32-32, 52-57
app/containers/message/__tests__/index.test.tsx (1)
57-57: LGTM!app/containers/message/components/__tests__/Blocks.test.tsx (1)
17-17: LGTM!app/definitions/utils.ts (1)
18-20: LGTM!app/lib/database/interfaces.ts (1)
27-50: LGTM!Also applies to: 65-68
app/lib/methods/helpers/mergeSubscriptionsRooms.ts (1)
54-54: LGTM!app/lib/methods/roomTypeToApiType.ts (1)
12-17: LGTM!app/views/ModalBlockView.tsx (1)
163-170: LGTM!app/views/RoomView/List/index.tsx (1)
60-60: LGTM!app/views/RoomView/index.tsx (1)
1239-1239: LGTM!app/containers/message/components/__tests__/Quote.test.tsx (1)
44-44: LGTM!app/containers/message/components/__tests__/RepliedThread.test.tsx (1)
11-12: LGTM!app/containers/message/components/__tests__/Reply.test.tsx (1)
48-53: LGTM!app/lib/services/restApi.ts (1)
267-267: LGTM!app/lib/services/voip/getPeerAutocompleteOptions.ts (1)
48-48: LGTM!app/reducers/login.ts (1)
106-106: LGTM!app/views/AddChannelTeamView.tsx (1)
74-78: LGTM!app/views/CannedResponsesListView/CannedResponseItem.tsx (1)
55-55: LGTM!app/containers/LoginServices/LoginServices.test.tsx (1)
42-42: LGTM!app/containers/MessageComposer/MessageComposer.test.tsx (1)
95-95: LGTM!app/containers/NewMediaCall/VoipCallLifecycle.integration.test.tsx (1)
219-270: LGTM!app/containers/message/components/__tests__/Content.test.tsx (1)
51-51: LGTM!app/containers/message/stores/__tests__/MessageStore.test.tsx (1)
166-172: LGTM!app/views/RoomView/List/hooks/useMessages.test.tsx (1)
63-63: LGTM!
|
Android Build Available Rocket.Chat 4.75.0.109409 Internal App Sharing: https://play.google.com/apps/test/RQQ8k09hlnQ/ahAO29uNTT6uRhkKGuneNSW2aNuA4lStOmQYTtUeQk8HTym48h8evHNnRRwtVF7yqJJoDUhRD2dz_ebBhynjUGBPct |
|
iOS Build Available Rocket.Chat 4.75.0.109410 |
# Conflicts: # CLAUDE.md
There was a problem hiding this comment.
🧹 Nitpick comments (1)
app/views/RoomView/index.test.tsx (1)
83-106: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winKeep the RoomView test fixtures type-safe.
buildPropsclaims to returnIRoomViewPropsthroughas unknown as, but the supplied interface requiresuser.showMessageInMainThread,replyBroadcast,airGappedRestrictionRemainingDays,isFederationEnabled, andisFederationModuleEnabled. The fixture omits these fields, so the cast can hide prop-dependent regressions. Add explicit defaults and remove the double assertion. Also define aMockSubscriptionRowinterface and explicit return types forbuildRow,renderRoomView, andflush.As per coding guidelines, use TypeScript types to enforce contracts and prefer interfaces for object shapes.
Also applies to: 109-123, 126-131, 140-143
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@app/views/RoomView/index.test.tsx` around lines 83 - 106, Make the RoomView test fixtures type-safe by updating buildProps to provide the required user.showMessageInMainThread, replyBroadcast, airGappedRestrictionRemainingDays, isFederationEnabled, and isFederationModuleEnabled defaults, then remove the as unknown as IRoomViewProps cast. Define a MockSubscriptionRow interface and add explicit return types to buildRow, renderRoomView, and flush, using interfaces for object shapes.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@app/views/RoomView/index.test.tsx`:
- Around line 83-106: Make the RoomView test fixtures type-safe by updating
buildProps to provide the required user.showMessageInMainThread, replyBroadcast,
airGappedRestrictionRemainingDays, isFederationEnabled, and
isFederationModuleEnabled defaults, then remove the as unknown as IRoomViewProps
cast. Define a MockSubscriptionRow interface and add explicit return types to
buildRow, renderRoomView, and flush, using interfaces for object shapes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 20905c2c-8bf8-4467-9a92-a21ac6c22735
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (9)
CLAUDE.mdapp/containers/ActionSheet/ActionSheet.tsxapp/containers/NewMediaCall/VoipCallLifecycle.integration.test.tsxapp/lib/methods/loadMessagesForRoom.test.tsapp/lib/methods/roomTypeToApiType.tsapp/lib/services/voip/MediaSessionInstance.test.tsapp/views/RoomView/index.test.tsxapp/views/RoomView/index.tsxpackage.json
🚧 Files skipped from review as they are similar to previous changes (8)
- app/views/RoomView/index.tsx
- app/lib/methods/loadMessagesForRoom.test.ts
- app/lib/services/voip/MediaSessionInstance.test.ts
- CLAUDE.md
- app/lib/methods/roomTypeToApiType.ts
- package.json
- app/containers/ActionSheet/ActionSheet.tsx
- app/containers/NewMediaCall/VoipCallLifecycle.integration.test.tsx
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
- GitHub Check: ESLint and Test / run-eslint-and-test
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{js,ts,jsx,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{js,ts,jsx,tsx}: Use descriptive names for functions, variables, and classes that clearly convey their purpose
Write comments that explain the 'why' behind code decisions, not the 'what'
Keep functions small and focused on a single responsibility
Use const by default, let when reassignment is needed, and avoid var
Prefer async/await over .then() chains for handling asynchronous operations
Use explicit error handling with try/catch blocks for async operations
Avoid deeply nested code; refactor complex logic into helper functions
Files:
app/views/RoomView/index.test.tsx
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx}: Use TypeScript for type safety; add explicit type annotations to function parameters and return types
Prefer interfaces over type aliases for defining object shapes in TypeScript
Use enums for sets of related constants rather than magic strings or numbers
Files:
app/views/RoomView/index.test.tsx
**/*.{js,jsx,ts,tsx,json}
📄 CodeRabbit inference engine (CLAUDE.md)
Use Oxfmt with the repository configuration in
.oxfmtrc.json: tabs, single quotes, 130-character width, no trailing commas, omitted arrow-function parentheses where valid, and same-line brackets.
Files:
app/views/RoomView/index.test.tsx
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{js,jsx,ts,tsx}: Follow Oxlint rules configured in.oxlintrc.json, including the import, React, Jest, TypeScript, and React Native plugins.
For data flow, read UI data from WatermelonDB and use sagas to synchronize it with the server.
Use Redux and Redux-Saga for global or server state, while using Zustand for feature-local stores; do not assume all state is in Redux.
Before committing changes, runpnpm format-lintandTZ=UTC pnpm testfor modified files.
Write code compatible with the supported React Native platforms: iOS 13.4+ and Android 6.0+.
Files:
app/views/RoomView/index.test.tsx
🧠 Learnings (5)
📓 Common learnings
Learnt from: CR
Repo: RocketChat/Rocket.Chat.ReactNative
Timestamp: 2026-08-03T17:43:33.269Z
Learning: Run `pnpm pod-install` before any iOS build.
Learnt from: CR
Repo: RocketChat/Rocket.Chat.ReactNative
Timestamp: 2026-08-03T17:43:33.269Z
Learning: Use the pinned pnpm version by running `corepack enable` during first-time machine setup.
📚 Learning: 2026-04-30T17:07:51.020Z
Learnt from: diegolmello
Repo: RocketChat/Rocket.Chat.ReactNative PR: 7274
File: app/lib/services/voip/MediaCallEvents.ts:0-0
Timestamp: 2026-04-30T17:07:51.020Z
Learning: In this Rocket.Chat React Native codebase, the ESLint rule `no-void: error` is enforced. When you see a promise returned from an async call that is not awaited (a “floating promise”), do not silence it with the `void somePromise()` pattern. Instead, handle the promise explicitly by attaching `.catch(...)` (or otherwise awaiting/handling the error) so unhandled-rejection risks are addressed in a way that satisfies the existing ESLint configuration.
Applied to files:
app/views/RoomView/index.test.tsx
📚 Learning: 2026-06-24T22:58:43.390Z
Learnt from: Rohit3523
Repo: RocketChat/Rocket.Chat.ReactNative PR: 7157
File: app/views/MessagesView/index.tsx:392-392
Timestamp: 2026-06-24T22:58:43.390Z
Learning: When wrapping a React Native component (e.g., via `withSafeAreaInsets`) ensure `hoistNonReactStatics` is only required if the wrapped component actually defines static properties/methods that consumers rely on. If the component has no statics (as in `app/views/MessagesView/index.tsx`), you can omit `hoistNonReactStatics` for this case.
Applied to files:
app/views/RoomView/index.test.tsx
📚 Learning: 2026-06-25T18:37:25.526Z
Learnt from: diegolmello
Repo: RocketChat/Rocket.Chat.ReactNative PR: 7434
File: app/views/ScreenLockConfigView.test.tsx:16-22
Timestamp: 2026-06-25T18:37:25.526Z
Learning: In Rocket.Chat ReactNative tests that mock selectors for `useAppSelector`, don’t require the mocked selector input to be typed as `IApplicationState` when the fixture only includes a partial Redux state slice (e.g., only `server` and `settings`). Requiring the full `IApplicationState` type in that scenario forces unsafe `as IApplicationState` casts and undermines type-safety. For these narrowly scoped selector-mock fixtures, use a less strict type (e.g., `any`) to keep the mock focused on the slice under test.
Applied to files:
app/views/RoomView/index.test.tsx
📚 Learning: 2026-06-25T18:37:44.793Z
Learnt from: diegolmello
Repo: RocketChat/Rocket.Chat.ReactNative PR: 7434
File: app/views/ScreenLockConfigView.tsx:101-141
Timestamp: 2026-06-25T18:37:44.793Z
Learning: In the Rocket.Chat React Native codebase, do not treat passing an `async` function directly to an event prop in React/React Native UI components (e.g., `onPress={async () => ...}` in TSX) as a “floating promises” CI-blocking lint issue—this repo does not enable the ESLint `no-floating-promises` rule (while `no-void` is enforced). Only raise robustness follow-ups when there are genuinely unhandled promise paths (e.g., fire-and-forget calls like `save()` that return a Promise that is neither awaited nor handled), and prefer making sure failure paths are explicitly handled/reported rather than blocking on lint-style floating-promise concerns.
Applied to files:
app/views/RoomView/index.test.tsx
🔇 Additional comments (2)
app/views/RoomView/index.test.tsx (2)
1-82: LGTM!
133-138: LGTM!Also applies to: 145-180
* fix: render mentions, emojis, and inline elements inside headings (#6911) * chore: OXC (#7515) * chore: replace ESLint with Oxlint Migrate linting from ESLint 8 to Oxlint. `pnpm lint` drops from ~1min to ~0.6s and 17 eslint packages are removed from devDependencies. Config lives in `.oxlintrc.json`, generated with `@oxlint/migrate` from the old `.eslintrc.js` and then tuned: - `eslint-plugin-react-native` is loaded through `jsPlugins`, since Oxlint has no built-in equivalent. - `import/extensions` is off. Its old options (`js: 'warning'`, ...) were not valid values for the rule, so it never reported anything under ESLint. - `no-unused-vars` sets `caughtErrors: 'none'` to match the ESLint 8 default. - `import/no-cycle` and the React Compiler rules report as warnings. They surface findings ESLint never showed, so they are not gated yet. Rules with no Oxlint equivalent are dropped: `no-restricted-syntax` (the ban on `React.*` member syntax), `import/order`, `import/no-unresolved` and `import/named`. ESLint 8 skipped dot-directories, so files under `.rnstorybook/` and `.maestro/` were never linted. Oxlint does lint them, which surfaced four violations that are fixed here. The CI workflow keeps its filename and job id so branch protection checks stay valid. * chore: replace Prettier with Oxfmt Migrate formatting from Prettier 2.8.8 to Oxfmt via `oxfmt --migrate prettier`. - `.oxfmtrc.json` carries every previous Prettier option unchanged (tabs, single quotes, printWidth 130, no trailing comma, avoid arrow parens, bracketSameLine) plus the `.prettierignore` patterns as `ignorePatterns`. `sortPackageJson` is disabled to match previous behavior. - `.prettierrc.js` and `.prettierignore` removed; `prettier` dropped from devDependencies. - `prettier-lint` script renamed to `format-lint` and now runs `oxfmt`. - 44 files reformatted: Oxfmt follows Prettier 3 style, so nested ternaries and `extends`/type-argument wrapping indent differently than under Prettier 2. No semantic changes. - prettier.yml still ran `eslint --fix`, missed in the Oxlint migration; it now runs `oxfmt` and `oxlint --fix`. `react/exhaustive-deps` is allowed there because its autofix rewrites dependency arrays, which changes behavior and must not land unreviewed from CI. - Workflow filename kept as prettier.yml to avoid disturbing branch protection checks, same as eslint.yml. Verified: `pnpm lint` exit 0 (0 errors), `tsc` clean, 217/217 suites and 2032/2032 tests pass, `oxfmt --check` clean. * chore: update lockfile for oxfmt * chore: migrate typecheck to TypeScript 7.0 (#7516) * chore: bump TypeScript to 6.0 Baseline hop ahead of the TypeScript 7.0 (native compiler) migration, so the 7.0 cut is a version swap against a config that is already 7.0-shaped. TypeScript 6.0 raises both `moduleResolution: node10` and `baseUrl` as errors rather than warnings, and `ignoreDeprecations: "6.0"` stops working in 7.0, so clearing them properly is the only route: - `moduleResolution` -> `bundler` (Metro is a bundler), which requires an esnext-shaped `module`. - `baseUrl` removed. Exactly one import relied on it; it is now relative. - `types` enumerated, since a resolution mode that honours package `exports` no longer auto-includes every `@types` package. `@types/node` becomes an explicit devDependency. Honouring `exports` also stranded the bundled `.d.ts` of three dependencies whose maps expose only JavaScript. Each gets a `types` condition via patch-package; this is visible to the type checker only, as Metro ignores that condition. A `paths` mapping was tried first and rejected, because the jest-expo resolver reads `paths` and then loads those `.d.ts` files at runtime. The inherited block of commented-out option documentation is dropped. * chore: migrate typecheck to TypeScript 7.0 Replaces TypeScript 6.0.3 with the native Go compiler. The version is pinned exactly, since the platform binaries ship as version-matched optional dependencies; the lockfile records the linux-x64 target CI resolves. Typecheck wall time drops from 5.77s on 5.9.3 to ~1.0s. No configuration change was required: the 6.0 hop already left tsconfig in a 7.0-shaped state, and the default parallelism saturates without `--checkers`. `@react-navigation/core` needs a patch to type-check. TypeScript 7.0.2 resolves the mutual recursion between `StaticParamList` and `ParamListForScreens` eagerly where earlier versions defer it, reports the alias as circular, and degrades it to a non-generic symbol -- surfacing as `TS2315: Type 'StaticParamList' is not generic` at our call sites. The patch drops a `FlatType<>` wrapper from the alias, which only flattens intersections for editor display, so the type is unchanged and the misfire stops. * chore: Bump version to 4.76.0 (#7542) * chore(ci): apply least privilege permission to GitHub Actions (#7350) * chore: switch React Compiler to infer mode (#7545) * ci: route Maestro e2e selection through sniffler impact analysis (#7476) * fix(iOS): RoomItem Swipe not working after scroll (#7532) * fix(ci): select shards for changes outside app and honor the release label (#7555) * fix: delete background taller than its row on ServersHistory (#7536) * fix: delete background taller than its row on server items * chore: code improvements --------- Co-authored-by: Diego Mello <diegolmello@gmail.com> * fix: UIKit block messages rendering with smaller font size (#7531) * fix: UIKit block messages rendering with smaller font size * fix: snapshot * fix(db): move deleteMessage finds and prepares inside the writer lock (#7550) * fix: quote has no effect on older thread messages (#7535) * fix: Quote has no effect on older thread messages * fix: Quote has no effect on older thread messages * chore: e2e test * fix: e2e test * chore: format code and fix lint issues * fix(MessageComposer): resolve quoted thread messages and guard stale lookups * fix: test --------- Co-authored-by: OtavioStasiak <OtavioStasiak@users.noreply.github.com> * fix(db): move persistMessage lookups and prepares inside the writer lock (#7551) * fix: test case 11 and 12 flaky tests (#7564) * fix: test * fix: room last messa test * fix: jumptomessage test * chore: remove comments * fix: jump to message e2e test iOS * remove unused comment * fix(db): move sendMessage reads and prepares inside the writer lock (#7546) * fix(db): move sendMessage reads and prepares inside the writer lock * fix: test improvements * chore: remove comments * fix: Admin Panel content hidden behind bottom navigation bar (#7538) * feat: add tabular numbers (#7568) * feat: tabular numbers across the app, upgrade Inter to 4.1 * update snapshot * chore: pin @rocket.chat/sdk to a specific commit hash (#7569) * fix(e2ee): re-fetch subscription inside the write in toggleRoomE2EE (#7554) * fix(e2ee): re-fetch subscription inside the write in toggleRoomE2EE * code improvements * removed unused comment * fix: run handleDelete finds and prepares inside the writer lock (#7552) * fix: run handleDelete finds and prepares inside the writer lock * chore: reuse mockWMDB * fix: crop screen hidden behind navigation bar on iOS 26 (#7529) * fix: re-fetch message inside the write in getThreadName (#7557) * fix: re-fetch message inside the write in getThreadName * fix: re-fetch message inside the write in getThreadName * chore: new test cases * remove unecessary async * fix(db): move decryptPendingMessages prepares inside the writer lock (#7548) * fix(db): move decryptPendingMessages prepares inside the writer lock * code improvements * chore: new test case encryption * chore: format code and fix lint issues --------- Co-authored-by: OtavioStasiak <OtavioStasiak@users.noreply.github.com> * fix(android): VideoConf notification accept and decline button hidden and touch not working (#7533) * fix: in-app notification buttons ignoring taps on Android * fix: Decline and Accept invisible on the incoming call notification * fix: UIKit buttons not responding on some Android devices (#7573) * fix: force Google account chooser on OAuth login (#7572) * fix: ISO format support in markdown component (#6943) * fix: resolve deep links by room id for channels and groups (#7111) * Merge pull request #7570 from RocketChat/deeplink-saml-auth feat: SAML deeplink auth * fix: grant pull-requests write to build call sites in build-develop (#7599) The reusable workflows build-android.yml and build-ios.yml declare pull-requests: write on their upload jobs. GitHub validates these at call time regardless of job conditionals, so build-develop.yml (caller) must grant the permission or the workflow fails validation. build-pr.yml already grants it; this mirrors that. --------- Co-authored-by: Rohit Bansal <40559587+Rohit3523@users.noreply.github.com> Co-authored-by: Yasmim Nagat <117310290+yasnagat@users.noreply.github.com> Co-authored-by: Otávio Stasiak <91474186+OtavioStasiak@users.noreply.github.com> Co-authored-by: OtavioStasiak <OtavioStasiak@users.noreply.github.com> Co-authored-by: Yash Rajpal <58601732+yash-rajpal@users.noreply.github.com>
* fix: render mentions, emojis, and inline elements inside headings (#6911) * chore: OXC (#7515) * chore: replace ESLint with Oxlint Migrate linting from ESLint 8 to Oxlint. `pnpm lint` drops from ~1min to ~0.6s and 17 eslint packages are removed from devDependencies. Config lives in `.oxlintrc.json`, generated with `@oxlint/migrate` from the old `.eslintrc.js` and then tuned: - `eslint-plugin-react-native` is loaded through `jsPlugins`, since Oxlint has no built-in equivalent. - `import/extensions` is off. Its old options (`js: 'warning'`, ...) were not valid values for the rule, so it never reported anything under ESLint. - `no-unused-vars` sets `caughtErrors: 'none'` to match the ESLint 8 default. - `import/no-cycle` and the React Compiler rules report as warnings. They surface findings ESLint never showed, so they are not gated yet. Rules with no Oxlint equivalent are dropped: `no-restricted-syntax` (the ban on `React.*` member syntax), `import/order`, `import/no-unresolved` and `import/named`. ESLint 8 skipped dot-directories, so files under `.rnstorybook/` and `.maestro/` were never linted. Oxlint does lint them, which surfaced four violations that are fixed here. The CI workflow keeps its filename and job id so branch protection checks stay valid. * chore: replace Prettier with Oxfmt Migrate formatting from Prettier 2.8.8 to Oxfmt via `oxfmt --migrate prettier`. - `.oxfmtrc.json` carries every previous Prettier option unchanged (tabs, single quotes, printWidth 130, no trailing comma, avoid arrow parens, bracketSameLine) plus the `.prettierignore` patterns as `ignorePatterns`. `sortPackageJson` is disabled to match previous behavior. - `.prettierrc.js` and `.prettierignore` removed; `prettier` dropped from devDependencies. - `prettier-lint` script renamed to `format-lint` and now runs `oxfmt`. - 44 files reformatted: Oxfmt follows Prettier 3 style, so nested ternaries and `extends`/type-argument wrapping indent differently than under Prettier 2. No semantic changes. - prettier.yml still ran `eslint --fix`, missed in the Oxlint migration; it now runs `oxfmt` and `oxlint --fix`. `react/exhaustive-deps` is allowed there because its autofix rewrites dependency arrays, which changes behavior and must not land unreviewed from CI. - Workflow filename kept as prettier.yml to avoid disturbing branch protection checks, same as eslint.yml. Verified: `pnpm lint` exit 0 (0 errors), `tsc` clean, 217/217 suites and 2032/2032 tests pass, `oxfmt --check` clean. * chore: update lockfile for oxfmt * chore: migrate typecheck to TypeScript 7.0 (#7516) * chore: bump TypeScript to 6.0 Baseline hop ahead of the TypeScript 7.0 (native compiler) migration, so the 7.0 cut is a version swap against a config that is already 7.0-shaped. TypeScript 6.0 raises both `moduleResolution: node10` and `baseUrl` as errors rather than warnings, and `ignoreDeprecations: "6.0"` stops working in 7.0, so clearing them properly is the only route: - `moduleResolution` -> `bundler` (Metro is a bundler), which requires an esnext-shaped `module`. - `baseUrl` removed. Exactly one import relied on it; it is now relative. - `types` enumerated, since a resolution mode that honours package `exports` no longer auto-includes every `@types` package. `@types/node` becomes an explicit devDependency. Honouring `exports` also stranded the bundled `.d.ts` of three dependencies whose maps expose only JavaScript. Each gets a `types` condition via patch-package; this is visible to the type checker only, as Metro ignores that condition. A `paths` mapping was tried first and rejected, because the jest-expo resolver reads `paths` and then loads those `.d.ts` files at runtime. The inherited block of commented-out option documentation is dropped. * chore: migrate typecheck to TypeScript 7.0 Replaces TypeScript 6.0.3 with the native Go compiler. The version is pinned exactly, since the platform binaries ship as version-matched optional dependencies; the lockfile records the linux-x64 target CI resolves. Typecheck wall time drops from 5.77s on 5.9.3 to ~1.0s. No configuration change was required: the 6.0 hop already left tsconfig in a 7.0-shaped state, and the default parallelism saturates without `--checkers`. `@react-navigation/core` needs a patch to type-check. TypeScript 7.0.2 resolves the mutual recursion between `StaticParamList` and `ParamListForScreens` eagerly where earlier versions defer it, reports the alias as circular, and degrades it to a non-generic symbol -- surfacing as `TS2315: Type 'StaticParamList' is not generic` at our call sites. The patch drops a `FlatType<>` wrapper from the alias, which only flattens intersections for editor display, so the type is unchanged and the misfire stops. * chore: Bump version to 4.76.0 (#7542) * chore(ci): apply least privilege permission to GitHub Actions (#7350) * chore: switch React Compiler to infer mode (#7545) * ci: route Maestro e2e selection through sniffler impact analysis (#7476) * fix(iOS): RoomItem Swipe not working after scroll (#7532) * fix(ci): select shards for changes outside app and honor the release label (#7555) * fix: delete background taller than its row on ServersHistory (#7536) * fix: delete background taller than its row on server items * chore: code improvements --------- Co-authored-by: Diego Mello <diegolmello@gmail.com> * fix: UIKit block messages rendering with smaller font size (#7531) * fix: UIKit block messages rendering with smaller font size * fix: snapshot * fix(db): move deleteMessage finds and prepares inside the writer lock (#7550) * fix: quote has no effect on older thread messages (#7535) * fix: Quote has no effect on older thread messages * fix: Quote has no effect on older thread messages * chore: e2e test * fix: e2e test * chore: format code and fix lint issues * fix(MessageComposer): resolve quoted thread messages and guard stale lookups * fix: test --------- Co-authored-by: OtavioStasiak <OtavioStasiak@users.noreply.github.com> * fix(db): move persistMessage lookups and prepares inside the writer lock (#7551) * fix: test case 11 and 12 flaky tests (#7564) * fix: test * fix: room last messa test * fix: jumptomessage test * chore: remove comments * fix: jump to message e2e test iOS * remove unused comment * fix(db): move sendMessage reads and prepares inside the writer lock (#7546) * fix(db): move sendMessage reads and prepares inside the writer lock * fix: test improvements * chore: remove comments * fix: Admin Panel content hidden behind bottom navigation bar (#7538) * feat: add tabular numbers (#7568) * feat: tabular numbers across the app, upgrade Inter to 4.1 * update snapshot * chore: pin @rocket.chat/sdk to a specific commit hash (#7569) * fix(e2ee): re-fetch subscription inside the write in toggleRoomE2EE (#7554) * fix(e2ee): re-fetch subscription inside the write in toggleRoomE2EE * code improvements * removed unused comment * fix: run handleDelete finds and prepares inside the writer lock (#7552) * fix: run handleDelete finds and prepares inside the writer lock * chore: reuse mockWMDB * fix: crop screen hidden behind navigation bar on iOS 26 (#7529) * fix: re-fetch message inside the write in getThreadName (#7557) * fix: re-fetch message inside the write in getThreadName * fix: re-fetch message inside the write in getThreadName * chore: new test cases * remove unecessary async * fix(db): move decryptPendingMessages prepares inside the writer lock (#7548) * fix(db): move decryptPendingMessages prepares inside the writer lock * code improvements * chore: new test case encryption * chore: format code and fix lint issues --------- Co-authored-by: OtavioStasiak <OtavioStasiak@users.noreply.github.com> * fix(android): VideoConf notification accept and decline button hidden and touch not working (#7533) * fix: in-app notification buttons ignoring taps on Android * fix: Decline and Accept invisible on the incoming call notification * fix: UIKit buttons not responding on some Android devices (#7573) * fix: force Google account chooser on OAuth login (#7572) * fix: ISO format support in markdown component (#6943) * fix: resolve deep links by room id for channels and groups (#7111) * Merge pull request #7570 from RocketChat/deeplink-saml-auth feat: SAML deeplink auth * fix: grant pull-requests write to build call sites in build-develop (#7599) The reusable workflows build-android.yml and build-ios.yml declare pull-requests: write on their upload jobs. GitHub validates these at call time regardless of job conditionals, so build-develop.yml (caller) must grant the permission or the workflow fails validation. build-pr.yml already grants it; this mirrors that. --------- Co-authored-by: Rohit Bansal <40559587+Rohit3523@users.noreply.github.com> Co-authored-by: Yasmim Nagat <117310290+yasnagat@users.noreply.github.com> Co-authored-by: Otávio Stasiak <91474186+OtavioStasiak@users.noreply.github.com> Co-authored-by: OtavioStasiak <OtavioStasiak@users.noreply.github.com> Co-authored-by: Yash Rajpal <58601732+yash-rajpal@users.noreply.github.com>
Proposed changes
Replace the JavaScript lint and format toolchain with the Rust-based oxc tools.
.eslintrc.jsto.oxlintrc.json, with the import, react, jest and typescript plugins.eslint-plugin-react-nativestill runs, loaded throughjsPlugins..prettierrc.jsto.oxfmtrc.json, keeping the same options: tabs, single quotes, 130 char width, no trailing commas, arrow parens avoid, bracket same line.pnpm prettier-lintbecomespnpm format-lint(=oxfmt && pnpm lint).prettier.ymlandeslint.yml. Renaming them would break the required status checks.oxlint --fix -A react/exhaustive-deps.--fixalso rewrites warnings, and an exhaustive-deps rewrite changes behavior, so that rule must never auto-land.Benchmarks
Formatting, same file set, warm run:
--checkOxfmt is about 8x faster. I have not measured ESLint against Oxlint on this repo yet, so this PR makes no speed claim for the lint half.
Issue(s)
https://rocketchat.atlassian.net/browse/NATIVE-1442
How to test or reproduce
pnpm format-lint. It must exit 0. The remaining output is warnings that also existed under ESLint.TZ=UTC pnpm test. All suites must pass.prettier.ymlandeslint.ymlworkflows pass.Note: this branch changes the
@rocket.chat/sdkpatch. Ifpnpm installfails with a patch-package error, deletenode_modules/@rocket.chat/sdkand install again.Screenshots
No visible change.
Types of changes
Checklist
Further comments
Rules and formatting options carry over, so the formatted output and the reported problems stay the same. The change is the tools, not the standard.