From 9d3bfd38b0876cd1bdf5bb90d6639f200ceb12e0 Mon Sep 17 00:00:00 2001 From: Will Pfleger Date: Wed, 24 Jun 2026 18:40:49 -0400 Subject: [PATCH] fix(desktop): restore solid dot for top-level channel unreads (#1253) Signed-off-by: Will Pfleger Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 --- .../features/sidebar/ui/SidebarSection.tsx | 36 ++++++++++++++----- desktop/tests/e2e/badge.spec.ts | 2 ++ 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/desktop/src/features/sidebar/ui/SidebarSection.tsx b/desktop/src/features/sidebar/ui/SidebarSection.tsx index 611eb5f42..1ceba1720 100644 --- a/desktop/src/features/sidebar/ui/SidebarSection.tsx +++ b/desktop/src/features/sidebar/ui/SidebarSection.tsx @@ -70,6 +70,23 @@ function UnreadCountBadge({ ); } +function UnreadDotBadge({ + channelName, + className, +}: { + channelName: string; + className?: string; +}) { + return ( + + unread + + ); +} + export type SidebarDmParticipant = { avatarUrl: string | null; label: string; @@ -233,15 +250,16 @@ export function ChannelMenuButton({ )} /> ) : null} - {hasUnread && - unreadCount > 0 && - !isActive && - channel.channelType !== "dm" ? ( - + {hasUnread && !isActive && channel.channelType !== "dm" ? ( + unreadCount > 0 ? ( + + ) : ( + + ) ) : null} ); diff --git a/desktop/tests/e2e/badge.spec.ts b/desktop/tests/e2e/badge.spec.ts index eb04ef946..0dfdfb549 100644 --- a/desktop/tests/e2e/badge.spec.ts +++ b/desktop/tests/e2e/badge.spec.ts @@ -105,6 +105,7 @@ test("regular message bolds inactive channel without numeric badge", async ({ "600", ); await expect(page.getByTestId("channel-unread-random")).toHaveCount(0); + await expect(page.getByTestId("channel-unread-dot-random")).toBeVisible(); await waitForBadgeState(page, withDotOnlyBadge(baselineBadge)); }); @@ -134,6 +135,7 @@ test("numeric badge increments for @mention in inactive channel", async ({ ); await expect(page.getByTestId("channel-unread-random")).toBeVisible(); + await expect(page.getByTestId("channel-unread-dot-random")).toHaveCount(0); await waitForBadgeState(page, withAdditionalBadgeCount(baselineBadge, 1)); });