From d1ebcff7408db724c7a0e3cfd5758e8b62beaaf2 Mon Sep 17 00:00:00 2001 From: Ben Davis <45952064+bmdavis419@users.noreply.github.com> Date: Mon, 27 Jul 2026 13:52:08 -0700 Subject: [PATCH] feat: delivery headers show relative time, exact date on hover MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Home thread's delivery header showed a bare wall-clock time ("7:33 PM"), which answers the wrong question for messages that arrive while you're away: what matters at a glance is how stale the delivery is. The header now renders "12m ago" / "3h ago" / "2d ago" via the existing formatRelativeTimeLabel scale, with the full time-and-date tooltip on hover. useNowMinute drives re-renders so an open thread doesn't freeze at "1m ago" — the label's own granularity is never finer than a minute, so a minute tick is exact. Co-Authored-By: Claude Fable 5 --- .../src/components/chat/MessagesTimeline.tsx | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/apps/web/src/components/chat/MessagesTimeline.tsx b/apps/web/src/components/chat/MessagesTimeline.tsx index e0f2fa33c2..11e3133a68 100644 --- a/apps/web/src/components/chat/MessagesTimeline.tsx +++ b/apps/web/src/components/chat/MessagesTimeline.tsx @@ -103,7 +103,12 @@ import { import { cn } from "~/lib/utils"; import { useUiStateStore } from "~/uiStateStore"; import { type TimestampFormat } from "@t3tools/contracts/settings"; -import { formatChatTimestampTooltip, formatShortTimestamp } from "../../timestampFormat"; +import { + formatChatTimestampTooltip, + formatRelativeTimeLabel, + formatShortTimestamp, +} from "../../timestampFormat"; +import { useNowMinute } from "../../hooks/useNowMinute"; import { buildInlineTerminalContextText, @@ -1027,17 +1032,24 @@ function TurnFoldTimelineRow({ row }: { row: Extract} > - {timestamp} + {relativeLabel} {timestampTooltip} @@ -1082,7 +1094,7 @@ function AssistantTimelineRow({ row }: { row: Extract