Skip to content

fix(llc): reduce default thread participant and member limits#2822

Open
VelikovPetar wants to merge 1 commit into
masterfrom
fix/FLU-595_update_threads_defaults
Open

fix(llc): reduce default thread participant and member limits#2822
VelikovPetar wants to merge 1 commit into
masterfrom
fix/FLU-595_update_threads_defaults

Conversation

@VelikovPetar

@VelikovPetar VelikovPetar commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Submit a pull request

Linear: FLU-595

Github Issue: #

CLA

  • I have signed the Stream CLA (required).
  • The code changes follow best practices
  • Code changes are tested (add some information if not applicable)

Description of the pull request

Reduces the default participantLimit and memberLimit on ThreadOptions from 100 to 10, cutting data usage when querying threads. These defaults apply to StreamChatClient.queryThreads / getThread and, transitively, to StreamThreadListController.

Context:

  • Matches the iOS SDK, where ThreadListQuery.participantLimit defaults to 10 (verified against stream-chat-swift develop). iOS has no member_limit on the thread query at all; Flutter keeps the field and lowers its default to 10.
  • replyLimit is left unchanged at 2 (already stricter than iOS's 3).
  • The stock thread list UI renders at most a few participant avatars (StreamUserAvatarStack(max: 3)) and no thread members, so there is no visible change by default. The message-list thread footer uses message.threadParticipants (a separate Message field), which is unaffected.
  • Threads are not persisted, so there is no cached data to reconcile.

Not a source-breaking change (no signatures change). Callers relying on the old counts can pass an explicit ThreadOptions(participantLimit: 100, memberLimit: 100).

Test instructions: cd packages/stream_chat && dart test test/src/core/api/requests_test.dart — added a ThreadOptions group covering default and explicit serialization.

Screenshots / Videos

No UI changes.

Summary by CodeRabbit

  • Changes

    • Reduced the default thread pagination limits for participants and members from 100 to 10.
    • Updated related documentation to reflect the new defaults.
  • Tests

    • Added coverage confirming default and explicitly configured thread options are serialized correctly.

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 928c765b-18dd-49d6-8cfc-cd6bdc3ee2ac

📥 Commits

Reviewing files that changed from the base of the PR and between 5f7f33c and 9f62d64.

📒 Files selected for processing (3)
  • packages/stream_chat/CHANGELOG.md
  • packages/stream_chat/lib/src/core/api/requests.dart
  • packages/stream_chat/test/src/core/api/requests_test.dart

📝 Walkthrough

Walkthrough

ThreadOptions participant and member limits now default to 10 instead of 100. Documentation, changelog text, and JSON serialization tests were updated accordingly.

Changes

ThreadOptions defaults

Layer / File(s) Summary
ThreadOptions defaults and serialization coverage
packages/stream_chat/lib/src/core/api/requests.dart, packages/stream_chat/test/src/core/api/requests_test.dart, packages/stream_chat/CHANGELOG.md
Default participant and member limits and their documentation now use 10; tests verify default and explicit JSON serialization, and the changelog records the change.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: xsahil03x

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: lowering default thread participant and member limits.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/FLU-595_update_threads_defaults

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.

@VelikovPetar
VelikovPetar marked this pull request as ready for review July 17, 2026 14:28
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.29%. Comparing base (5f7f33c) to head (9f62d64).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2822      +/-   ##
==========================================
+ Coverage   71.28%   71.29%   +0.01%     
==========================================
  Files         430      430              
  Lines       26934    26934              
==========================================
+ Hits        19199    19202       +3     
+ Misses       7735     7732       -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants