Skip to content

Migrate the channel state responses to the generated channel state models - #6760

Draft
gpunto wants to merge 4 commits into
developfrom
migrate/channel-state-response
Draft

gpunto wants to merge 4 commits into
developfrom
migrate/channel-state-response

Conversation

@gpunto

@gpunto gpunto commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Goal

Parse the channel state returned by queryChannels, queryChannel and grouped channels with the generated models.

Part of AND-1291

Implementation

  • Point the three query endpoints at the generated QueryChannelsResponse, ChannelStateResponse and GroupedQueryChannelsResponse, and delete the hand-written QueryChannelsResponse and QueryGroupedChannelsResponse.
  • Map the channel state with the generated channel and message mappers. A state without a channel fails the call instead of throwing.
  • Map pending messages from the generated PendingMessageResponse. Their metadata is server-side only and never sent to client-side callers, so it stays empty as before.
  • The update, delete, truncate and member endpoints still parse the hand-written envelope; they move in a follow-up.

Testing

E2E needs the mock server to send duration on single channel queries, as the backend does (mock server PR to follow).

MoshiChatApiTest covers a channel state with every field set, the single-channel conversion, and a state without a channel. Before this, a recorded channel state was mapped through both the old and the new path and produced the same Channel, including pending messages, hidden state, watchers and push preferences.

On a device: queried a channel with pinned, quoted and thread messages, a reaction, a live location, a draft, reads and a push preference through queryChannel and queryChannels. Every field was set and both calls agreed. Hiding the channel returned the hidden flag and date, and offset pagination returned non-overlapping pages.

🤖 Generated with Claude Code

@gpunto gpunto added the pr:internal Internal changes / housekeeping label Sep 30, 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

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 6.17 MB 6.18 MB 0.01 MB 🟢
stream-chat-android-ui-components 11.48 MB 11.48 MB 0.01 MB 🟢
stream-chat-android-compose 13.14 MB 13.15 MB 0.01 MB 🟢

@sonarqubecloud

sonarqubecloud Bot commented Oct 2, 2026

Copy link
Copy Markdown

This branch has not been deployed

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

Labels

pr:internal Internal changes / housekeeping

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant