Repository navigation
fix: show turn duration in assistant message metadata - #196511
Merged
Merged
Conversation
Share same-run timing between completed work and assistant metadata, including replies without tool calls. Keep unavailable timing absent and preserve the standalone recap removal. Co-authored-by: vyctorbrzezowski <[email protected]>
Worked on by: - @vyctorbrzezowski Co-authored-by: vyctorbrzezowski <[email protected]> OpenClaw-Publication: d599d00a-8b38-4849-837c-a4fdd96dc681
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Contributor
|
Codex review: stale review; fresh review needed. Summary Next step Review history (1 earlier review cycle)
|
vyctorbrzezowski
marked this pull request as ready for review
November 11, 2026 01:22
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 11, 2026
Show available elapsed turn time as "Worked for {duration}" in the existing assistant-message timestamp tooltip. Preserve separate historical and terminal timing semantics, and omit unavailable timing.
Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: Vyctor H. Brzezowski <[email protected]>
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
Fixes missing elapsed turn time in the assistant message timestamp tooltip, including completed replies without tool calls.
User Impact
Users can inspect a completed reply's duration as Worked for {duration} alongside its existing timestamp and usage metadata. Replies without reported token usage still show available timing; unavailable timing stays absent. There is no new badge or separate “Done in” line, and no configuration or migration is required.
Why This Change Was Made
The existing timing projection now serves both completed-work summaries and reply metadata. Matching terminal lifecycle runtime takes precedence. For earlier runs, the existing historical interval—from the prompt that started that execution run through its last recorded output write—is retained as a distinct measurement, not inferred from message age, creation time, or tool durations.
Existing Worked and handoff/request-wide recap behavior is preserved. Forwarded messages and mismatched session/run facts cannot borrow the current run's timing.
Evidence
Maintainer validation of the final wording: 85 duration, message-group and transcript-index cases passed in 2.44 s. Scoped lint, English catalog verification and the exact 61-line regression allocation passed. Fresh full-candidate review found no actionable P0–P2 issues.
Reproduced through the actual Control UI on an isolated Gateway with a real model: a completed no-tool reply had no duration entry. The same flow now shows one entry (“Duration: 1s” for a recorded 1,271 ms runtime), including after a fresh reload. Served UI bytes were checked against the built candidate.
Five focused duration assertions failed on the unchanged base. The focused metadata/activity suites passed 58 tests; downstream thread/grouping suites passed 118 tests. The final changed-renderer replay passed 28 tests.
Targeted UI and UI-chat test types, scoped lint/stylelint/format, English catalog verification, regression-line allocation and UI production build passed. Three existing lint warnings remain in unchanged code.
Author simplification pass completed without further source changes. Canonical independent local autoreview covered the complete staged/unstaged candidate at P0–P2 in one isolated pass: scoped-clean, no findings. The reviewer inspected source and retained evidence; it did not rerun tests or browser checks.
Changed-test Vitest wall times: duration suite 2.10 s; message-group suite 1.47 s. The named regression allocation covers exactly 61 net test lines; the shared scalar is unchanged. CI seconds are not available.
Proof limits: Real browser/model proof covers Chromium, light theme, 1280×900, one simple no-tool reply and reload. Focused sibling fixtures are not real multi-tool, handoff, mobile, dark-theme or WebKit proof. Updated-head CI is pending; missing or skipped jobs are not passing proof.
CI exceptions: The reviewed-head CI reports seven pre-existing test lines above the baseline; this PR adds 61 lines and allocates exactly 61. It also reports new static JS size growth: 127 B in the largest shared asset and 470 B in chat boot (63 B beyond shared-asset variance and 407 B above the chat-boot ceiling). These byte overages use the maintainer-approved budget waiver; they are not labelled inherited. The remaining CI jobs passed or were skipped. Security Review completed successfully.
Visual evidence
These original captures show the earlier “Duration:” label. The final wording is “Worked for”; timing and placement are unchanged.
Before
After
Full Control UI context
Before
After
Model identifiers are redacted. These are real isolated-Gateway/model captures with the same prompt, viewport and theme; elapsed time and absolute clock reflect their actual runs.
Contributor: @vyctorbrzezowski
Work sessions
Linked for team reference; these sessions aren’t public.
Worked on by