build(deps): upgrade some dependencies#6962
Conversation
WalkthroughTightened several callback prop types from Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. 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 |
f36518f to
0883f73
Compare
0883f73 to
5b28778
Compare
9872bcc to
d9829f8
Compare
OtavioStasiak
left a comment
There was a problem hiding this comment.
Tested on android and iOS, working as expected on both platforms.
Also tested and ensured that it works in MasterStackDetail.
d9829f8 to
1890593
Compare
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
app/views/RoomView/index.tsx (1)
578-595:⚠️ Potential issue | 🟡 MinorUnnecessary type widening in
NavigatorScreenParamscast reduces type precision.The
screenparameter is constrained tokeyof ModalStackParamList, but the cast toNavigatorScreenParams<ModalStackParamList & TNavigation>expands the accepted type beyond that constraint. SinceTNavigationincludesPickerViewandAttachmentView(which don't exist inModalStackParamList), the intersection widens the type at the cast site. Using a narrower cast toNavigatorScreenParams<ModalStackParamList>would better match the actual parameter constraints. If the navigation prop's wider type (ChatsStackParamList & TNavigation) requires the intersection, address the mismatch upstream rather than at this call site.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@app/views/RoomView/index.tsx` around lines 578 - 595, The call in goRoomActionsView currently casts params to NavigatorScreenParams<ModalStackParamList & TNavigation>, which unnecessarily widens the allowed screens and loses type precision; change the cast to NavigatorScreenParams<ModalStackParamList> so the screen param stays constrained to keyof ModalStackParamList (and if the navigation prop type requires TNavigation, fix that mismatch at the ChatsStack/parent navigation typing instead of widening here), keeping the same params object and referencing goRoomActionsView, ModalStackParamList, TNavigation, and NavigatorScreenParams to locate the site to update.
🧹 Nitpick comments (1)
app/views/RoomView/index.tsx (1)
10-12: Import path inconsistency: module alias vs. relative paths.
'stacks/stackType'uses a module alias while every other import in this file uses relative paths (e.g.,'../../stacks/MasterDetailStack/types'on Line 78). For consistency—and to avoid potential resolution surprises in environments where the alias is not configured—consider using the relative path here too.♻️ Suggested fix
-import { type TNavigation } from 'stacks/stackType'; +import { type TNavigation } from '../../stacks/stackType';🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@app/views/RoomView/index.tsx` around lines 10 - 12, The import for TNavigation uses the module alias 'stacks/stackType' which is inconsistent with the file's other relative imports; update the import of TNavigation to use the correct relative path that matches the project's folder layout (for example the same base as '../../stacks/MasterDetailStack/types') so that the statement importing TNavigation from 'stacks/stackType' is replaced with the equivalent relative path import; verify the symbol name TNavigation and any related types still resolve after the change.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (7)
app/containers/RoomHeader/RoomHeader.tsxapp/containers/RoomHeader/index.tsxapp/views/ForwardMessageView/index.tsxapp/views/RoomView/LeftButtons.tsxapp/views/RoomView/index.tsxapp/views/TeamChannelsView.tsxpackage.json
🚧 Files skipped from review as they are similar to previous changes (2)
- app/views/RoomView/LeftButtons.tsx
- app/containers/RoomHeader/RoomHeader.tsx
🧰 Additional context used
🧠 Learnings (1)
📚 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
🧬 Code graph analysis (1)
app/views/RoomView/index.tsx (2)
app/stacks/MasterDetailStack/types.ts (1)
ModalStackParamList(30-204)app/stacks/stackType.ts (1)
TNavigation(4-20)
⏰ 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: ESLint and Test / run-eslint-and-test
🔇 Additional comments (4)
app/containers/RoomHeader/index.tsx (1)
17-17: LGTM — correct type tightening fromFunctionto() => void.Both callers (
RoomView.goRoomActionsViewwithscreen?: keyof ModalStackParamListandTeamChannelsView.goRoomActionsViewwithscreen?: string) are assignable to() => void, since their only parameter is optional. This accurately reflects howonPressis invoked (no arguments) and removes the overly permissiveFunctiontype.package.json (2)
202-202: TypeScript upgrade to~5.9.3is well-placed.TypeScript 5.9.3 is the current latest stable version on npm. TypeScript 5.9 was released August 1, 2025, with new features including
import defersupport and improved DOM summaries. TypeScript 5.9 may introduce changes in types and possibly new errors in some codebases due to stricter type variable inference — worth running a full type-check pass to surface any newly exposed errors. The tilde range (~5.9.3) correctly restricts upgrades to patch-level only, avoiding any inadvertent pick-up of TypeScript 6.0's breaking changes.
216-219: Volta block is correct and timely.Node.js 24 officially entered Long-Term Support (LTS) in October 2025, codename "Krypton". Node.js 24.13.1 LTS is the latest supported version as of February 2026. Pinning the dev environment to the Active LTS version is the right call and aligns with the updated
[email protected]inpackageManager. No concerns here.app/views/TeamChannelsView.tsx (1)
309-334: TeamChannelsView uses inconsistent master-detail navigation compared to RoomView.The
goRoomActionsViewlogic gates theModalStackNavigatorpath withisMasterDetail && screen(line 316), which prevents master-detail modal navigation when called from the header (wherescreenis alwaysundefined). This is a pre-existing pattern, not introduced by makingscreenoptional.However, this behavior is inconsistent with
RoomView.goRoomActionsView(line 580-607), which always usesModalStackNavigatorin master-detail mode and defaults withscreen ?? 'RoomActionsView'whenscreenis undefined. In master-detail layout, TeamChannelsView will use non-modal navigation from the header, which likely breaks consistency.Consider aligning with the RoomView pattern: remove the
&& screengate and default the screen parameter when undefined.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@app/views/RoomView/index.tsx`:
- Around line 578-595: The call in goRoomActionsView currently casts params to
NavigatorScreenParams<ModalStackParamList & TNavigation>, which unnecessarily
widens the allowed screens and loses type precision; change the cast to
NavigatorScreenParams<ModalStackParamList> so the screen param stays constrained
to keyof ModalStackParamList (and if the navigation prop type requires
TNavigation, fix that mismatch at the ChatsStack/parent navigation typing
instead of widening here), keeping the same params object and referencing
goRoomActionsView, ModalStackParamList, TNavigation, and NavigatorScreenParams
to locate the site to update.
---
Duplicate comments:
In `@app/views/ForwardMessageView/index.tsx`:
- Line 35: The expression assigning blockUnauthenticatedAccess should drop the
redundant nullish fallback; replace any occurrence of
"state.settings.Accounts_AvatarBlockUnauthenticatedAccess ?? true" with a
boolean coercion "!!state.settings.Accounts_AvatarBlockUnauthenticatedAccess"
(or keep the existing !! form) so the code uses the definitive boolean value
from state.settings.Accounts_AvatarBlockUnauthenticatedAccess and removes the
unreachable "?? true" fallback.
In `@package.json`:
- Line 54: Update the pinned axios dependency in package.json from the
unmaintained "~0.28.1" to a maintained 1.x line (e.g. "^1.4.0" or the latest
1.x) to remove known vulnerabilities; after updating package.json, run your
package manager to refresh the lockfile (npm/yarn install) and run tests; verify
the single usage axios.head(...) in Urls.tsx still behaves correctly and adjust
call signatures if any minor 1.x changes affect it.
- Line 183: The dependency "babel-plugin-react-compiler" is pinned to an RC
without a tilde; update package.json to either use a stable release (replace
"19.1.0-rc.3" with a non-RC stable version) or at minimum allow patch updates by
prefixing with a tilde (e.g., "~19.1.0-rc.3") so it matches the other Babel
packages' version style; modify the "babel-plugin-react-compiler" entry
accordingly and run your lockfile update (npm/yarn) to persist the change.
---
Nitpick comments:
In `@app/views/RoomView/index.tsx`:
- Around line 10-12: The import for TNavigation uses the module alias
'stacks/stackType' which is inconsistent with the file's other relative imports;
update the import of TNavigation to use the correct relative path that matches
the project's folder layout (for example the same base as
'../../stacks/MasterDetailStack/types') so that the statement importing
TNavigation from 'stacks/stackType' is replaced with the equivalent relative
path import; verify the symbol name TNavigation and any related types still
resolve after the change.
Proposed changes
This ensures higher stability in the dependency resolutions, since it will block implicit minor upgrades.
It aligns with other project in the organization and enables more strict type safety.
Babel dependencies usually are released under a single semver, so misalignments at the minor version number are usually a mistake.
Issue(s)
ARCH-1939
How to test or reproduce
Screenshots
Types of changes
Checklist
Further comments
Summary by CodeRabbit
Chores
Other Changes