Skip to content

Show muted icon on channel items for DMs with muted users#6449

Merged
gpunto merged 2 commits into
developfrom
user-mute-icon
May 21, 2026
Merged

Show muted icon on channel items for DMs with muted users#6449
gpunto merged 2 commits into
developfrom
user-mute-icon

Conversation

@gpunto
Copy link
Copy Markdown
Contributor

@gpunto gpunto commented May 21, 2026

Goal

In the channel list, we are currently displaying the muted icon only when the channel is muted. However, for direct messages, we should look at the muted users too.

We're basically going back to #6302

Closes #6442

Implementation

Check user mutes to decide whether to show the muted icon on items representing direct messages channels

🎨 UI Changes

Same as #6302

Testing

Mute a user and then check that the muted icon is shown on the corresponding direct message channel item

Summary by CodeRabbit

  • Bug Fixes

    • Direct message channels now correctly show mute indicators when you've muted the other user, aligning UI with your user-level mute settings.
  • Tests

    • Added tests covering mute-state behavior for direct messages and group channels to ensure correct mute indicator behavior.

Review Change Stack

@gpunto gpunto added the pr:improvement Improvement label May 21, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

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

github-actions Bot commented May 21, 2026

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 5.82 MB 5.82 MB 0.00 MB 🟢
stream-chat-android-ui-components 11.02 MB 11.02 MB 0.00 MB 🟢
stream-chat-android-compose 12.41 MB 12.41 MB 0.00 MB 🟢

@gpunto gpunto force-pushed the user-mute-icon branch 2 times, most recently from eff5f3a to 63d4889 Compare May 21, 2026 08:41
@gpunto gpunto marked this pull request as ready for review May 21, 2026 08:52
@gpunto gpunto requested a review from a team as a code owner May 21, 2026 08:52
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 0ed77ff8-e5e3-4e67-b257-44df7e46b564

📥 Commits

Reviewing files that changed from the base of the PR and between 63d4889 and 630f888.

📒 Files selected for processing (5)
  • stream-chat-android-compose/api/stream-chat-android-compose.api
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/state/channels/list/ItemState.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channels/list/ChannelItem.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/channels/ChannelListViewModel.kt
  • stream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/viewmodel/channels/ChannelListViewModelTest.kt

Walkthrough

ChannelListViewModel now incorporates global user mutes into channel-item creation; ChannelItemState gains isUserMuted, ChannelItem UI treats isUserMuted like isMuted for rendering, and tests validate DM and group-channel mute mappings.

Changes

User-level mute state for direct message channels

Layer / File(s) Summary
State: API and model update
stream-chat-android-compose/api/stream-chat-android-compose.api, stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/state/channels/list/ItemState.kt
ChannelItemState public API now includes isUserMuted (constructor/copy/signature updated) and a new isUserMuted() accessor in the generated API.
ViewModel integration
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/channels/ChannelListViewModel.kt
Derives globalMuted from global state, includes it in the combined observeQueryChannels pipeline to produce userMutes, passes userMutes into createChannelItems, computes muted user IDs, and adds Channel.isOneToOneMutedByUser to set isUserMuted for 1:1 channels.
UI: Channel item rendering
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channels/list/ChannelItem.kt
TitleRow and MessageRow mute-icon conditions updated to treat channelItemState.isUserMuted the same as isMuted for inline and trailing-bottom mute indicators.
Tests: DM/group mute cases and fixtures
stream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/viewmodel/channels/ChannelListViewModelTest.kt
Adds Fixture.givenUserMutes(...), companion test users and channel fixtures, and three tests validating isUserMuted/isMuted behavior for direct messages and group-channel edge cases.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 A whisper through the channels flows,
User mutes now hide direct-message woes,
One-to-one chats softy fade to grey,
When muted friends have nothing left to say,
Tests hop in to prove the silence stays.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 29.41% which is insufficient. The required threshold is 80.00%. 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 summarizes the main change: showing muted icons on channel items for direct messages with muted users.
Description check ✅ Passed The description covers Goal and Implementation sections adequately, and references the related issue. However, the UI Changes section lacks actual screenshots/videos, and Testing lacks detailed test scenarios.
Linked Issues check ✅ Passed The PR implements the core requirement from issue #6442 by adding logic to display muted icons for DM channels when users are muted, restoring the v6 behavior.
Out of Scope Changes check ✅ Passed All changes are directly related to displaying muted icons for DM channels based on user mutes; no out-of-scope modifications detected.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch user-mute-icon

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.

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
77.1% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@gpunto
Copy link
Copy Markdown
Contributor Author

gpunto commented May 21, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@gpunto gpunto merged commit 06299b8 into develop May 21, 2026
17 of 20 checks passed
@gpunto gpunto deleted the user-mute-icon branch May 21, 2026 14:37
@stream-public-bot stream-public-bot added the released Included in a release label May 22, 2026
@stream-public-bot
Copy link
Copy Markdown
Contributor

🚀 Available in v7.2.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.

Mute channel seems working as feature but UI is not reflecting it

3 participants