chore: Merge develop into feat.voip-lib-new#7129
chore: Merge develop into feat.voip-lib-new#7129diegolmello merged 64 commits intofeat.voip-lib-newfrom
Conversation
* fix: formatting base64 images wrong * chore: add base64 avatar storybook case * chore: improve unit tests of getAvatarUrl * chore: format code and fix lint issues [skip ci] * fix: unit test * cleanup --------- Co-authored-by: OtavioStasiak <OtavioStasiak@users.noreply.github.com>
* fix: hide elements instead of conditional render * chore: update snapshot test * fix: remove useMemo * chore: add case on storybook * fix: snapshot test * chore: format code and fix lint issues [skip ci] --------- Co-authored-by: OtavioStasiak <OtavioStasiak@users.noreply.github.com>
* fix: collapsible attachment with text duplicating the content * fix: ktex breaking the app * fix: snapshot test * chore: format code and fix lint issues [skip ci] * cleanup * cleanup * cleanup * chore: format code and fix lint issues [skip ci] --------- Co-authored-by: OtavioStasiak <OtavioStasiak@users.noreply.github.com> Co-authored-by: Rohit Bansal <40559587+Rohit3523@users.noreply.github.com>
* fix: collapsible attachment with text duplicating the content * fix: nested attachment does not render * chore: storybook nested reply * fix: update snapshot test * chore: format code and fix lint issues [skip ci] * code improvements * fix: forward message between channels not rendering image * update snapshot test * fix: collapsible attachment with text duplicating the content * fix: snapshot test --------- Co-authored-by: OtavioStasiak <OtavioStasiak@users.noreply.github.com>
* chore: type of getAvatarSuggestion * chore: add getAvatarSuggestion endpoint and backward compatibility * chore: format code and fix lint issues [skip ci] --------- Co-authored-by: OtavioStasiak <OtavioStasiak@users.noreply.github.com>
* fix: collapsible attachment with text duplicating the content * chore: format code and fix lint issues [skip ci] * fix: unit test * code improvements * chore: format code and fix lint issues * fix: collapsible attachment with text duplicating the content * fix: snapshot test * chore: format code and fix lint issues * fix: forwarding a message twice does not render the attachment (#6960) * fix: collapsible attachment with text duplicating the content * fix: nested attachment does not render * chore: storybook nested reply * fix: update snapshot test * chore: format code and fix lint issues [skip ci] * code improvements * fix: forward message between channels not rendering image * update snapshot test * fix: collapsible attachment with text duplicating the content * fix: snapshot test --------- Co-authored-by: OtavioStasiak <OtavioStasiak@users.noreply.github.com> * fix: remove getAvatarSuggestion deprecated method (#6948) * chore: type of getAvatarSuggestion * chore: add getAvatarSuggestion endpoint and backward compatibility * chore: format code and fix lint issues [skip ci] --------- Co-authored-by: OtavioStasiak <OtavioStasiak@users.noreply.github.com> * fix: snapshot test * fix: snapshot test --------- Co-authored-by: OtavioStasiak <OtavioStasiak@users.noreply.github.com>
Co-authored-by: Otávio Stasiak <91474186+OtavioStasiak@users.noreply.github.com>
# Conflicts: # CLAUDE.md # android/app/build.gradle # android/app/src/main/java/chat/rocket/reactnative/MainApplication.kt # app/containers/Header/components/HeaderButton/__snapshots__/HeaderButtons.test.tsx.snap # app/containers/UIKit/__snapshots__/UiKitMessage.test.tsx.snap # app/sagas/login.js # app/views/DiscussionsView/__snapshots__/Item.test.tsx.snap # app/views/RoomView/LoadMore/__snapshots__/LoadMore.test.tsx.snap # app/views/ThreadMessagesView/__snapshots__/Item.test.tsx.snap # ios/Podfile.lock # ios/RocketChatRN.xcodeproj/project.pbxproj # package.json # yarn.lock
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent 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)
🧰 Additional context used🧠 Learnings (3)📓 Common learnings📚 Learning: 2026-02-05T13:55:06.688ZApplied to files:
📚 Learning: 2026-03-31T11:59:31.061ZApplied to files:
🔇 Additional comments (4)
WalkthroughAdded Storybook stories and snapshot tests for NotifierComponent; updated the iOS Xcode project (CocoaPods) project.pbxproj with regenerated Pods defaults, new framework references, and updated build phase entries/UUIDs. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~40 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
app/containers/InAppNotification/NotifierComponent.stories.tsx (1)
42-44: Consider adding Storybook metadata for better organization.While the current default export is valid, adding CSF3 metadata would improve the Storybook experience.
📚 Suggested enhancement with additional metadata
export default { - title: 'InAppNotification' + title: 'InAppNotification', + component: NotifierComponent, + tags: ['autodocs'] };This would enable automatic documentation generation and better component discovery in Storybook.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@app/containers/InAppNotification/NotifierComponent.stories.tsx` around lines 42 - 44, Update the default Storybook export to CSF3 metadata: replace the simple export default { title: 'InAppNotification' } with a metadata object that includes the actual component (NotifierComponent), useful parameters (e.g., layout or docs), and tags like "autodocs" to enable automatic docs generation and better discovery; ensure the exported name still defaults to the story meta so Storybook picks up the component metadata and docs.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@app/containers/InAppNotification/NotifierComponent.stories.tsx`:
- Around line 42-44: Update the default Storybook export to CSF3 metadata:
replace the simple export default { title: 'InAppNotification' } with a metadata
object that includes the actual component (NotifierComponent), useful parameters
(e.g., layout or docs), and tags like "autodocs" to enable automatic docs
generation and better discovery; ensure the exported name still defaults to the
story meta so Storybook picks up the component metadata and docs.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c6743554-e6de-4b53-96c3-95598fc34ae9
⛔ Files ignored due to path filters (4)
app/containers/Header/components/HeaderButton/__snapshots__/HeaderButtons.test.tsx.snapis excluded by!**/*.snapapp/containers/InAppNotification/__snapshots__/NotifierComponent.test.tsx.snapis excluded by!**/*.snapios/Podfile.lockis excluded by!**/*.lockyarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (3)
app/containers/InAppNotification/NotifierComponent.stories.tsxapp/containers/InAppNotification/NotifierComponent.test.tsxios/RocketChatRN.xcodeproj/project.pbxproj
📜 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). (2)
- GitHub Check: ESLint and Test / run-eslint-and-test
- GitHub Check: format
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{js,jsx,ts,tsx,json}
📄 CodeRabbit inference engine (CLAUDE.md)
Configure Prettier with tabs, single quotes, 130 character width, no trailing commas, arrow parens avoid, and bracket same line
Files:
app/containers/InAppNotification/NotifierComponent.test.tsxapp/containers/InAppNotification/NotifierComponent.stories.tsx
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Use ESLint with
@rocket.chat/eslint-configbase configuration including React, React Native, TypeScript, and Jest plugins
Files:
app/containers/InAppNotification/NotifierComponent.test.tsxapp/containers/InAppNotification/NotifierComponent.stories.tsx
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Use TypeScript with strict mode enabled and configure baseUrl to app/ for import resolution
**/*.{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/containers/InAppNotification/NotifierComponent.test.tsxapp/containers/InAppNotification/NotifierComponent.stories.tsx
app/containers/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Place reusable UI components in app/containers/ directory
Files:
app/containers/InAppNotification/NotifierComponent.test.tsxapp/containers/InAppNotification/NotifierComponent.stories.tsx
**/*.{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/InAppNotification/NotifierComponent.test.tsxapp/containers/InAppNotification/NotifierComponent.stories.tsx
🧠 Learnings (9)
📓 Common learnings
Learnt from: Rohit3523
Repo: RocketChat/Rocket.Chat.ReactNative PR: 7046
File: app/containers/InAppNotification/NotifierComponent.stories.tsx:46-75
Timestamp: 2026-03-10T15:21:45.098Z
Learning: In `app/containers/InAppNotification/NotifierComponent.tsx` (React Native, Rocket.Chat), `NotifierComponent` is exported as a Redux-connected component via `connect(mapStateToProps)`. The `isMasterDetail` prop is automatically injected from `state.app.isMasterDetail` and does not need to be passed explicitly at call sites or in Storybook stories that use the default (connected) export.
📚 Learning: 2026-03-10T15:21:45.098Z
Learnt from: Rohit3523
Repo: RocketChat/Rocket.Chat.ReactNative PR: 7046
File: app/containers/InAppNotification/NotifierComponent.stories.tsx:46-75
Timestamp: 2026-03-10T15:21:45.098Z
Learning: In `app/containers/InAppNotification/NotifierComponent.tsx` (React Native, Rocket.Chat), `NotifierComponent` is exported as a Redux-connected component via `connect(mapStateToProps)`. The `isMasterDetail` prop is automatically injected from `state.app.isMasterDetail` and does not need to be passed explicitly at call sites or in Storybook stories that use the default (connected) export.
Applied to files:
app/containers/InAppNotification/NotifierComponent.test.tsxapp/containers/InAppNotification/NotifierComponent.stories.tsx
📚 Learning: 2026-04-07T17:49:17.538Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.ReactNative PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-07T17:49:17.538Z
Learning: Applies to index.js : Register app entry point in index.js with conditional Storybook loading
Applied to files:
app/containers/InAppNotification/NotifierComponent.test.tsx
📚 Learning: 2026-04-07T17:49:17.538Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.ReactNative PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-07T17:49:17.538Z
Learning: Applies to app/index.tsx : Configure Redux provider, theme, navigation, and notifications in app/index.tsx
Applied to files:
app/containers/InAppNotification/NotifierComponent.stories.tsx
📚 Learning: 2026-04-07T17:49:17.538Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.ReactNative PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-07T17:49:17.538Z
Learning: Applies to app/lib/hooks/useResponsiveLayout/**/*.{ts,tsx} : Use responsive layout with master-detail on tablets and single stack on phones via useResponsiveLayout hook
Applied to files:
app/containers/InAppNotification/NotifierComponent.stories.tsx
📚 Learning: 2026-04-07T17:49:17.538Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.ReactNative PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-07T17:49:17.538Z
Learning: Applies to app/theme.tsx : Configure theming context in app/theme.tsx
Applied to files:
app/containers/InAppNotification/NotifierComponent.stories.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/containers/InAppNotification/NotifierComponent.stories.tsx
📚 Learning: 2026-03-05T06:06:19.755Z
Learnt from: divyanshu-patil
Repo: RocketChat/Rocket.Chat.ReactNative PR: 6957
File: ios/RCTWatchModule.mm:19-24
Timestamp: 2026-03-05T06:06:19.755Z
Learning: In the Rocket.Chat React Native iOS app, `WCSession` (WatchConnectivity) is activated with its delegate in `ios/RocketChat Watch App/Loaders/WatchSession.swift`, not in `RCTWatchModule.mm`. Since `WCSession.defaultSession` is a singleton, activating it once in `WatchSession.swift` is sufficient; `RCTWatchModule.mm` does not need to re-activate or re-set the delegate.
Applied to files:
ios/RocketChatRN.xcodeproj/project.pbxproj
📚 Learning: 2026-02-05T13:55:06.688Z
Learnt from: Rohit3523
Repo: RocketChat/Rocket.Chat.ReactNative PR: 6930
File: package.json:101-101
Timestamp: 2026-02-05T13:55:06.688Z
Learning: The RocketChat/Rocket.Chat.ReactNative repository uses a fork of react-native-image-crop-picker (RocketChat/react-native-image-crop-picker) with custom Android edge-to-edge fixes, not the upstream ivpusic/react-native-image-crop-picker package. Dependencies should reference commit pins from the RocketChat fork.
Applied to files:
ios/RocketChatRN.xcodeproj/project.pbxproj
🔇 Additional comments (7)
ios/RocketChatRN.xcodeproj/project.pbxproj (1)
1-3425: CocoaPods project configuration regenerated correctly.The changes to this Xcode project file are auto-generated by CocoaPods and align with the
abstract_target 'defaults'structure defined inios/Podfile. The naming patternPods-defaults-{target}for xcconfig files, framework references, and shell script phases is the expected output when CocoaPods processes an abstract target containing concrete targets (RocketChatRN, Rocket.Chat, NotificationService).All references are internally consistent:
- Framework
fileRefIDs match theirPBXFileReferencedeclarations- Shell scripts point to correct
Pods-defaults-*paths- Build configurations reference matching
.xcconfigfiles for Debug/ReleaseNo issues detected.
app/containers/InAppNotification/NotifierComponent.stories.tsx (5)
1-11: LGTM! Clean imports and proper dependencies.The imports are well-organized and include all necessary dependencies for the stories: theme context, responsive layout context, the component under test, and required types.
13-21: LGTM! Appropriate test fixture for responsive layout context.The
responsiveLayoutProviderValueprovides sensible fixed values for testing, including the required row heights from the responsive layout constants.
23-34: LGTM! Well-structured notification fixture.The
baseNotificationobject properly matches the expected notification prop structure defined inINotifierComponentinterface, including all required fields (text, payload with sender/type/message metadata, title, and avatar).
36-40: LGTM! Proper context provision for isolated story rendering.The
Wrappercomponent correctly provides bothThemeContextandResponsiveLayoutContextto ensure the stories render with all necessary dependencies. The use ofTSupportedThemestype ensures theme safety.
46-76: LGTM! Comprehensive story coverage.The four stories provide excellent coverage:
DirectMessageandChannelMessagetest different subscription typesWithDarkThemeandWithBlackThemeverify theme supportThe notification prop structure is correctly populated for each scenario. Per retrieved learnings, the
isMasterDetailprop is automatically injected by the Redux-connected component and does not need to be passed explicitly in these stories.app/containers/InAppNotification/NotifierComponent.test.tsx (1)
1-4: LGTM! Standard snapshot test pattern.This follows the established pattern for generating snapshot tests from Storybook stories using the project's
generateSnapshotsutility. The test will automatically create snapshots for all four stories (DirectMessage,ChannelMessage,WithDarkTheme,WithBlackTheme) defined in the stories file.
|
Android Build Available Rocket.Chat Experimental 4.72.0.108525 Internal App Sharing: https://play.google.com/apps/test/RQVpXLytHNc/ahAO29uNSLwBbJRuxmE7jTPvQG_2LP66l8-7AKCDYnJ-UHcpLFMpcQP8XEPMF4pxmkih6Gy_3UcqldFnK3cuyBYtXO |
|
iOS Build Available Rocket.Chat Experimental 4.72.0.108526 |
Proposed changes
Issue(s)
How to test or reproduce
Screenshots
Types of changes
Checklist
Further comments
Summary by CodeRabbit
Documentation
Tests
Chores