Skip to content

Comments

Increase default search debounce period to 300ms#6076

Merged
VelikovPetar merged 2 commits intodevelopfrom
feature/AND-1012_increase_default_search_debounce_period
Jan 9, 2026
Merged

Increase default search debounce period to 300ms#6076
VelikovPetar merged 2 commits intodevelopfrom
feature/AND-1012_increase_default_search_debounce_period

Conversation

@VelikovPetar
Copy link
Contributor

@VelikovPetar VelikovPetar commented Jan 9, 2026

🎯 Goal

Increases the default debounce period to 300ms (from 200ms).
This aligns the behaviour to the iOS/React SDKs.

Note: The fix is applied only for the Compose SDK. The XML SDK doesn't provide automatic search when typing.

🛠 Implementation details

  • Increase debounce period to 300ms

🎨 UI Changes

NA

🧪 Testing

  1. Open compose app
  2. Type in the Search bar
  3. A BE call should be triggered 300ms after typing stop

Summary by CodeRabbit

  • Improved
    • Increased default search debounce period to 300ms for more efficient search query handling.

✏️ Tip: You can customize this high-level summary in your review settings.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 5.25 MB 5.25 MB 0.00 MB 🟢
stream-chat-android-offline 5.48 MB 5.48 MB 0.00 MB 🟢
stream-chat-android-ui-components 10.60 MB 10.60 MB 0.00 MB 🟢
stream-chat-android-compose 12.81 MB 12.81 MB 0.00 MB 🟢

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 9, 2026

@VelikovPetar VelikovPetar marked this pull request as ready for review January 9, 2026 13:12
@VelikovPetar VelikovPetar requested a review from a team as a code owner January 9, 2026 13:12
@coderabbitai
Copy link

coderabbitai bot commented Jan 9, 2026

Walkthrough

The default search debounce period has been increased from 200ms to 300ms in the ChannelListViewModel, affecting both search query and channel list operations. The CHANGELOG has been updated to reflect this improvement.

Changes

Cohort / File(s) Summary
Search Debounce Configuration
CHANGELOG.md, stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/channels/ChannelListViewModel.kt
Updated SEARCH_DEBOUNCE_MS constant from 200L to 300ms, increasing the debounce delay for search queries and channel list filtering operations. Changelog entry added documenting the improvement.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A patient bunny hops more slow,
From two to three, the delays flow,
Less frantic search, more time to think—
Debounce grows deep, not just a blink! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: increasing the search debounce period to 300ms, which directly corresponds to the primary alteration in the changeset.
Description check ✅ Passed The description covers all critical sections: Goal (why the change), Implementation details (what was changed), UI Changes (N/A), and Testing (how to verify). All required checklist items are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c71d105 and af4cf1a.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/channels/ChannelListViewModel.kt
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{kt,kts}

📄 CodeRabbit inference engine (AGENTS.md)

Format and apply Kotlin style with Spotless (4 spaces, no wildcard imports, licence headers)

Files:

  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/channels/ChannelListViewModel.kt
**/*.kt

📄 CodeRabbit inference engine (AGENTS.md)

**/*.kt: Use @OptIn annotations explicitly; avoid suppressions unless documented
Document public APIs with KDoc, including thread expectations and state notes

Files:

  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/channels/ChannelListViewModel.kt
**/stream-chat-android-compose/**/*.kt

📄 CodeRabbit inference engine (AGENTS.md)

**/stream-chat-android-compose/**/*.kt: Compose components should follow noun-based naming (e.g., MessageList, ChannelListHeader)
Compose previews should use @StreamPreview helpers

Files:

  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/channels/ChannelListViewModel.kt
🧠 Learnings (2)
📚 Learning: 2025-12-17T15:00:07.506Z
Learnt from: CR
Repo: GetStream/stream-chat-android PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-17T15:00:07.506Z
Learning: Applies to **/stream-chat-android-compose/**/*.kt : Compose components should follow noun-based naming (e.g., `MessageList`, `ChannelListHeader`)

Applied to files:

  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/channels/ChannelListViewModel.kt
📚 Learning: 2025-12-17T15:00:07.506Z
Learnt from: CR
Repo: GetStream/stream-chat-android PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-17T15:00:07.506Z
Learning: Applies to **/stream-chat-android-ui-components/**/*Test.kt : Record Shot baselines when behaviour changes in XML kit UI tests

Applied to files:

  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/channels/ChannelListViewModel.kt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Test compose (0)
🔇 Additional comments (2)
CHANGELOG.md (1)

72-74: Changelog entry looks correct and appropriately scoped to Compose.

Placement under ## stream-chat-android-compose### ⬆️ Improved is consistent with the stated behavior change, and the PR link formatting matches surrounding entries. If you want to be extra explicit, you could clarify it’s the Compose default debounce (but current wording is already fine).

stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/channels/ChannelListViewModel.kt (1)

773-773: LGTM!

The debounce constant is updated correctly from 200ms to 300ms. The change is properly integrated—both the searchDebouncer and queryChannelDebouncer use the searchDebounceMs parameter which defaults to this constant, ensuring consistent behavior across search and channel list operations.


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 and usage tips.

@VelikovPetar VelikovPetar merged commit 78d9238 into develop Jan 9, 2026
14 checks passed
@VelikovPetar VelikovPetar deleted the feature/AND-1012_increase_default_search_debounce_period branch January 9, 2026 16:01
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