Skip to content

feat(chat): show timestamps on chat message bubbles - #4372

Open
terrytangyuan wants to merge 4 commits into
omnigent-ai:mainfrom
terrytangyuan:feat/chat-message-timestamps
Open

feat(chat): show timestamps on chat message bubbles#4372
terrytangyuan wants to merge 4 commits into
omnigent-ai:mainfrom
terrytangyuan:feat/chat-message-timestamps

Conversation

@terrytangyuan

@terrytangyuan terrytangyuan commented Aug 7, 2026

Copy link
Copy Markdown
Member

Related issue

N/A

Summary

  • Surface the persisted created_at field (already stored on every ConversationItem) through the API by including it in to_api_dict().
  • Propagate the timestamp through the frontend pipeline: BaseItemBlockContextBubble types.
  • Render a muted timestamp label beneath each user and assistant message bubble — time-only for today, date + time for older messages.

Test Plan

  • Existing unit tests for renderItems (84 tests) and itemsToBlocks all pass unchanged.
  • Existing Python tests for to_api_dict (56 tests) all pass.
  • TypeScript compiles cleanly (tsc --noEmit).
  • Manual verification: load a session with history and confirm timestamps appear on each message.

Demo

image

Type of change

  • Bug fix
  • Feature
  • UI / frontend change
  • Refactor / chore
  • Docs
  • Test / CI
  • Breaking change

Test coverage

  • Unit tests added / updated
  • Integration tests added / updated
  • E2E tests added / updated
  • Manual verification completed
  • Existing tests cover this change
  • Not applicable

Coverage notes

All existing unit tests pass without modification. Manual verification confirms timestamps render correctly on both user and assistant bubbles for today's messages (time only) and historical messages (date + time).

Changelog

Chat messages now show a timestamp beneath each bubble

@github-actions github-actions Bot added the size/M Pull request size: M label Aug 7, 2026
@github-actions
github-actions Bot requested a review from daniellok-db August 7, 2026 19:07
@terrytangyuan
terrytangyuan force-pushed the feat/chat-message-timestamps branch 2 times, most recently from 0f4f634 to 01a1af9 Compare August 7, 2026 19:18
@terrytangyuan
terrytangyuan marked this pull request as draft August 7, 2026 19:24
@terrytangyuan
terrytangyuan force-pushed the feat/chat-message-timestamps branch 2 times, most recently from 87d116d to 7334094 Compare August 7, 2026 19:29
Surface the persisted `created_at` timestamp through the API and render
it beneath each user and assistant message bubble. Today's messages show
time only; older messages include the date.

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
@terrytangyuan
terrytangyuan force-pushed the feat/chat-message-timestamps branch from 7334094 to 85745a6 Compare August 7, 2026 19:35
Wrap the user bubble content row and timestamp/actions row in a
shared flex-col container with w-fit + items-end so the timestamp
right-aligns with the bubble's actual width instead of spanning the
full Message container. Also tighten vertical gap from mt-1 to mt-0.5
for both user and assistant timestamps.

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
@terrytangyuan
terrytangyuan marked this pull request as ready for review August 7, 2026 19:41
@github-actions github-actions Bot added size/L Pull request size: L and removed size/M Pull request size: M labels Aug 7, 2026
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
The timestamp/actions div was always rendered, adding an empty child
to fold-only bubbles and breaking the test that asserts a single
child for collapsed turns.

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L Pull request size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants