Repository navigation
feat(ui): hover-revealed chat message meta with relative timestamps - #104035
Merged
Merged
Conversation
Contributor
Author
|
Merged via squash.
|
This was referenced Jul 11, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 11, 2026
…penclaw#104035) * feat(ui): hover-revealed chat message meta with relative timestamps * fix(ui): derive relative chat timestamps from the injected clock * fix(ui): date far-future chat timestamps instead of clamping to just now * fix(ui): invalidate memoized chat thread on relative-time ticks * fix(ui): keep relative-time ticks out of the chat live region
This was referenced Oct 24, 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 Problem This Solves
Follow-up to #104016 (flat assistant text stream). The chat thread still shows a permanent metadata row under every message ("OpenClaw · Jul 10, 2026, 5:20 PM"), which reads as noise now that assistant replies render as a clean stream. Absolute timestamps on every message are heavy; the details are only interesting on demand. Flat tool rows also sat slightly indented from the assistant text edge.
Why This Change Was Made
The sender/time footer is now hidden until the message group is hovered or focused (revealed with an opacity fade, height reserved so nothing shifts; always visible on touch devices where there is no hover). Timestamps show a relative label ("2m ago", falling back to a compact date like "Apr 24" past a week), with the absolute date/time in a styled tooltip — or, for messages with usage metadata, leading the existing token/cost popover so the two hover surfaces don't fight. A single per-pane 60-second tick keeps relative labels fresh on idle panes and is cleared on pane disposal. Flat top-level tool rows bleed their 8px inset into the avatar gutter so their icon/label aligns with the assistant text edge, and assistant stream segments get a touch more vertical breathing room. Web (Control UI) only.
User Impact
The web chat thread reads as a clean document: no repeated name/timestamp rows until you hover the message you care about, familiar "5m ago" times with exact timestamps one hover away, and agent text/tool rows sharing one left edge. Touch/mobile users keep always-visible footers.
Evidence
Deterministic mock-gateway screenshots (Playwright, seeded history):
guard()dependencies, so idle panes actually re-render; the timer is cleared with existing pane presentation state. Timestamps carryaria-live="off"so ticks don't spam therole="log"polite live region.formatTimeAgoon the computed age — same canonical helper family the sessions sidebar uses); slightly-future (clock-skew) messages clamp to "just now" while far-future ones fall back to the compact date instead of lying forever.chat-message.test.ts,chat-view.test.ts,chat-responsive.browser.test.ts— 286/286 pass on Blacksmith Testbox; timestamp tests pin relative labels with fake timers plus compact-date and future-timestamp fallback contracts (including the cross-year case).pnpm check:changedgreen (delegated, exit 0). Codex autoreview iterated to clean (final round: no findings, "patch is correct 0.91").