镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fix(notifications): keep muted channel backlog off the Dock dot - #2295

Closed
eeSeeGee wants to merge 1 commit into
block:mainfrom
eeSeeGee:fix/muted-dock-dot
Closed

eeSeeGee wants to merge 1 commit into
block:mainfrom
eeSeeGee:fix/muted-dock-dot

Conversation

@eeSeeGee

@eeSeeGee eeSeeGee commented Nov 3, 2026 •

Copy link
Copy Markdown

Problem

#2004 stopped ordinary unread messages from showing on muted channels in the sidebar. The macOS Dock dot still counted them. So a muted channel with ordinary messages could keep the Dock dot on while the sidebar showed nothing unread.

Refs AIDA-2344. This fixes the muted-channel cause only; unread in archived or hidden channels and closed DMs can still light the dot and is not changed here.

Solution

The Dock dot now uses the same rule as the sidebar row. I moved that rule from useUnreadState into src/features/channels/channel-unread.ts, and both UnreadBadge and bindUnreadIndicator use it.

  • A confirmed mute stops ordinary messages from lighting the dot. Manual unread and messages that need attention still light it.
  • DMs and Solo chats ignore mute, as their sidebar rows do.
  • The binding also follows sidebarPreferences, so muting or unmuting updates the dot without a new message.
  • A mute change still in progress, or preferences not loaded yet, quiets nothing.
  • No relay reads are added.

docs/notifications.md no longer says mute is deliberately ignored, and docs/buzz-help.md gets one line on mute and the Dock.

For reviewers: a mention in a muted channel lights the Dock dot, but the muted sidebar row stays quiet. Mute hides the row's dots, and the name isn't bolded for attention. This PR keeps the dot on for that case, because a mention is the one thing you'd want to see in a muted channel. Whether the muted row should show it is #2004's decision, outside this change.

#2184 changes how muted DMs are bolded (ordinaryUnread), not this rule, so muted DMs still light the dot either way. #2277 touches indicator-unread.ts too, so expect a small conflict.

Test steps

  • New tests in src/features/notifications/indicator-unread.test.ts:
    • Ordinary messages in a muted channel stay off the dot, and unmuting and re-muting flip it with no new message.
    • Mentions and manual unread still light a muted channel.
    • Muted DMs and Solo chats still light the dot.
  • Without the indicator-unread.ts change, the muted-channel test and the mention/manual-unread test both fail. The DM/Solo test passes either way, as it should, since that behavior is unchanged.
  • Full vitest run on ccff73e: 886 test files passed and 7 skipped; 15,745 tests passed and 21 skipped.
  • tsc --noEmit, biome, and the pre-commit and pre-push hooks pass.
  • No browser test cases added or removed.
  • An independent agent review found nothing blocking.
  • Not done yet: checking the native macOS Dock.
    1. Mute a channel and have someone post an ordinary message in it. The Dock dot should stay off.
    2. Unmute it. The dot should appear.
    3. Mute it again and have someone @mention you there. The dot should appear.

🤖 Generated with Claude Code

block#2004 quieted ordinary unread for confirmed-muted channels in the
sidebar but left the macOS Dock dot counting it, so a muted channel's
backlog could keep the dot on with nothing unread in the sidebar.

The Dock binding now uses the sidebar's own row rule, moved to
features/channels/channel-unread.ts and shared with UnreadBadge:
confirmed mute quiets ordinary backlog, while manual unread and
attention still count. DMs and Solo chats ignore mute, as their
sidebar rows do. The binding also follows sidebar preferences, so mute
and unmute recompute the dot without a new message.

Co-authored-by: Robert the Fabricator <56cd60af5ced82e809b11f226df24e5972e251b0e20ca1af4141d2b276410ee0@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Aaron Young <young@squareup.com>
@eeSeeGee

eeSeeGee commented Nov 3, 2026

Copy link
Copy Markdown
Author

🤖 Waiving the native macOS Dock check for this PR. The change only alters the boolean the host passes to the existing unread_indicator_set command; the native badge path is untouched and already works in the shipped app. The projection logic is covered by the new indicator-unread tests (the muted-backlog and mention/manual-unread cases fail on main and pass here), two independent full Vitest runs (15,745 passed), and green CI. I'll confirm the real-world behaviour in the next release.

@eeSeeGee
eeSeeGee marked this pull request as ready for review November 3, 2026 19:07
@eeSeeGee
eeSeeGee requested a review from a team as a code owner November 3, 2026 19:07

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

Kyle reviewed this PR and the Nexus review-tracker notes and approved with no comments.

— Posted by Codex (gpt-6.1-sol) on behalf of kylez

@eeSeeGee

eeSeeGee commented Nov 6, 2026

Copy link
Copy Markdown
Author

🤖 Closing as superseded by #2313, which fixed the same AIDA-2344 muted-channel Dock dot bug on main. The remaining differences here (mentions, manual unread, and muted DMs/Solo chats still lighting the dot) are policy choices, and #2313's "muted means quiet" stands. If muted-channel mentions should light the Dock dot, that belongs in a small separate PR. Thanks for the approval.

@eeSeeGee eeSeeGee closed this Nov 6, 2026
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