Chat: show a datetime on each message (bottom-right) - #308
Merged
Conversation
Visualize the per-message created_at (already persisted server-side and preserved by hydrateMessage on history load) as a compact local datetime in the bottom-right corner of every user prompt and assistant reply. The label reuses the collapsed session-group counter styling (text-[10px] text-text-faint/60 tabular-nums); full precision on hover. Live (just-sent / just-streamed) messages are created client-side without a server timestamp, so stamp them with the client clock at creation, so the current turn shows a time immediately without needing a reload. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
pufit
approved these changes
Aug 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a compact local datetime to the bottom-right corner of every user prompt and assistant reply in the chat view.
text-[10px] text-text-faint/60 tabular-nums); full precision on hover viatitle.Aug 13, 2:41 AM(locale-aware; yearless, no seconds).How
Pure visualization of data that already exists: every message row persists
created_at,GET /api/sessions/{id}/messagesreturns it, andhydrateMessagealready copies it ontoChatMessageon history load. So historical/reloaded messages needed only a render.Live (just-sent / just-streamed) messages are built client-side without a server timestamp, so they're stamped with the client clock at creation — the current turn shows a time immediately without a reload. Stamp sites: optimistic send (
chatStore), assistant finalize done/stopped (streamingHandlers), backstop-finalize / answer-injected / cross-client user (sessionHandlers).Files
web/src/utils/messageTime.ts—formatMessageTime()web/src/components/Chat/{UserMessage,AssistantMessage}.tsx— renderweb/src/stores/chatStore.ts,web/src/stores/handlers/{streamingHandlers,sessionHandlers}.ts— client-stamp live messagesNotes
Test
npm run build(tsc typecheck + vite bundle) — green.🤖 Generated with Claude Code