Skip to content

Move search, members and unread counts to the v2 endpoints - #6829

Merged
aleksandar-apostolov merged 1 commit into
developfrom
migrate/v2-search-members-unread
Oct 15, 2026
Merged

aleksandar-apostolov merged 1 commit into
developfrom
migrate/v2-search-members-unread

Conversation

@gpunto

@gpunto gpunto commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Goal

Move message search, member queries and unread counts to the v2 endpoints. The websocket stays on v1.

Part of AND-1637

Implementation

  • GeneralApi is built on /api/v2/chat/....
  • /sync and the /connect warm-up move to a new SyncApi that stays on v1: /sync returns events in the socket's encoding, so it moves together with the socket.

Testing

  • V2LaneBatchSixTest parses the v2 search, members and unread responses and checks the request payloads.
  • MoshiChatApiTest covers the calls routed through SyncApi.

Summary by CodeRabbit

  • Bug Fixes
    • Improved compatibility for search, member, and unread-count requests with the updated chat API.
    • Preserved connection warm-up and sync-history functionality while keeping those requests on the appropriate API version.

@gpunto gpunto added the pr:improvement Improvement label Oct 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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, or the PR is bot-authored.
  • An issue is linked (Linear ticket or GitHub issue), or the PR is bot-authored.

🎉 Great job! This PR is ready for review.

@github-actions

Copy link
Copy Markdown
Contributor

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 6.21 MB 6.21 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 🟢
stream-chat-android-ai-compose 2.04 MB 2.04 MB 0.00 MB 🟢
stream-chat-android-ai-ondevice 1.67 MB 1.67 MB 0.00 MB 🟢

@sonarqubecloud

Copy link
Copy Markdown

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

coderabbitai Bot commented Oct 15, 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: 460eb3d7-68b0-44b4-b4ee-e678b8883090
📥 Commits

Reviewing files that changed from the base of the PR and between 2a7866a and dc94f8f.

📒 Files selected for processing: 6
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/MoshiChatApi.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/endpoint/GeneralApi.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/endpoint/SyncApi.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/di/ChatModule.kt
  • stream-chat-android-client/src/test/java/io/getstream/chat/android/client/api2/MoshiChatApiTest.kt
  • stream-chat-android-client/src/test/java/io/getstream/chat/android/network/infrastructure/V2LaneBatchSixTest.kt

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

📝 Walkthrough

GeneralApi now uses v2 chat paths for search, members, and unread requests. A new SyncApi defines the v1 warm-up and sync-history endpoints. ChatModule registers both interfaces with their corresponding Retrofit builders, and MoshiChatApi uses SyncApi for those calls. Tests cover the updated sync API wiring and v2 parsing and serialization.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to dc94f

The new endpoint paths resolve as intended under the standard configuration. No actionable issue remains before normal merge checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 24 functions across 6 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the main change: moving search, members, and unread counts to v2 endpoints.
Description check Passed The description includes the goal, implementation, testing, and linked issue. It is mostly complete, but it omits the required Checklist section and its issue, tests/docs, and CLA items.
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

A rabbit checks the routes with care,
V2 paths hop through open air.
SyncApi keeps the warm-up neat,
And history finds its v1 beat.
The tests tuck custom data in,
Then nibble carrots with a grin.

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

@aleksandar-apostolov aleksandar-apostolov left a comment

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.

LGTM

@aleksandar-apostolov
aleksandar-apostolov added this pull request to the merge queue Oct 15, 2026
Merged via the queue into develop with commit f3d1ac7 Oct 15, 2026
25 of 27 checks passed
@aleksandar-apostolov
aleksandar-apostolov deleted the migrate/v2-search-members-unread branch October 15, 2026 17:23
@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

🚀 Available in v7.15.0

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

Labels

pr:improvement Improvement released Included in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants