Skip to content

fix(desktop): restore channel unread badges#1218

Merged
wesbillman merged 1 commit into
mainfrom
pinky/unread-badges-regression
Jun 23, 2026
Merged

fix(desktop): restore channel unread badges#1218
wesbillman merged 1 commit into
mainfrom
pinky/unread-badges-regression

Conversation

@wesbillman

@wesbillman wesbillman commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • restore interested non-DM thread replies to channel unread tracking so the channel row gets a numeric unread badge again
  • keep thread-reply unread bookkeeping separate from generic channel dock-bounce behavior so thread-reply notification settings remain authoritative
  • split sidebar badge counts from desktop app badge state so ordinary channel messages bold the sidebar row without a numeric channel badge, while still lighting the desktop app badge dot
  • keep DMs, mentions, broadcast replies, and interested thread replies numeric where expected
  • update E2E expectations for Slack-style channel unreads and restored thread-reply channel badges
  • remove the vestigial always-true routing helper after review feedback

Validation

  • bin/pnpm --dir desktop exec tsc --noEmit
  • bin/pnpm --dir desktop check:file-sizes
  • bin/pnpm --dir desktop exec biome check src/app/AppShell.tsx src/app/AppShell.helpers.ts src/app/AppShell.helpers.test.mjs
  • bin/pnpm --dir desktop exec biome check src/app/AppShell.tsx tests/e2e/badge.spec.ts
  • bin/pnpm --dir desktop exec biome check tests/e2e/channels.spec.ts tests/e2e/thread-unread-screenshots.spec.ts
  • bin/pnpm --dir desktop test -- src/app/AppShell.helpers.test.mjs (desktop suite: 1100 pass)
  • bin/pnpm --dir desktop test -- src/features/channels/unreadReadMarker.test.mjs (desktop suite: 1097 pass)
  • bin/pnpm --dir desktop check
  • bin/pnpm --dir desktop build
  • bin/pnpm --dir desktop exec playwright test tests/e2e/badge.spec.ts --project=smoke (8 pass)
  • bin/pnpm --dir desktop exec playwright test tests/e2e/channels.spec.ts --project=smoke --grep "sidebar shows unread indicator for (newly active channels|new forum posts)" (2 pass)
  • bin/pnpm --dir desktop exec playwright test tests/e2e/thread-unread-screenshots.spec.ts --project=smoke --grep "(11-thread-reply-lights-sidebar-badge-after-channel-view|12-thread-reply-lights-all-replies-sidebar-badge)" (2 pass)
  • pre-push hook: desktop-test, mobile-test, rust-tests, desktop-tauri-test all passed

@wesbillman

Copy link
Copy Markdown
Collaborator Author

@codex please review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4791a23249

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

)
) {
} else {
options.onChannelMessage?.(channelId, event);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep thread replies off the generic channel alert path

When an interested non-DM thread reply arrives, this new unconditional onChannelMessage call runs before the thread-specific callback. In AppShell, onChannelMessage is wired to handleChannelNotification, which calls requestDockBounce() whenever desktop notifications are enabled, while handleThreadReplyDesktopNotification is the path that respects slotAlertsEnabled.thread_reply. This means users who disable Thread replies still get dock attention for those replies; keep the unread bookkeeping separate from the generic channel alert callback or gate this call for thread replies.

Useful? React with 👍 / 👎.

@wesbillman wesbillman force-pushed the pinky/unread-badges-regression branch 2 times, most recently from 7b1a060 to 627e784 Compare June 23, 2026 20:36
Treat interested non-DM thread replies as channel unread events again while keeping normal channel messages dot-only. Split sidebar badge counts from desktop app badge state so mentions/DMs/thread replies remain numeric, ordinary channel traffic only bolds the row, and any channel unread still lights the desktop app badge dot.

Co-authored-by: Pinky <44b8e82baa6e0e254e0208d68f335c283c94e7b78dd1fa10d5a49d3f13dd0435@sprout-oss.stage.blox.sqprod.co>
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
@wesbillman wesbillman force-pushed the pinky/unread-badges-regression branch from 627e784 to ed50e2b Compare June 23, 2026 20:43
@wesbillman wesbillman merged commit 89aaa26 into main Jun 23, 2026
25 checks passed
@wesbillman wesbillman deleted the pinky/unread-badges-regression branch June 23, 2026 20:59
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