feat(web): reveal timestamps on tool rows and turn folds #8641
Mergedsaphid(GitHub profile, opens in a new tab)merged 2 commits into
main fromrefs/pull/8641/headmerged by shivamhwp(GitHub profile, opens in a new tab) View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
- apps/web/src/components/chat/MessagesTimeline.tsx line 1218OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -1178,6 +1212,7 @@11781212 aria-expanded={row.expanded}11791213 data-scroll-anchor-ignore11801214 onClick={() => ctx.onToggleTurnFold(row.turnId)}1181- className="flex cursor-pointer select-none items-center gap-1 rounded-md px-1 text-sm leading-relaxed text-muted-foreground tabular-nums transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/70"1215+ className="group/timeline-row flex cursor-pointer select-none items-center gap-1 rounded-md px-1 text-sm leading-relaxed text-muted-foreground tabular-nums transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/70"11821216 >11831217 <span>{row.label}</span>1218+ <TimelineRowTimestamp createdAt={row.createdAt} timestampFormat={ctx.timestampFormat} />
- apps/web/src/components/chat/MessagesTimeline.tsx lines 1191 to 1193OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -1169,0 +1173,21 @@1173+ * carries the `group/timeline-row` class that drives the reveal; keyboard1174+ * focus anywhere in that parent reveals it too, since the span itself is not1175+ * focusable. Rows without any other focusable element pass1176+ * `keyboardReachable` so the span becomes the tab stop and tooltip target.1177+ */1178+function TimelineRowTimestamp({1179+ createdAt,1180+ timestampFormat,1181+ keyboardReachable = false,1182+}: {1183+ createdAt: string;1184+ timestampFormat: TimestampFormat;1185+ keyboardReachable?: boolean;1186+}) {1187+ return (1188+ <Tooltip>1189+ <TooltipTrigger1190+ render={1191+ <span1192+ className="me-1 shrink-0 rounded-md text-muted-foreground text-xs tabular-nums opacity-0 transition-opacity duration-200 group-hover/timeline-row:opacity-100 group-focus-within/timeline-row:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/70"1193+ {...(keyboardReachable ? { tabIndex: 0 } : {})}
- apps/web/src/components/chat/MessagesTimeline.tsx line 1893OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -1855,8 +1885,9 @@18551885 <SimpleWorkEntryRow18561886 key={item.id}18571887 workEntry={item}1888+ timestampFormat={timestampFormat}18581889 workspaceRoot={workspaceRoot}18591890 isExpandedToolGroupEntry18601891 />18611892 ),1862- [workspaceRoot],1893+ [timestampFormat, workspaceRoot],
- apps/web/src/components/chat/MessagesTimeline.tsx lines 2086 to 2098Resolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -1767,0 +1772,21 @@1772+ * the time without adding a tab stop. Hidden timestamps stay outside the row1773+ * layout. Visibility changes immediately so leaving flow cannot overlap text1774+ * during a fade-out.1775+ */1776+function TimelineRowTimestamp({1777+ createdAt,1778+ timestampFormat,1779+}: {1780+ createdAt: string;1781+ timestampFormat: TimestampFormat;1782+}) {1783+ return (1784+ <Tooltip>1785+ <TooltipTrigger1786+ render={1787+ <span className="pointer-events-none absolute me-1 shrink-0 whitespace-nowrap rounded-md text-muted-foreground text-xs tabular-nums opacity-0 group-hover/timeline-row:pointer-events-auto group-hover/timeline-row:static group-hover/timeline-row:opacity-100 group-focus-within/timeline-row:pointer-events-auto group-focus-within/timeline-row:static group-focus-within/timeline-row:opacity-100" />1788+ }1789+ >1790+ {formatDayAwareTimestamp(createdAt, timestampFormat)}1791+ </TooltipTrigger>1792+ <TooltipPopup>{formatChatTimestampTooltip(createdAt, timestampFormat)}</TooltipPopup>
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
shivamhwp(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.







Note
Reviews paused#
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
reviews.auto_review.auto_pause_after_reviewed_commitssetting.Use the following commands to manage reviews:
@coderabbitai resumeto resume automatic reviews.@coderabbitai reviewto trigger a single review.Use the checkboxes below for quick actions:
📝 Walkthrough
Walkthrough#
Timeline rows now show formatted creation timestamps on hover or focus, with full-date tooltips. Turn, work-group, and plain work rows use the shared timestamp component. Tests reapply browser-like DOM globals before each test.
Changes#
Timeline timestamp display
apps/web/src/components/chat/MessagesTimeline.tsxTimelineRowTimestampwith formatted time text, full-date tooltip content, and hover or focus visibility.apps/web/src/components/chat/MessagesTimeline.tsx,apps/web/src/components/chat/MessagesTimeline.test.tsxElementStubvalues through the global and mockedwindowobjects before each test.Priority: ⬇️ Low
Estimated code review effort: 1 (Trivial) | ~5 minutes
Change: Feature
Suggested reviewers:
maria-rcks,juliusmarminge,t3dotggMerge Risk: 🔵 Low · up to
e0b4dHovering or focusing a timeline row can compress or shift its content; the issue is localized and straightforward to fix.
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)#
✅ Passed checks (4 passed)
✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment `@coderabbitai help` to get the list of available commands.