Register the generated adapters in Serializer as the generator emits them by gpunto · Pull Request #6800 · GetStream/stream-chat-android · GitHub
Skip to content

Register the generated adapters in Serializer as the generator emits them - #6800

Merged
gpunto merged 1 commit into
developfrom
migrate/v2-serializer
Oct 12, 2026
Merged

gpunto merged 1 commit into
developfrom
migrate/v2-serializer

Conversation

@gpunto

@gpunto gpunto commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Goal

Register the generated adapters in Serializer the way the generator emits it, so the generated Moshi parses the vendored models on its own.

Part of AND-1637

Implementation

  • Serializer is now the emitted file, minus the adapters for models the SDK doesn't vendor. It registers the generated enum adapters and ExactDateAdapter.
  • MoshiChatParser builds on Serializer.moshi and drops its own copies of the same registrations. No behaviour change.

Testing

SerializerTest finds every generated enum in the models package and checks that Serializer.moshi parses it.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved handling of dates and additional chat settings, capabilities, message types, and other model values during data parsing.
    • Added checks to catch parsing issues with supported model values.

@gpunto gpunto added the pr:internal Internal changes / housekeeping label Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 6.22 MB 6.22 MB 0.00 MB 🟢
stream-chat-android-ui-components 11.52 MB 11.52 MB 0.00 MB 🟢
stream-chat-android-compose 13.20 MB 13.20 MB -0.00 MB 🚀

@sonarqubecloud

sonarqubecloud Bot commented Oct 9, 2026

Copy link
Copy Markdown

@gpunto
gpunto marked this pull request as ready for review October 9, 2026 13:07
@gpunto
gpunto requested a review from a team as a code owner October 9, 2026 13:07
@coderabbitai

coderabbitai Bot commented Oct 9, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 574361ec-9901-4679-8bcf-e5b0b8d6edad

📥 Commits

Reviewing files that changed from the base of the PR and between 433a716 and 986646c.


📒 Files selected for processing (3)
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/parser2/MoshiChatParser.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/network/infrastructure/Serializer.kt
  • stream-chat-android-client/src/test/java/io/getstream/chat/android/network/infrastructure/SerializerTest.kt

💤 Files with no reviewable changes (1)
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/parser2/MoshiChatParser.kt

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.



📝 Walkthrough

Walkthrough

Serializer now registers additional network-model adapters and ExactDateAdapter. MoshiChatParser registers its local ExactDateAdapter and removes explicit network-model adapters. A new test discovers generated sealed types with nested adapters and checks that undeclared string values parse without throwing or returning null.


Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 98664

The change centralizes network adapter registration without disrupting parser date handling, and unknown network enum values remain parseable. No identified user-facing regression remains; the PR appears ready to merge after normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: registering generated adapters in Serializer.
Description check Passed The description includes the goal, implementation details, testing approach, and linked issue. It omits the UI section and contributor/reviewer checklists, but these are not critical for this non-UI c…
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.


  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR

🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR


  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

I’m a rabbit with a parsing plan,
I test each value as fast as I can.
New adapters hop into place,
Dates find their proper space.
Unknown strings pass through the gate,
I nibble carrots and celebrate!

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

@gpunto
gpunto added this pull request to the merge queue Oct 12, 2026
Merged via the queue into develop with commit 84c9d14 Oct 12, 2026
20 of 21 checks passed
@gpunto
gpunto deleted the migrate/v2-serializer branch October 12, 2026 12:12
@stream-public-bot stream-public-bot added the released Included in a release label Oct 16, 2026
@stream-public-bot

Copy link
Copy Markdown
Contributor

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

Labels

pr:internal Internal changes / housekeeping released Included in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants