RocketChat / RocketChat/Rocket.Chat

Unread messages' badge doesn't appear for discussions and channels

Open
#23,081 7 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

Unread messages' badge is missing from channel and discussions.

Steps to reproduce:
  1. Have someone else send a message to a channel or discussion, or use an anonymous user for that
  2. The unread messages' badge does not appear
Expected behavior:

The unread badge must be visible.
Untitled

Actual behavior:

The unread badge does not appear for discussions and channels.

Server Setup Information:
  • Version of Rocket.Chat Server: 3.18.0
  • Operating System: Ubuntu 21.04
  • Deployment Method: Manual install
  • Number of Running Instances: 1
  • DB Replicaset Oplog: -
  • NodeJS Version: 12.22.1
  • MongoDB Version: 4.0.26
Client Setup Information
  • Desktop App or Browser Version: The Browser Client
  • Operating System: Windows 10 Pro Build 19042
Additional context

Here's why this happens:

In the private messages' badge element you will see a "span" element inside the "div" badge, which contains the number of unread messages:

<div class="rc-box rcx-box--full rcx-sidebar-item__badge undefined">
        <span class="rcx-box rcx-box--full rcx-badge  rcx-badge--ghost" style="flex-shrink: 0;">2</span>
</div>

This needs to happen for discussions and channels as well, but what happens is that the "span" element does not exist for them:

<div class="rc-box rcx-box--full rcx-sidebar-item__badge undefined"></div>

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the missing unread badge in the browser for a channel and a discussion, then compare their sidebar badge rendering with private messages. Trace where unread counts are passed to the channel and discussion sidebar items. Done means the unread badge and count appear consistently for both, with existing private-message behavior preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.