Skip to content

Commit d461c6b

Browse files
fix(ai): address reviewer feedback from @VelikovPetar
- Fix ChatClientConfig mapping table: correct v6 sources for each param, fix userPresence default (true not false), clarify backgroundSyncEnabled is removed (not mapped to isAutomaticSyncOnReconnectEnabled) - Replace hardcoded version numbers with "check Maven Central" - Add removed lambda parameters for ChannelList, MessageList, ChannelScreen, ChannelListHeader, ChannelHeader (PR #6365) - Document ChatComponentFactory as the replacement for all slot params with link to migration docs - Add cross-reference between §3.4 and §7.2 for changed defaults
1 parent 336d8ae commit d461c6b

1 file changed

Lines changed: 45 additions & 11 deletions

File tree

ai-docs/ai-migration.md

Lines changed: 45 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ Execute sections in order. Each section assumes the previous one is complete.
2828

2929
### Key facts
3030

31-
- v6 latest release: `6.37.1`
32-
- v7 latest release: `7.0.0`
31+
- v6 latest: check Maven Central for the latest `6.x` release
32+
- v7 latest: check Maven Central for the latest `7.x` release
3333
- v6 branch: `v6` (maintenance only)
3434
- v7 branch: `develop` (default branch)
3535
- Module count: v6 had 10 modules, v7 has 6 (4 removed/merged)
@@ -210,15 +210,17 @@ ChatClient.Builder(apiKey, context)
210210

211211
#### ChatClientConfig mapping
212212

213-
| v6 (StatePluginConfig) | v7 (ChatClientConfig) | Default |
213+
| v6 (StatePluginConfig / OfflinePluginFactory) | v7 (ChatClientConfig) | Default |
214214
|---|---|---|
215-
| `userPresence` | `userPresence` | `false` |
216-
| `backgroundSyncEnabled` | `isAutomaticSyncOnReconnectEnabled` | `true` |
217-
| _(OfflineConfig.enabled)_ | `offlineEnabled` | `true` |
215+
| `StatePluginConfig.userPresence` | `userPresence` | `true` |
216+
| `StreamOfflinePluginFactory` present in `withPlugins()` | `offlineEnabled` | `true` |
217+
| `StreamOfflinePluginFactory.ignoredOfflineChannelTypes` | `ignoredOfflineChannelTypes` | `emptySet()` |
218+
| _(none)_ | `isAutomaticSyncOnReconnectEnabled` | `true` |
218219
| _(none)_ | `useLegacyChannelLogic` | `false` |
219-
| _(none)_ | `ignoredOfflineChannelTypes` | `emptySet()` |
220-
| _(none)_ | `syncMaxThreshold` | `TimeDuration.hours(12)` |
221-
| _(none)_ | `messageLimitConfig` | `MessageLimitConfig()` |
220+
| `StatePluginConfig.syncMaxThreshold` | `syncMaxThreshold` | `TimeDuration.hours(12)` |
221+
| `StatePluginConfig.messageLimitConfig` | `messageLimitConfig` | `MessageLimitConfig()` |
222+
223+
> **Note:** v6's `backgroundSyncEnabled` (which triggered `/sync` after push notifications) was deprecated in v6 and **removed in v7**. It does NOT map to `isAutomaticSyncOnReconnectEnabled` — that controls `/sync` + channel re-watch after a WebSocket reconnect, which is a different mechanism.
222224
223225
#### Removed classes
224226

@@ -733,8 +735,38 @@ Both now take `(viewModelFactory, modifier, onNavigationIconClick)`. GroupChanne
733735
#### ChannelScreen (was MessagesScreen)
734736
| Removed Parameter | Notes |
735737
|---|---|
736-
| `reactionSorting` | Removed |
737-
| `onMessageLinkClick` | Removed |
738+
| `reactionSorting` | Moved to `ChatUiConfig.messageList.reactionSorting` |
739+
| `onMessageLinkClick` | Removed — override via `ChatComponentFactory` |
740+
| `onUserAvatarClick` | Removed — override via `ChatComponentFactory` |
741+
| `onUserMentionClick` | Removed — override via `ChatComponentFactory` |
742+
| `showDateSeparators` | Removed |
743+
| `showSystemMessages` | Removed |
744+
| Poll-related callbacks (`onPollUpdated`, etc.) | Removed — override via `ChatComponentFactory` |
745+
746+
#### ChannelList
747+
| Removed Parameter | Notes |
748+
|---|---|
749+
| `itemContent` / `channelContent` | Override `ChatComponentFactory.ChannelListItemContent(params)` |
750+
| `loadingContent` | Override `ChatComponentFactory.ChannelListLoadingContent(params)` |
751+
| `emptyContent` | Override `ChatComponentFactory.ChannelListEmptyContent(params)` |
752+
| `divider` | Removed — no dividers in v7 |
753+
754+
#### MessageList
755+
| Removed Parameter | Notes |
756+
|---|---|
757+
| `itemContent` | Override `ChatComponentFactory.MessageContent(params)` |
758+
| `messageContent` | Override `ChatComponentFactory.MessageContent(params)` |
759+
| `emptyContent` | Override `ChatComponentFactory.MessageListEmptyContent(params)` |
760+
| `loadingContent` | Override `ChatComponentFactory.MessageListLoadingContent(params)` |
761+
762+
#### ChannelListHeader / ChannelHeader
763+
| Removed Parameter | Notes |
764+
|---|---|
765+
| `color` | Removed — uses theme colors |
766+
| `shape` | Removed — uses theme tokens |
767+
| `elevation` | Removed — v7 headers have no elevation |
768+
769+
> **Lambda customization pattern in v7:** All composable slot parameters (`itemContent`, `loadingContent`, `emptyContent`, etc.) and forwarded callbacks (`onMessageLinkClick`, `onUserAvatarClick`, etc.) have been removed from public composables. Customization now goes through `ChatComponentFactory`. See the [Lambda Customization via ChatComponentFactory](https://getstream.io/chat/docs/sdk/android/migration-guides/migrating-from-v6-to-v7/#lambda-customization-via-chatcomponentfactory) documentation for the full migration pattern.
738770
739771
#### ChatTheme (additional removed params)
740772
| Removed Parameter | Notes |
@@ -889,6 +921,8 @@ chatClient.sendMessage(channelType, channelId, message).enqueue()
889921
890922
### §7.2 — Default feature flags changed
891923

924+
See also §3.4 for the `ChatUiConfig` migration. Summary of changed defaults:
925+
892926
| Feature | v6 Default | v7 Default |
893927
|---|---|---|
894928
| Auto-translation | `false` | `true` |

0 commit comments

Comments
 (0)