Skip to content

feat(layout): add channels unread badge to sidebar#103

Merged
prellr merged 1 commit into
mainfrom
agent/claude/49a71a46
May 16, 2026
Merged

feat(layout): add channels unread badge to sidebar#103
prellr merged 1 commit into
mainfrom
agent/claude/49a71a46

Conversation

@prellr
Copy link
Copy Markdown
Owner

@prellr prellr commented May 16, 2026

Summary

  • Adds an unread message indicator to the Channels nav item in the app sidebar, matching the visual treatment used by Ship (amber dot + count)
  • Queries the channels list when channels_enabled is set; sums unread_count across all channels
  • Shows ● N badge (amber dot + number, capped at 99+) next to Channels when there are unread messages; hidden otherwise
  • No badge rendered when channels feature is disabled or all channels are read

How it works

The channelsListOptions query (already used by the channels page) is fetched in the sidebar with the same channels_enabled guard. The sidebar already fetches Ship data the same way. The Channel.unread_count field is populated by the backend and optimistically cleared by useMarkChannelRead when the user views a channel.

Test plan

  • Open a workspace with channels enabled and unread messages — verify amber dot + count appears next to Channels in sidebar
  • Mark channels as read — verify badge disappears
  • Workspace with channels disabled — verify no query fires and no badge appears
  • Count exceeds 99 — verify "99+" is displayed

🤖 Generated with Claude Code

Mirrors the amber dot + count treatment used by the Ship Hub — queries
the channels list (only when channels_enabled) and sums unread_count
across all channels; shows a ●N badge next to Channels when N > 0.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
@prellr prellr force-pushed the agent/claude/49a71a46 branch from bd6bd1d to d119f58 Compare May 16, 2026 19:44
@prellr prellr merged commit 72a4214 into main May 16, 2026
2 checks passed
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.

1 participant