Repository navigation
Show native chat message timestamps on hover - #19218
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughAdds Merge Risk: ⚪ Minimal · up to Native chat messages now show localized timestamps on hover or keyboard focus, while invalid or unavailable times remain hidden. The change preserves existing message behavior and has no active merge-blocking risk. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
NativeChatMessageTimestamp— a new<time>component rendering a short localized time (Intlhour/minute) with a fullaria-labeland semantic ISOdatetime; returnsnullfor missing/invalid timestamps, caches formatters keyed ongetIntlLocale(), and opts into a keyboard focus target only when requested.NativeChatMessageRow— user rows gain agroupcontainer and a focusable timestamp; agent rows forwardmessage.timestampinto their existing hover controls.NativeChatAgentControls— accepts a requiredtimestampand appends a non-focusable timestamp after the scroll button; the sole caller is updated.- Tests — two suites covering control ordering/reveal, the user-bubble focus target, omission of unknown/invalid timestamps, chrome-free
reasoning/systemrows, and re-render on language change.
The change is small, self-contained, and reads existing renderer data only — no wire, schema, or execution-boundary impact. Timestamp validity checks (null guard plus Number.isNaN(date.getTime())) are sound and cover both overflow directions, and date.toISOString() cannot throw on the surviving valid range. The useTranslation() subscription and module-level formatter cache match existing repo patterns (SidebarHeader, weekday-names.ts), and tests assert exact values rather than looser pass-throughs.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
Status: ready for mergePlan reviewReviewed before any code was written, against the actual source. Verdict APPROVE, no required amendments. One optional refinement was taken: the timestamp is keyboard-focusable only on user rows, since agent rows already have two focusable controls in the hover cluster and a third tab stop per row would add real navigation cost in a long transcript. Code review loopSame-model subagent review returned clean with no meaningful fixes warranted, so nothing was pushed. Manual UI validationDriven in a real Electron instance over CDP against a hidden renderer (
Notes for the reviewer
Process deviation, stated plainlyThe review loop's
|
ELI5 — what this PR actually doesThe problem in one sentence. The chat never tells you when anything happened. Scrolling back through a long session, every message looks equally recent — you can't tell if the agent answered that two minutes ago or two hours ago. What this adds. Hover any message and its time appears. Move away and it disappears again. Why hover-only. A timestamp on every row, permanently, is visual noise on a surface you read top-to-bottom all day. You almost never need the time — but when you do (did this run before or after I changed that file?) you really need it. Hover keeps it available and invisible. Before → After
Notes
|
…cus (#19426) * fix(native-chat): reveal message chrome on keyboard focus, not any focus `:focus-within` cannot tell a mouse click from a keyboard tab, so clicking any control inside a message row — a tool run's disclosure, most visibly — parked focus there and left the row's copy, scroll, and timestamp chrome showing after the pointer had moved away. The row read as permanently hovered. `:focus-visible` is the distinction the browser already computes, and it is the keyboard focus this reveal was written for in #19218. Measured in the running app: after a real click on a run header, `document.activeElement` is that button and `:focus-visible` is false, while `:focus-within` is true. * refactor(native-chat): spell the keyboard-focus reveal with the first-class has variant Swaps the hand-rolled arbitrary variant `group-[&:has(:focus-visible)]:` for Tailwind's `group-has-[:focus-visible]:`. Every other `has-` variant in the renderer is already spelled in the bracket form, including the same hover-plus-keyboard-focus reveal on the project header actions. Measured in the running app: both spellings compile to an equivalent selector and are identical in every state (idle, mouse click on a control inside the row with the pointer moved away, and each keyboard tab stop). Also asserts the pointer-events half of both reveals, which governs whether the copy button is clickable and had no coverage. * fix(native-chat): preserve message controls on touch devices --------- Co-authored-by: Merge Sim <sim@local>








What this does, in plain terms
The chat never told you when anything happened. Scrolling back, every message looked equally recent — you couldn't tell if the agent answered two minutes ago or two hours ago.
Now: hover a message, see its time. Move away, it's gone.
Hover-only is deliberate. A permanent timestamp on every row is noise on a surface you read all day; but when you do need it ("did this run before or after I changed that file?") you really need it.
Before → After
Screen readers get the full date and time, not the shortened clock string. No date library was added; times follow your system's regional format.
Technical detail
ELI5
Native chat shows each message's time when you hover over it or navigate to it with the keyboard.
What Changed
Agent messages display the time after copy and scroll-to-top in the existing hover controls. User bubbles get only a timestamp, with a keyboard focus target. Unknown or invalid timestamps render nothing.
Why
This makes message times available without adding persistent transcript clutter. Formatting uses Intl and the UI locale, with semantic ISO dateTime metadata and a full localized accessible label. No date dependency, timer, relative time, shared schema, or wire change.
Linked Issue
Coordinator-dispatched native chat hover timestamp task; no issue number supplied.
Visual Proof
Full hidden Electron renderer, seeded transcript, macOS. Before hover:
After hovering the user bubble:
After hovering the agent message:
Testing
Review
Self-reviewed for null and invalid dates, epoch zero, live locale changes, semantic accessibility, and preserving existing control eligibility. Agent timestamps add no tab stop; user timestamps do.
Agent skill upstream boundary
Checklist