Skip to content

fix(react): show one date divider per day in message aggregators - #1468

Open
Jaivansh-777 wants to merge 1 commit into
RocketChat:developfrom
Jaivansh-777:fix/aggregator-date-divider
Open

Jaivansh-777 wants to merge 1 commit into
RocketChat:developfrom
Jaivansh-777:fix/aggregator-date-divider

Conversation

@Jaivansh-777

Copy link
Copy Markdown

Show one date divider per day in message aggregators

Acceptance Criteria fulfillment

  • Pinned, Starred, Mentions, Threads and Search show a date divider only when the day changes
  • The first message in the list still gets a divider

Fixes #1466

Changes

  • MessageAggregator.js: isMessageNewDay is now !previous || !isSameDay(...). The shouldRender(previous) check was always true because useSetMessageList already filters the list with shouldRender. This matches the logic in ThreadMessageList.

Video/Screenshots

I don't have a Rocket.Chat server set up locally yet, so I'll check it on the PR preview once it's deployed and add before/after screenshots here.

PR Test Details

  • eslint on the changed file: no errors
  • prettier --check: passes
  • yarn build in packages/react: passes

Note: The PR will be ready for live testing at https://rocketchat.github.io/EmbeddedChat/pulls/pr-<pr_number> after approval.

The aggregator list is already filtered with shouldRender, so
shouldRender(previous) was always true and isMessageNewDay returned true
for every message. Pinned, Starred, Mentions, Threads and Search showed a
date divider above each message. Compare only the message days.
@Jaivansh-777
Jaivansh-777 force-pushed the fix/aggregator-date-divider branch from ea18a4d to 681ede9 Compare November 27, 2026 08:59

This branch has not been deployed

No deployments
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.

Message aggregator panels show a date divider above every message

1 participant