Sitelet https://github.com/GetStream/stream-chat-android/pull/6748
Skip to content

Migrate the reminder responses to the generated ReminderResponseData - #6748

Merged
gpunto merged 2 commits into
developfrom
migrate/reminders
Sep 29, 2026
Merged

gpunto merged 2 commits into
developfrom
migrate/reminders

Conversation

@gpunto

@gpunto gpunto commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Goal

Parse the reminder responses of queryReminders, createReminder and updateReminder with the generated
models.

Part of AND-1291

Implementation

  • Point RemindersApi at the generated QueryRemindersResponse, CreateReminderResponse and
    UpdateReminderResponse, and delete the hand-written response wrappers.
  • Map the generated ReminderResponseData to MessageReminder, reusing the generated ChannelResponse and
    MessageResponse mappers for the embedded channel and message. The channel mapper also fills the typed
    Channel.hidden when the key is present; it stays in extraData as before.
  • DownstreamReminderDto stays for the reminder WebSocket events.

Testing

ReminderResponseParityTest parses the same reminder JSON through the hand-written DTO and the generated
model and requires the same MessageReminder, including the embedded channel and a bookmark reminder
without channel or message.

On a device: created, updated and queried a timed and a bookmark reminder. Every field matched what was set,
the message matched getMessage, and the channel matched queryChannels apart from hidden and blocked,
which the reminder endpoint doesn't send.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved reminder data handling across fetching, creating, and updating reminders, including associated message, channel, and timestamp details.
    • Improved support for reminder list pagination.

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

Copy link
Copy Markdown
Contributor

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 6.13 MB 6.13 MB 0.00 MB 🟢
stream-chat-android-ui-components 11.43 MB 11.43 MB 0.00 MB 🟢
stream-chat-android-compose 13.11 MB 13.11 MB 0.00 MB 🟢

@gpunto
gpunto marked this pull request as ready for review September 29, 2026 10:35
@gpunto
gpunto requested a review from a team as a code owner September 29, 2026 10:35
@coderabbitai

coderabbitai Bot commented Sep 29, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

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: ebf4ec6d-81d7-4041-8708-885694ca38a4

📥 Commits

Reviewing files that changed from the base of the PR and between 84b8cba and b0523ab.

📒 Files selected for processing (10)
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/endpoint/RemindersApi.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/DomainMapping.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/network/models/CreateReminderResponse.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/network/models/QueryRemindersResponse.kt
  • stream-chat-android-client/src/main/java/io/getstream/chat/android/network/models/UpdateReminderResponse.kt
  • stream-chat-android-client/src/test/java/io/getstream/chat/android/client/Mother.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/client/api2/MoshiChatApiTestArguments.kt
  • stream-chat-android-client/src/test/java/io/getstream/chat/android/client/api2/mapping/DomainMappingTest.kt
  • stream-chat-android-client/src/test/java/io/getstream/chat/android/client/parser2/ReminderResponseParityTest.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

Reminder endpoints now use separate network response models for querying, creating, and updating reminders. Reminder response data maps to MessageReminder, with tests covering API response types, mapping behavior, and parser parity.

Changes

Reminder response models

Layer / File(s) Summary
Response contracts and domain mapping
stream-chat-android-client/src/main/java/io/getstream/chat/android/network/models/*ReminderResponse.kt, stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/endpoint/RemindersApi.kt, stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/DomainMapping.kt
The network models define separate query, create, and update response types. RemindersApi uses them, and ReminderResponseData maps to MessageReminder.
Response and mapping validation
stream-chat-android-client/src/test/java/io/getstream/chat/android/client/Mother.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/client/api2/mapping/DomainMappingTest.kt, stream-chat-android-client/src/test/java/io/getstream/chat/android/client/parser2/ReminderResponseParityTest.kt
Test fixtures and API tests use the response types for each operation. Mapping tests cover populated and absent values, and parser tests compare legacy and generated response mappings.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Refactor

Suggested reviewers: velikovpetar

Merge Risk: ⚪ Minimal · up to b0523

No concrete issue currently prevents merging. The reminder response contract for duration remains unverified.

Security Architecture Review

Security architecture risk: 🟡 Moderate · up to b0523

The reminder responses now require a field the previous client did not require. If a successful response omits it, the client may report a failure, potentially after creating or updating a reminder. The available tests do not establish that every successful response includes the field. No new security boundary or privilege exposure was identified.

Retained concerns

  • Medium · reliability · inferred: Query, create, and update now require duration in successful response envelopes although the prior parsers did not. If an endpoint omits it, decoding fails before domain mapping; for create or update, that could make a completed mutation appear unsuccessful. The server guarantee and retry behavior remain unverified.
Security review details

Security Blast Radius

  • inferred — The identified contract risk is confined by the inspected path to reminder query, create, and update responses consumed by the Android client. The changed types do not themselves establish broader tenant, service, credential, or privilege reachability.

Trust Boundaries and Controls

  • observed — Server response data crosses the network-to-domain boundary through explicit mapping, while the endpoint retains its authenticated-API marker. Runtime enforcement of that marker was not verified.

Resilience and Maintainability Implications

  • inferred — If a committed reminder mutation returns an envelope that cannot be decoded, the caller may lack a reliable indication of the server state. The available tests do not exercise that recovery case.

Hardening Proposals

  • proposed — Check complete successful query, create, and update envelopes against the authoritative response contract, including timed and bookmark reminders, and establish how callers recover if decoding fails after a mutation.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 24 functions across 10 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 primary change: migrating reminder responses to the generated ReminderResponseData model.
Description check ✅ Passed The description includes the required Goal, Implementation, and Testing information. It explains the generated response migration, mapping changes, parity testing, and device validation. UI sections, …
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

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 each reminder reply,
With typed response models stacked neat and dry.
It maps the channel, message, and time,
Then tests both parsers line by line.
It thumps once softly: “All checks align!”

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

@andremion andremion 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.

Looks good. One optional nit inline.

@sonarqubecloud

Copy link
Copy Markdown

@gpunto
gpunto enabled auto-merge September 29, 2026 13:13
@gpunto
gpunto added this pull request to the merge queue Sep 29, 2026
Merged via the queue into develop with commit 707a297 Sep 29, 2026
19 checks passed
@gpunto
gpunto deleted the migrate/reminders branch September 29, 2026 14:20
@stream-public-bot stream-public-bot added the released Included in a release label Sep 30, 2026
@stream-public-bot

Copy link
Copy Markdown
Contributor

🚀 Available in v7.13.0

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