Skip to content

Commit f759d75

Browse files
laneysmithcodex
andauthored
fix(channels): keep muted DM names from becoming bold (#2184)
## Problem Muted channels stay quiet when new messages arrive, but muted DMs still become bold. The two behave inconsistently. ## Solution Apply the same confirmed-mute rule to DM name emphasis. Unmuting restores unread emphasis, and manual unread still makes the name bold without clearing unread evidence. The bells and hidden muted unread dots from [#2175](#2175) are already on `main` and remain in place. ## Test steps - `bin/pnpm exec vitest run src/bundled/channels/ChannelSidebarItem.test.tsx src/app/shell/BestieNavigation.test.tsx`: 21 passed on `49afe73a9`. Restoring the old DM rule makes the regression checks fail. No browser test cases added or removed. - Required push checks passed on `49afe73a9`, including TypeScript, related unit tests, and design checks. Independent review found no blockers. - Production-component browser previews checked both themes, 390px/1200px widths, 200% text, keyboard/pointer selection, and mute/unmute recovery. The muted DM loses boldness while its bell stays visible and unread dots stay hidden. - Human/native acceptance pending: mute a DM, receive a message, confirm its name stays regular-weight, then unmute and confirm unread emphasis returns. ## Videos and Screenshots Production sidebar component with synthetic unread messages. Before is `main` at `baea050c6`; after is `49afe73a9`, at identical dimensions. Only the muted DM name’s weight changes. Live-account/native integration remains unverified. | Before | After | | --- | --- | | ![Muted unread DM with a bold name and a mute bell](https://github.com/user-attachments/assets/96598a8a-73f3-4d9b-978c-b4dc575ee3eb) | ![Muted unread DM with a regular-weight name and the same mute bell](https://github.com/user-attachments/assets/44d5d6af-74c2-4b1a-9880-b8e38973a654) | --------- Signed-off-by: Laney Pouzet <[email protected]> Co-authored-by: Codex <[email protected]>
1 parent 39d61cd commit f759d75

6 files changed

Lines changed: 12 additions & 18 deletions

File tree

‎docs/buzz-help.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ that agent in Buzz; they do not notify the external app through this connection.
123123
grants access.
124124
- **Mute** is available from a channel or DM's sidebar context menu. Once
125125
confirmed, a crossed-out bell appears immediately after its name. New messages
126-
do not make muted channel names bold; muted DM names still become bold.
126+
do not make muted channel or DM names bold.
127127
Mute suppresses notifications for messages that do not mention you; mentions can still notify
128128
you. Unmute restores ordinary unread emphasis and dots. Manual **Mark as unread**
129129
can still make the name bold. Muted rows show no unread dots, including thread

‎docs/notifications.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ checks, not that an OS banner was displayed or read.
8484
styling and offscreen cues without clearing unread evidence. Muted channel and
8585
DM sidebar rows show a crossed-out bell immediately after their names and hide
8686
unread dots, including thread dots. Manual unread can still emphasize
87-
the name, and thread activity remains available. Muted DMs retain automatic
88-
unread emphasis, offscreen unread counts and avatar previews. Solo chat labels
87+
the name, and thread activity remains available. Muted DMs also suppress automatic
88+
unread emphasis; offscreen unread counts and avatar previews remain. Solo chat labels
8989
retain unread emphasis. Unread thread cues are distinct from participating-thread alerts,
9090
which mute suppresses. Unknown or failed
9191
preference reads hold non-mention candidates until explicit retry; a confirmed

‎docs/unread.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,14 @@ or local manual intent strengthens the channel label; protected attention alone
170170
retains its dot without bolding a caught-up, unmuted channel. Confirmed-muted channels
171171
suppress ordinary automatic unread styling and offscreen cues without clearing
172172
unread evidence; explicit manual unread can still strengthen the label.
173-
Pending or failed mute changes do not suppress these cues. Muted DMs retain
174-
automatic unread bolding, “N unread” offscreen counts and avatar previews. Muted
173+
Pending or failed mute changes do not suppress these cues. Muted DMs also suppress
174+
automatic unread bolding; “N unread” offscreen counts and avatar previews remain. Muted
175175
channel and DM sidebar rows show a crossed-out bell immediately after their names,
176176
even with no unread activity. They hide all unread dots, including
177177
thread activity dots. Thread activity remains available through the row's activity popover,
178178
and its unread count remains accessible to assistive technology. Unmute restores
179179
the dots from retained unread evidence. The promoted Bestie DM also hides muted
180-
unread dots; its label keeps ordinary DM unread emphasis.
180+
unread dots; its label follows the same mute rule.
181181
Solo chat labels strengthen for any observed unread message, including mentions,
182182
broadcasts and relevant replies, even when muted, so Solo rows omit the attention dot.
183183
Ordinary unread renders no row marker. Unmuted DMs, mentions, broadcasts, and

‎src/app/shell/BestieNavigation.test.tsx‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -422,10 +422,7 @@ it("honors the promoted DM's mute and unread state through reads and Bestie repl
422422
within(row()).getByRole("img", { name: /1 observed unread messages/ }),
423423
).toBeInTheDocument();
424424
expect(row().querySelector("[data-channel-priority]")).toBeNull();
425-
expect(row().querySelector("[data-bestie-unread]")).toHaveAttribute(
426-
"data-bestie-unread",
427-
"true",
428-
);
425+
expect(row().querySelector("[data-bestie-unread]")).toBeNull();
429426
expect(dmRow()).toBeNull();
430427
await act(async () => {
431428
muted = false;
@@ -440,10 +437,7 @@ it("honors the promoted DM's mute and unread state through reads and Bestie repl
440437
muted = true;
441438
await preferences.queries.refresh();
442439
});
443-
expect(row().querySelector("[data-bestie-unread]")).toHaveAttribute(
444-
"data-bestie-unread",
445-
"true",
446-
);
440+
expect(row().querySelector("[data-bestie-unread]")).toBeNull();
447441
expect(row().querySelector("[data-channel-activity]")).toBeNull();
448442
expect(row()).toHaveAccessibleName(/1 unread thread/);
449443
expect(dmRow()).toBeNull();

‎src/bundled/channels/ChannelSidebarItem.test.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -631,9 +631,9 @@ it.each([
631631
act(() => state.unread(2));
632632
expect(row()).toHaveAttribute("data-ordinary");
633633
act(() => state.mute(true));
634-
expect(row()?.hasAttribute("data-ordinary")).toBe(channelType === "dm");
634+
expect(row()).not.toHaveAttribute("data-ordinary");
635635
act(() => state.unread(3, 0));
636-
expect(row()?.hasAttribute("data-ordinary")).toBe(channelType === "dm");
636+
expect(row()).not.toHaveAttribute("data-ordinary");
637637
expect(
638638
view.container.querySelectorAll("[data-channel-unread]"),
639639
).toHaveLength(mutedIndicators);
@@ -651,7 +651,7 @@ it.each([
651651
).toHaveLength(mutedIndicators);
652652
act(() => state.mute(true));
653653
act(() => state.unread(4, 1));
654-
expect(row()?.hasAttribute("data-ordinary")).toBe(channelType === "dm");
654+
expect(row()).not.toHaveAttribute("data-ordinary");
655655
expect(view.container.querySelector("[data-channel-priority]")).toBeNull();
656656
expect(
657657
screen.getByRole("img", { name: /4 observed unread messages/ }),

‎src/bundled/channels/UnreadBadge.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function ordinaryUnread(
2020
const count = snapshot.observedCount ?? 0;
2121
return (
2222
snapshot.manual !== "none" ||
23-
(dm ? count > 0 : !muted && count > (snapshot.attentionCount ?? 0))
23+
(!muted && (dm ? count > 0 : count > (snapshot.attentionCount ?? 0)))
2424
);
2525
}
2626

0 commit comments

Comments
 (0)