Skip to content

Message separator currently displays date instead of “Today” for current day messages #40588

@psshrijith

Description

@psshrijith

Description

In the chat message list, the date separator currently displays the full formatted date even for messages sent on the current day.

Example: MAY 17, 2026
Instead, it should display a more user-friendly label such as: Today

Current Behavior

The MessageSeparator component always formats the separator using:

t('message_separator_date', {
  val: new Date(date),
  formatParams: {
    val: {
      month: 'short',
      day: '2-digit',
      year: 'numeric',
    },
  },
})

As a result, today's messages also show the full date.

Expected Behavior

Current day messages should display: Today
Previous day messages can optionally display: Yesterday
Older messages should continue displaying formatted dates.

Suggested Fix

Update the MessageSeparator component to check whether the message date belongs to the current day before formatting the date.

before applying the default date formatter.

Example:
if (isToday(date)) return t('today');
if (isYesterday(date)) return t('yesterday');

Benefits

  • Improves readability and UX
  • Matches common chat application behavior (WhatsApp, Slack, Discord, etc.)
  • Makes recent conversations easier to understand quickly

Affected Component

MessageSeparator

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions