Skip to content

bug: "Last login" shows ambiguous weekday with no date for logins older than today #1313

Description

@yash113gadia

Description

In the User Information panel, the Last login field uses formatTimestamp (packages/react/src/lib/formatTimestamp.js), which renders any timestamp that isn't from today as just a weekday + time, with no date:

return isDifferentDay
  ? `${date.toLocaleDateString('en-US', { weekday: 'long' })} ${formattedTime}`
  : formattedTime;

isDifferentDay is only "not today", so every past login collapses to a bare weekday. A login from 3 months ago — or even over a year ago — shows the same kind of string as one from last week, with no way to tell them apart.

Steps to reproduce

  1. Open the User Information panel for a user whose last login was more than a few days ago.
  2. Look at the Last login field.

Actual behavior

The field shows only a weekday and time, e.g.:

login 90 days ago : "Tuesday 10:49 PM"   (actual: Tue Mar 03 2026)
login 400 days ago: "Sunday 10:49 PM"    (actual: Apr 27 2025 — over a year ago)

A 14-month-old login is indistinguishable from a recent one, and no year is ever shown.

Expected behavior

For timestamps that aren't from today, show an unambiguous date (with year), e.g. "Mar 3, 2026, 10:49 PM".

Notes

The codebase already does this correctly elsewhere — the adjacent created at field uses formatTimestampGetDate ("March 5, 2026"), and Message.js formats dates via date-fns format(date, 'MMMM d, yyyy'). So this is an inconsistency in formatTimestamp specifically.

I found this while reading the date-formatting helpers and would like to work on it.

File: packages/react/src/lib/formatTimestamp.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions