Rename channel screen components to use Channel naming#6325
Rename channel screen components to use Channel naming#6325
Conversation
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
SDK Size Comparison 📏
|
WalkthroughRenames and retypes message-centric compose APIs to channel-centric variants: Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
stream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/messages/ChannelScreen.kt (1)
111-140:⚠️ Potential issue | 🟡 MinorUse the default
messagingtype in this docs snippet.Line 140 still uses
message:123, while the rest of this file usesmessaging:123. Copy-pasting this block against the default setup will target a different channel type.Suggested fix
- private const val channelId: String = "message:123" + private const val channelId: String = "messaging:123"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@stream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/messages/ChannelScreen.kt` around lines 111 - 140, The channelId constant is using the wrong channel type; update the private const val channelId from "message:123" to "messaging:123" so it matches the rest of the file and the default setup; ensure any references to channelId (e.g., ChannelViewModelFactory instantiation via factory and the ChannelScreen call that receives viewModelFactory = factory) will therefore target the correct "messaging:123" channel.stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/ChannelScreen.kt (1)
106-137:⚠️ Potential issue | 🟡 MinorRefresh the
ChannelScreenKDoc after the rename.The exported API now uses
Channelterminology, but the doc block still describes a Messages screen/list. That stale wording will surface in generated SDK docs right next to the renamed symbol.As per coding guidelines, "Document public APIs with KDoc, including thread expectations and state notes".
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/ChannelScreen.kt` around lines 106 - 137, Update the stale KDoc for the public composable ChannelScreen to reflect the new Channel-focused API (rename occurrences of "Messages screen/list" to "Channel screen" and adjust description to mention Channel/active channel requirement), ensure parameter docs reference ChannelViewModelFactory and channel-related behavior (thread expectations, state notes like selected/active Channel), and remove any leftover references to "Messages" UI; keep the same tags for params such as showHeader, reactionSorting, onBackPressed, skipPushNotification, and include a brief note about threading/state expectations for this public API.
🧹 Nitpick comments (3)
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/messages/ChannelViewModelFactory.kt (1)
51-53: KDoc references outdated "Messages Screen" terminology.The class KDoc still mentions "Messages Screen" at line 52, but the composable has been renamed to
ChannelScreen. Consider updating to "Channel Screen" for consistency with the PR's naming changes.📝 Suggested KDoc update
/** - * Holds all the dependencies needed to build the ViewModels for the Messages Screen. + * Holds all the dependencies needed to build the ViewModels for the Channel Screen. * Currently, builds the [MessageComposerViewModel], [MessageListViewModel] and [AttachmentsPickerViewModel].🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/messages/ChannelViewModelFactory.kt` around lines 51 - 53, Update the class KDoc for ChannelViewModelFactory to replace the outdated "Messages Screen" wording with "Channel Screen" for consistency; edit the comment block that currently reads "Holds all the dependencies needed to build the ViewModels for the Messages Screen." to instead mention "Channel Screen" and keep the existing references to MessageComposerViewModel, MessageListViewModel and AttachmentsPickerViewModel unchanged.stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactoryParams.kt (1)
360-423: Please document the old→new symbol map for these renamed header params.These public type renames are source-breaking for
ChatComponentFactorycustomizations. A short migration note coveringMessageListHeader*Params -> ChannelHeader*Paramswill make the v7 upgrade much easier for downstream implementers.Based on learnings: In GetStream/stream-chat-android, PRs against major version branches (e.g., v7) are allowed to introduce breaking public API changes. In these branches, adding deprecated delegating overloads for source compatibility isn’t required; instead, maintainers prefer documenting migration paths (e.g., MIGRATION_TO_V7.md/CHANGELOG) covering function signature changes and renamed/removed composables.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactoryParams.kt` around lines 360 - 423, Add a short migration note that lists the renamed public types so downstream users can map old symbols to new ones: document that MessageListHeaderParams → ChannelHeaderParams, MessageListHeaderLeadingContentParams → ChannelHeaderLeadingContentParams, MessageListHeaderCenterContentParams → ChannelHeaderCenterContentParams, and MessageListHeaderTrailingContentParams → ChannelHeaderTrailingContentParams; place this mapping in the project’s upgrade/MIGRATION notes and reference it from the CHANGELOG so implementers customizing ChatComponentFactory can find the old→new symbol map easily.stream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/cookbook/CookbookMainActivity.kt (1)
82-82: Rename the cookbook route literal for consistency.
CustomChannelHeaderis the sample-facing name now, but this route still exposesmessage_header/{cid}. Keeping the old term here makes the cookbook source harder to follow after the rename.✏️ Suggested change
- CustomChannelHeader("message_header/{cid}"), + CustomChannelHeader("channel_header/{cid}"),🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@stream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/cookbook/CookbookMainActivity.kt` at line 82, The route literal for the CustomChannelHeader sample is still "message_header/{cid}" which is inconsistent with the sample-facing name; update the route string to match CustomChannelHeader (for example "custom_channel_header/{cid}") wherever it's declared or referenced so the route name aligns with the CustomChannelHeader symbol.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.kt`:
- Around line 137-139: There are duplicate imports for
DefaultChannelHeaderLeadingContent and DefaultMessageContent causing ambiguity;
update the imports to use aliases (e.g., import
...DefaultChannelHeaderLeadingContent as DefaultChannelHeaderLeadingContentV2
and import ...DefaultMessageContent as DefaultMessageContentV2) and then update
every call site in ChatComponentFactory that references
DefaultChannelHeaderLeadingContent and DefaultMessageContent to use the new
aliased names (ensure both usages—where DefaultChannelHeaderLeadingContent and
DefaultMessageContent are passed/instantiated—are replaced consistently).
---
Outside diff comments:
In
`@stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/ChannelScreen.kt`:
- Around line 106-137: Update the stale KDoc for the public composable
ChannelScreen to reflect the new Channel-focused API (rename occurrences of
"Messages screen/list" to "Channel screen" and adjust description to mention
Channel/active channel requirement), ensure parameter docs reference
ChannelViewModelFactory and channel-related behavior (thread expectations, state
notes like selected/active Channel), and remove any leftover references to
"Messages" UI; keep the same tags for params such as showHeader,
reactionSorting, onBackPressed, skipPushNotification, and include a brief note
about threading/state expectations for this public API.
In
`@stream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/messages/ChannelScreen.kt`:
- Around line 111-140: The channelId constant is using the wrong channel type;
update the private const val channelId from "message:123" to "messaging:123" so
it matches the rest of the file and the default setup; ensure any references to
channelId (e.g., ChannelViewModelFactory instantiation via factory and the
ChannelScreen call that receives viewModelFactory = factory) will therefore
target the correct "messaging:123" channel.
---
Nitpick comments:
In
`@stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactoryParams.kt`:
- Around line 360-423: Add a short migration note that lists the renamed public
types so downstream users can map old symbols to new ones: document that
MessageListHeaderParams → ChannelHeaderParams,
MessageListHeaderLeadingContentParams → ChannelHeaderLeadingContentParams,
MessageListHeaderCenterContentParams → ChannelHeaderCenterContentParams, and
MessageListHeaderTrailingContentParams → ChannelHeaderTrailingContentParams;
place this mapping in the project’s upgrade/MIGRATION notes and reference it
from the CHANGELOG so implementers customizing ChatComponentFactory can find the
old→new symbol map easily.
In
`@stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/messages/ChannelViewModelFactory.kt`:
- Around line 51-53: Update the class KDoc for ChannelViewModelFactory to
replace the outdated "Messages Screen" wording with "Channel Screen" for
consistency; edit the comment block that currently reads "Holds all the
dependencies needed to build the ViewModels for the Messages Screen." to instead
mention "Channel Screen" and keep the existing references to
MessageComposerViewModel, MessageListViewModel and AttachmentsPickerViewModel
unchanged.
In
`@stream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/cookbook/CookbookMainActivity.kt`:
- Line 82: The route literal for the CustomChannelHeader sample is still
"message_header/{cid}" which is inconsistent with the sample-facing name; update
the route string to match CustomChannelHeader (for example
"custom_channel_header/{cid}") wherever it's declared or referenced so the route
name aligns with the CustomChannelHeader symbol.
🪄 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: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 97a166cf-17af-4803-9323-38f995023130
⛔ Files ignored due to path filters (3)
stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.messages_ChannelHeaderTest_connected_state.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.messages_ChannelHeaderTest_offline_state.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.messages_ChannelHeaderTest_thread_mode.pngis excluded by!**/*.png
📒 Files selected for processing (46)
stream-chat-android-benchmark/src/main/kotlin/io/getstream/chat/android/benchmark/scenario/MessageActions.ktstream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/feature/channel/add/AddChannelScreen.ktstream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/feature/channel/draft/DraftChannelScreen.ktstream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/feature/channel/list/ChannelsActivity.ktstream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/MessagesActivity.ktstream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/chats/ChatsActivity.ktstream-chat-android-compose/api/stream-chat-android-compose.apistream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channels/ChannelsScreen.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channels/list/ChannelList.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/chats/ChatsScreen.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/ChannelScreen.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/attachments/AttachmentPickerMenu.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/header/ChannelHeader.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactoryParams.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/channels/ChannelListViewModelFactory.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/messages/ChannelViewModelFactory.ktstream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/messages/ChannelHeaderTest.ktstream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/messages/ChannelScreenTest.ktstream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/viewmodel/channels/ChannelListViewModelFactoryTest.ktstream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/viewmodel/messages/ChannelViewModelFactoryTest.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/ComponentArchitecture.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/Overview.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/channels/ChannelItem.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/channels/ChannelList.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/channels/ChannelsScreen.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/channels/SelectedChannelMenu.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/general/ChatTheme.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/guides/AddingCustomAttachments.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/guides/CustomizingImageAndVideoPreviews.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/guides/ProvidingCustomReactions.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/messages/AttachmentsPicker.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/messages/ChannelHeader.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/messages/ChannelScreen.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/messages/MessageComposer.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/messages/MessageList.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/messages/ReactionsPicker.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/messages/SelectedMessageMenu.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/messages/SelectedReactionsMenu.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/cookbook/CookbookMainActivity.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/cookbook/ui/CustomChannelHeader.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/cookbook/ui/CustomComposerAndAttachmentsPicker.ktstream-chat-android-ui-guides/src/main/java/io/getstream/chat/android/guides/catalog/compose/customattachments/MessagesActivity.ktstream-chat-android-ui-guides/src/main/java/io/getstream/chat/android/guides/catalog/compose/customizingimageandvideoattachments/MessagesActivity.ktstream-chat-android-ui-guides/src/main/java/io/getstream/chat/android/guides/catalog/compose/customreactions/MessagesActivity.ktstream-chat-android-ui-uitests/src/main/java/io/getstream/chat/android/uitests/app/compose/ComposeMessagesActivity.kt
...oid-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.kt
Show resolved
Hide resolved
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
VelikovPetar
left a comment
There was a problem hiding this comment.
Nice one!
Just to double check, we keep the XML naming the same right?
Yeah, I left it as is. Do you think we should change it? Maybe it's still better to align? |
62e531c to
72bfca4
Compare
I would say if they are now misaligned with both the Compose SDK, and the UIKit SDK - it would be good to rename them. In the end, it would be easier even for us to navigate the project if we have consistent naming |
Free up the ChannelViewModelFactory name for the messages screen factory by renaming the channel list factory to ChannelListViewModelFactory.
Also renames related type aliases: - MessagesViewModelFactoryProvider → ChannelViewModelFactoryProvider - DefaultMessagesViewModelFactoryProvider → DefaultChannelViewModelFactoryProvider
Renames the composable function, file, test, private helpers (ChannelScreenContentBox, ChannelScreenMenus, ChannelScreenReactionsPicker), test tag (Stream_ChannelScreen), and all references in docs/samples/guides.
Renames the composable function, file, internal helpers (DefaultChannelHeaderLeadingContent, etc.), ChatComponentFactory methods, param classes (ChannelHeaderParams, etc.), and all references in docs/samples/guides. Only the Compose SDK is affected; the XML UI Components SDK (MessageListHeaderView, MessageListHeaderViewModel) is untouched.
72bfca4 to
ca347bb
Compare
Ok! I applied the renaming for ui-components in ca347bb. It ended up being more changes than expected, mostly due to all the references in resources. Let me know if that's fine or if you think it's too many breaking changes. |
331e908 to
70a421c
Compare
|
Ugh I didn't realise that resources would be affected as well. But IMO, this is good change and we should do it. As long as we explain the changes in the migration guide, I think we will be good. And as I mentioned, we already had discrepancies between the XML and Compose namings, I think that unifying them is the right thing to do! (additionally, there aren't too many breaking changes in the XML SDK, so even with these ones, a migration should be rather simple) |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.kt (1)
629-637:⚠️ Potential issue | 🟠 MajorDon’t drop
typingUsersfrom the default header delegate.
ChannelHeaderCenterContentParamscarriestypingUsers, but the default delegate ignores it here. That makes the defaultChannelHeaderrender the normal member-status subtitle even when users are actively typing, so the “User Typing” state never appears.🛠️ Proposed fix
public fun RowScope.ChannelHeaderCenterContent(params: ChannelHeaderCenterContentParams) { DefaultChannelHeaderCenterContent( modifier = params.modifier, channel = params.channel, currentUser = params.currentUser, connectionState = params.connectionState, + typingUsers = params.typingUsers, messageMode = params.messageMode, onHeaderTitleClick = params.onClick, ) }// In DefaultChannelHeaderCenterContent(...): // - add a `typingUsers: List<User>` parameter // - prefer a typing subtitle when `typingUsers.isNotEmpty()` // - fall back to `channel.getMembersStatusText(...)` otherwise🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.kt` around lines 629 - 637, The default header delegate is ignoring ChannelHeaderCenterContentParams.typingUsers, so DefaultChannelHeaderCenterContent should accept a typingUsers: List<User> parameter and use it to choose the subtitle: when typingUsers.isNotEmpty() show the typing users subtitle (prefer the typing state) and otherwise fall back to channel.getMembersStatusText(...); update the call site in ChannelHeaderCenterContent to pass params.typingUsers into DefaultChannelHeaderCenterContent and ensure any downstream logic in DefaultChannelHeaderCenterContent uses typingUsers instead of always computing the member status text.
🧹 Nitpick comments (1)
stream-chat-android-compose/api/stream-chat-android-compose.api (1)
6620-6628: Please ensure release migration docs include explicit old→new symbol mapping.This API snapshot confirms breaking renames in both channel-list and channel-content factories; documenting exact replacements in migration docs/changelog will reduce upgrade friction.
Based on learnings: in v7, breaking API changes are acceptable, but migration paths should be documented in
MIGRATION_TO_V7.md/CHANGELOG.Also applies to: 6709-6716
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@stream-chat-android-compose/api/stream-chat-android-compose.api` around lines 6620 - 6628, The release docs are missing explicit old→new symbol mappings for renamed factories (e.g., ChannelListViewModelFactory and related channel-content factory symbols shown in the API snapshot); update MIGRATION_TO_V7.md and CHANGELOG to include a clear table/list mapping each old fully-qualified symbol name to its new fully-qualified symbol (include constructors and create methods such as ChannelListViewModelFactory.<init> overloads and create(Class)/create(Class,CreationExtras) signatures) and add a short example snippet for how to replace usages in client code so consumers can perform a mechanical find-and-replace during migration.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/ChannelScreen.kt`:
- Around line 136-137: Update the public KDoc for the ChannelScreen function
(and any mentions of ChannelViewModelFactory in its header) to replace
references to "Messages screen/messages list" with "ChannelScreen" and describe
thread expectations and state behavior as per guidelines; explicitly document
that ChannelScreen is a composable public API, indicate which coroutine/thread
context (main/UI) it should be called on, and note any state hoisting or
lifecycle considerations (e.g., that it reads/consumes ViewModel state and
should not be recreated frequently).
---
Outside diff comments:
In
`@stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.kt`:
- Around line 629-637: The default header delegate is ignoring
ChannelHeaderCenterContentParams.typingUsers, so
DefaultChannelHeaderCenterContent should accept a typingUsers: List<User>
parameter and use it to choose the subtitle: when typingUsers.isNotEmpty() show
the typing users subtitle (prefer the typing state) and otherwise fall back to
channel.getMembersStatusText(...); update the call site in
ChannelHeaderCenterContent to pass params.typingUsers into
DefaultChannelHeaderCenterContent and ensure any downstream logic in
DefaultChannelHeaderCenterContent uses typingUsers instead of always computing
the member status text.
---
Nitpick comments:
In `@stream-chat-android-compose/api/stream-chat-android-compose.api`:
- Around line 6620-6628: The release docs are missing explicit old→new symbol
mappings for renamed factories (e.g., ChannelListViewModelFactory and related
channel-content factory symbols shown in the API snapshot); update
MIGRATION_TO_V7.md and CHANGELOG to include a clear table/list mapping each old
fully-qualified symbol name to its new fully-qualified symbol (include
constructors and create methods such as ChannelListViewModelFactory.<init>
overloads and create(Class)/create(Class,CreationExtras) signatures) and add a
short example snippet for how to replace usages in client code so consumers can
perform a mechanical find-and-replace during migration.
🪄 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: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 0a708a5b-08dd-4427-80d5-7ed303e5d022
📒 Files selected for processing (21)
stream-chat-android-benchmark/src/main/kotlin/io/getstream/chat/android/benchmark/scenario/MessageActions.ktstream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/feature/channel/add/AddChannelScreen.ktstream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/feature/channel/draft/DraftChannelScreen.ktstream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/feature/channel/list/ChannelsActivity.ktstream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/MessagesActivity.ktstream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/chats/ChatsActivity.ktstream-chat-android-compose/api/stream-chat-android-compose.apistream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channels/ChannelsScreen.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channels/header/ChannelListHeader.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channels/list/ChannelList.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/chats/ChatsScreen.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/MessageContent.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/ChannelScreen.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/attachments/AttachmentPickerMenu.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/header/ChannelHeader.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactoryParams.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/channels/ChannelListViewModelFactory.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/messages/ChannelViewModelFactory.ktstream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/messages/ChannelHeaderTest.ktstream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/messages/ChannelScreenTest.kt
✅ Files skipped from review due to trivial changes (4)
- stream-chat-android-benchmark/src/main/kotlin/io/getstream/chat/android/benchmark/scenario/MessageActions.kt
- stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/attachments/AttachmentPickerMenu.kt
- stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/messages/ChannelViewModelFactory.kt
- stream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/MessagesActivity.kt
🚧 Files skipped from review as they are similar to previous changes (10)
- stream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/feature/channel/list/ChannelsActivity.kt
- stream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/messages/ChannelScreenTest.kt
- stream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/feature/channel/add/AddChannelScreen.kt
- stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/channels/ChannelListViewModelFactory.kt
- stream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/messages/ChannelHeaderTest.kt
- stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channels/header/ChannelListHeader.kt
- stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channels/ChannelsScreen.kt
- stream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/chats/ChatsActivity.kt
- stream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/feature/channel/draft/DraftChannelScreen.kt
- stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactoryParams.kt
| public fun ChannelScreen( | ||
| viewModelFactory: ChannelViewModelFactory, |
There was a problem hiding this comment.
Finish the public KDoc rename.
The surrounding KDoc still calls this the “Messages screen/messages list”, so IDE docs stay out of sync with the new ChannelScreen API. As per coding guidelines, "Document public APIs with KDoc, including thread expectations and state notes".
🧰 Tools
🪛 GitHub Check: SonarCloud Code Analysis
[failure] 136-136: Refactor this method to reduce its Cognitive Complexity from 23 to the 15 allowed.
[warning] 136-136: This function has 17 parameters, which is greater than the 7 authorized.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/ChannelScreen.kt`
around lines 136 - 137, Update the public KDoc for the ChannelScreen function
(and any mentions of ChannelViewModelFactory in its header) to replace
references to "Messages screen/messages list" with "ChannelScreen" and describe
thread expectations and state behavior as per guidelines; explicitly document
that ChannelScreen is a composable public API, indicate which coroutine/thread
context (main/UI) it should be called on, and note any state hoisting or
lifecycle considerations (e.g., that it reads/consumes ViewModel state and
should not be recreated frequently).


Goal
Rename Compose SDK components to use "Channel" naming instead of "Messages" for the screen that displays a channel's content, since it represents the channel -> this follows with what's defined in the alignments doc.
Docs PR: https://github.com/GetStream/docs-content/pull/1140
Implementation
ChannelViewModelFactory(channel list) →ChannelListViewModelFactory— renamed first to free up the nameMessagesViewModelFactory→ChannelViewModelFactoryMessagesScreen→ChannelScreenMessageListHeader→ChannelHeader(including all related classes likeChannelHeaderParams,ChannelHeaderCenterContentParams, etc.)ChatComponentFactorymethods to match the new namesTesting
Verify that the channel screen, header, and channel list all work as before.
Summary by CodeRabbit
Refactor
Documentation
Tests
Chore