Skip to content

fix(session-ui): show dates in message timestamps - #45590

Closed
Abdul535 wants to merge 3 commits into
anomalyco:devfrom
Abdul535:message-timestamps
Closed

Abdul535 wants to merge 3 commits into
anomalyco:devfrom
Abdul535:message-timestamps

Conversation

@Abdul535

@Abdul535 Abdul535 commented Aug 27, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #44936

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Message metadata previously displayed only the creation time, making timestamps from older messages ambiguous.

This change displays locale-aware labels:

  • Today and yesterday include the time.
  • Older messages show a short date.
  • Messages from previous years also include the year.
  • Hovering the timestamp shows the full localized date and time.

The formatter compares local calendar dates and uses Intl.DateTimeFormat and Intl.RelativeTimeFormat, so formatting follows the user's locale.

How did you verify your code works?

  • Ran the complete session-ui test suite: 88 tests passed.
  • Ran bun typecheck in packages/session-ui.
  • Added tests covering today, yesterday, older dates, previous years, and non-English formatting.
  • The repository pre-push typecheck also passed.

Screenshots / recordings

before
image
after
image

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@Abdul535
Abdul535 changed the base branch from dev to v2 September 13, 2026 07:05
@Abdul535
Abdul535 changed the base branch from v2 to dev September 13, 2026 07:06
@github-actions

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

@vadimmg-cmd

Copy link
Copy Markdown

Hi Abdul535 — your PR was closed by the automated PR cleanup bot, not by a
review decision: it was created more than a month ago and had fewer than 2
positive reactions. The feature itself is exactly what's still missing.

Could you reopen it? I'd also be happy to test it on Windows / OpenCode
Desktop 1.19.3 and report back. I added a 👍 so it doesn't get cleaned up
again.

For context: the same request is tracked in #44588, and #58034 asks for the
same thing as a configurable format. If the project prefers a setting over a
fixed format, that would work too — the important part is having the date
there at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Desktop: user message hover timestamps should include the date, not just the clock time

2 participants