Skip to content

Add v6 to v7 AI migration guide#6387

Open
aleksandar-apostolov wants to merge 6 commits intodevelopfrom
docs/ai-migration-guide
Open

Add v6 to v7 AI migration guide#6387
aleksandar-apostolov wants to merge 6 commits intodevelopfrom
docs/ai-migration-guide

Conversation

@aleksandar-apostolov
Copy link
Copy Markdown
Contributor

@aleksandar-apostolov aleksandar-apostolov commented Apr 27, 2026

Goal

Add a machine-oriented migration guide (ai-docs/ai-migration.md) that enables AI agents to migrate Android Chat SDK projects from v6 to v7 without prior SDK knowledge.

Implementation

  • Structured guide following the React Native AI migration guide format
  • 10 sections: detection, prerequisites, structural migrations, package relocations, rename lists, removed APIs, behavior changes, machine-readable JSON block, source paths, verification
  • Covers: plugin system removal, StreamDesign theming, ChatComponentFactory, 50+ class/method renames, drawable renames, component parameter changes, ChannelInfoViewEvent changes
  • Tested by having an AI agent migrate the v6 compose sample app to v7 — builds successfully with zero prior SDK knowledge

Testing

Validated through 3 rounds of agent-driven migration testing.

Summary by CodeRabbit

  • Documentation
    • Added comprehensive migration guide for Stream Chat Android SDK v6 to v7, including automated detection commands, prerequisite updates, structural migration instructions, package relocations, class/component renames, removed APIs, and end-to-end verification checklist.

Machine-oriented migration guide for AI agents migrating Android Chat
SDK from v6 to v7. Covers dependencies, plugin system removal, theming
redesign, package relocations, component renames, and verification.

Tested by having an AI agent migrate the v6 compose sample app to v7
with zero prior SDK knowledge — builds successfully.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 27, 2026

PR checklist ✅

All required conditions are satisfied:

  • Title length is OK (or ignored by label).
  • At least one pr: label exists.
  • Sections ### Goal, ### Implementation, and ### Testing are filled.

🎉 Great job! This PR is ready for review.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 27, 2026

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 5.82 MB 5.82 MB 0.00 MB 🟢
stream-chat-android-ui-components 11.02 MB 11.02 MB 0.00 MB 🟢
stream-chat-android-compose 12.33 MB 12.33 MB 0.00 MB 🟢

@aleksandar-apostolov aleksandar-apostolov changed the title docs(ai): add v6 to v7 AI migration guide Add v6 to v7 AI migration guide Apr 27, 2026
@aleksandar-apostolov aleksandar-apostolov marked this pull request as ready for review April 27, 2026 13:56
@aleksandar-apostolov aleksandar-apostolov requested a review from a team as a code owner April 27, 2026 13:56
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 27, 2026

Walkthrough

Adds comprehensive documentation for migrating Stream Chat Android SDK projects from v6 to v7, covering prerequisites, structural changes (plugins, theming, UI customization), API renames, package relocations, and verification procedures.

Changes

Cohort / File(s) Summary
Migration Guide Documentation
ai-docs/ai-migration.md
Comprehensive migration guide covering automated detection commands, Kotlin 2.2.0 prerequisite, dependency updates to 7.0.0, plugin system restructuring, theming API changes, UI customization via ChatComponentFactory, class/component renames, removed APIs, package relocations, machine-readable JSON reference, source path validation, and end-to-end verification checklist.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A guide through the SDK's grand transformation,
From v6 to v7, with bunny satisfaction,
Plugins, themes, and classes renamed with care,
Migration paths clear, documented with flair! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers Goal and Implementation sections clearly, but lacks Testing details, UI Changes section, and complete Contributor Checklist as required by the template. Add detailed Testing methodology, confirm UI Changes section (or mark as N/A for docs), and complete all Contributor Checklist items including CLA, assignee, and issue linkage.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main change: adding an AI migration guide for upgrading from v6 to v7.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/ai-migration-guide

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (1)
ai-docs/ai-migration.md (1)

164-168: Address markdownlint warnings for machine-readability hygiene.

There are multiple MD040/MD058 warnings (missing fenced-code languages and tables not surrounded by blank lines). These don’t break migration logic, but fixing them improves doc tooling consistency.

Also applies to: 664-666, 670-672, 697-699, 704-706, 716-718, 724-726, 730-732, 736-738, 1093-1098, 1101-1109, 1112-1114, 1117-1120

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@ai-docs/ai-migration.md` around lines 164 - 168, The markdown has
machine-readability lint warnings (MD040/MD058) around several fenced code
blocks and tables—specifically the package listings like the unlabelled fenced
block containing io.getstream.chat.android.offline.,
io.getstream.chat.android.state., io.getstream.chat.android.uiutils.; fix by
adding appropriate fenced-code languages (e.g., ```text or ```bash) to all such
fenced blocks and ensure tables and code blocks are surrounded by a blank line
above and below to satisfy MD058; apply the same changes to the other listed
ranges (664-666, 670-672, 697-699, 704-706, 716-718, 724-726, 730-732, 736-738,
1093-1098, 1101-1109, 1112-1114, 1117-1120) so all occurrences are consistently
annotated and separated.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@ai-docs/ai-migration.md`:
- Around line 946-948: Update the JSON rename mapping so the machine-readable
composer entries match the prose in §5.6: replace the null values for
"MentionSuggestionItem" and "MentionSuggestionList" with "UserSuggestionItem"
and "UserSuggestionList" respectively (i.e., set "MentionSuggestionItem":
"UserSuggestionItem" and "MentionSuggestionList": "UserSuggestionList") so
automated rename operations won't drop those mappings.
- Line 59: The search regex currently repeats MessageContentFactory and
therefore misses ChatComponentFactory; update the command so the pattern
includes both unique symbols (e.g., use a single alternation like
/MessageContentFactory|ChatComponentFactory/ or adjust the rg invocation to "rg
'MessageContentFactory|ChatComponentFactory' --type kotlin") so the migration
doc detects usages of ChatComponentFactory as intended and remove the duplicate
token.
- Around line 1027-1036: The drawableRenames JSON is currently partial (contains
keys like "stream_compose_ic_", "stream_compose_ic_arrow_back",
"stream_compose_ic_attachments", etc.), which can yield incomplete automated
migrations; either expand drawableRenames to include all rename mappings from
§5.8 into this JSON or explicitly annotate the block (e.g., add a "partial":
true or a comment) and document which names are omitted so downstream tooling
can detect incompleteness—update the drawableRenames object or add a clear
marker and reference to §5.8 accordingly.
- Line 610: Replace the macOS-specific sed usage in the find/xargs invocation
that searches for "stream_compose_ic_" with a portable in-place edit approach;
specifically, stop using `sed -i ''` and instead run a cross-platform command
that uses perl's in-place edit mode or a sed variant that creates a temporary
backup (then remove backups) so the substitution of "stream_compose_ic_" →
"stream_design_ic_" is applied on both BSD/macOS and GNU/Linux; update the
diff's find/xargs line to the portable alternative (e.g., find with -print0 +
xargs -0 and perl -i -pe 's/stream_compose_ic_/stream_design_ic_/g' or use sed
-i.bak followed by removing .bak files) so CI and local Linux environments
succeed.

---

Nitpick comments:
In `@ai-docs/ai-migration.md`:
- Around line 164-168: The markdown has machine-readability lint warnings
(MD040/MD058) around several fenced code blocks and tables—specifically the
package listings like the unlabelled fenced block containing
io.getstream.chat.android.offline., io.getstream.chat.android.state.,
io.getstream.chat.android.uiutils.; fix by adding appropriate fenced-code
languages (e.g., ```text or ```bash) to all such fenced blocks and ensure tables
and code blocks are surrounded by a blank line above and below to satisfy MD058;
apply the same changes to the other listed ranges (664-666, 670-672, 697-699,
704-706, 716-718, 724-726, 730-732, 736-738, 1093-1098, 1101-1109, 1112-1114,
1117-1120) so all occurrences are consistently annotated and separated.
🪄 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: 944007cf-3973-4445-875d-7d023b804fcc

📥 Commits

Reviewing files that changed from the base of the PR and between 6d5d6c1 and 13e3c1a.

📒 Files selected for processing (1)
  • ai-docs/ai-migration.md

Comment thread ai-docs/ai-migration.md Outdated
Comment thread ai-docs/ai-migration.md Outdated
Comment thread ai-docs/ai-migration.md Outdated
Comment thread ai-docs/ai-migration.md
- Fix duplicated detection regex (MessageContentFactory → ChatComponentFactory)
- Use portable perl -i -pe for bulk drawable rename (works on macOS + Linux)
- Fix MentionSuggestionItem/List JSON mappings (null → actual v7 names)
- Complete drawableRenames JSON with all mappings from §5.8
Comment thread ai-docs/ai-migration.md Outdated

### Key facts

- v6 latest release: `6.37.1`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit outdated info, should we keep it always up-to-date, or are we OK having it point to a somewhat recent release? (the v7 latest release is also outdated)

Comment thread ai-docs/ai-migration.md Outdated
| v6 (StatePluginConfig) | v7 (ChatClientConfig) | Default |
|---|---|---|
| `userPresence` | `userPresence` | `false` |
| `backgroundSyncEnabled` | `isAutomaticSyncOnReconnectEnabled` | `true` |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong: backgroundSyncEnabled -> isAutomaticSyncOnReconnectEnabled is not a one-to-one mapping.

  1. backgroundSyncEnabled = true caused a /sync call to be performed after receiving a push notification => this was deprecated on V6 and removed on V7
  2. isAutomaticSyncOnReconnectEnabled -> this is a flag controlling whether /sync + channel re-watch is performed after a reconnect.

Comment thread ai-docs/ai-migration.md Outdated
| _(OfflineConfig.enabled)_ | `offlineEnabled` | `true` |
| _(none)_ | `useLegacyChannelLogic` | `false` |
| _(none)_ | `ignoredOfflineChannelTypes` | `emptySet()` |
| _(none)_ | `syncMaxThreshold` | `TimeDuration.hours(12)` |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_(none)_ is not correct here - on V6 it was part of the StatePluginConfig (this is for both syncMaxThreshold and messageLimitConfig)

Comment thread ai-docs/ai-migration.md Outdated
| `backgroundSyncEnabled` | `isAutomaticSyncOnReconnectEnabled` | `true` |
| _(OfflineConfig.enabled)_ | `offlineEnabled` | `true` |
| _(none)_ | `useLegacyChannelLogic` | `false` |
| _(none)_ | `ignoredOfflineChannelTypes` | `emptySet()` |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_(none)_ is not correct here - on V6 it was part of the StreamOfflinePluginFactory constructor.

Comment thread ai-docs/ai-migration.md Outdated
|---|---|---|
| `userPresence` | `userPresence` | `false` |
| `backgroundSyncEnabled` | `isAutomaticSyncOnReconnectEnabled` | `true` |
| _(OfflineConfig.enabled)_ | `offlineEnabled` | `true` |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_(OfflineConfig.enabled)_ is not correct here - on V6 it was configured by just adding the StreamOfflinePluginFactory via ChatClient.Builder.withPlugins

Comment thread ai-docs/ai-migration.md Outdated

| v6 (StatePluginConfig) | v7 (ChatClientConfig) | Default |
|---|---|---|
| `userPresence` | `userPresence` | `false` |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can see, userPresence is true by default

Comment thread ai-docs/ai-migration.md Outdated
| Removed Parameter | Notes |
|---|---|
| `reactionSorting` | Removed |
| `onMessageLinkClick` | Removed |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are missing several removed lambdas here: #6365

We should also instruct the agent how to customise them now: https://getstream.io/chat/docs/sdk/android/migration-guides/migrating-from-v6-to-v7/#lambda-customization-via-chatcomponentfactory

Comment thread ai-docs/ai-migration.md

> If you use `ChannelScreen` / Stream UI components, no action needed — they handle this automatically.

### §7.2 — Default feature flags changed
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already mentioned in Changed defaults (v6 → v7) section

- 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
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:documentation Documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants