Message aggregator panels show a date divider above every message

Open
#1,466 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@Jaivansh-777 is already working on this.

Since Nov 27, 2026.

  • #1468 by @Jaivansh-777 — open

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
1/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
javascript, react
Domain
frontend

Research direction

The issue points to packages/react/src/views/MessageAggregators/common/MessageAggregator.js and names ThreadMessageList as a comparison. Read the isMessageNewDay logic and check how the message list is filtered; done means same-day messages share one date divider, matching the main chat. A linked pull request (#1468) is already open.

Written by the indexing model from the issue text.

Description

bug
Description:

In Pinned, Starred, Mentions, Threads and Search, a date divider shows up above every single message, even when they're all from the same day.

isMessageNewDay in packages/react/src/views/MessageAggregators/common/MessageAggregator.js:

const isMessageNewDay = (current, previous) =>
  !previous ||
  shouldRender(previous) ||
  !isSameDay(new Date(current.ts), new Date(previous.ts));

The list this runs over comes from useSetMessageList, which already does messages.filter(shouldRender). So shouldRender(previous) is always true after the first message, and every message gets a divider.

Steps to reproduce:
  1. Pin (or star) two or more messages sent on the same day
  2. Open the Pinned (or Starred) panel
Expected behavior:

One date divider per day, like in the main chat.

Actual behavior:

A date divider above every message.

Fix is a one-liner: drop shouldRender(previous) || so it's just !previous || !isSameDay(...), which is what ThreadMessageList already does. I'll open a PR.

Dominant language
JavaScript
Stars
171
Forks
421
Avg merge
3d 6h
Merged PRs (30d)
4

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No 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.

More from RocketChat/EmbeddedChat

All issues in RocketChat/EmbeddedChat

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.