Skip to content

improve(ui): show readable elapsed time in completed work summaries - #164430

Merged
roboclaw-bot merged 2 commits into
mainfrom
openclaw/improve-tool-call-duration-wording
Oct 3, 2026
Merged

roboclaw-bot merged 2 commits into
mainfrom
openclaw/improve-tool-call-duration-wording

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Completed-work headings emphasize low-level tool-call counts instead of how long the assistant worked.

User Impact

Collapsed headings show readable durations such as Worked for 2 minutes, 3 seconds using the actual Gateway-reported runtime. Tool-call counts remain available when expanded, and failures and other non-success outcomes stay visible. When matching timing is unavailable, the heading remains Worked; no duration is guessed.

Why This Change Was Made

Reuse the existing run-lifecycle timing and localized duration units, spell out the units, and show the total call count only in the expanded state. This is a presentation-only change: no timing collection, persistence, configuration, or migration changes.

Evidence

  • 101 focused tests passed: pnpm test ui/src/lib/format.test.ts ui/src/pages/chat/components/chat-activity-disclosure.test.ts ui/src/pages/chat/components/chat-transcript-duration.test.ts --maxWorkers=1 — 4.74 seconds wall time (Vitest 3.95 seconds). Covers localized units, missing timing, matching run ownership, expansion, and retained outcomes. CI seconds are not yet measured; no new sleeps or timers.
  • node scripts/check-changed.mjs passed, including UI/test typechecks, i18n verification, lint, formatting, and export guards.
  • Actual Control UI with deterministic mock-Gateway data inspected in Chromium at 1100×680 and 390×760; expansion retains all five tool calls. Before/after captures are embedded below. Full repository test suite and live-Gateway validation were not run.
  • Independent autoreview completed with no actionable findings through P2.
  • CI caught one remaining abbreviated-duration expectation in the existing message-controls test. Reproduced the failure locally, updated it to the requested wording, and ran pnpm test ui/src/pages/chat/components/chat-transcript-message-controls.test.ts --maxWorkers=1: all 6 tests passed in 4.58 seconds wall time. Production code and inspected screenshots are unchanged.

Before

Before: abbreviated duration and tool count in the collapsed heading

After

After: readable actual elapsed time with tool counts available on expansion

Worked on by

Work sessions


View the OpenClaw team session

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: fc79f226-a7bf-465c-89fc-9093f53f108a
@clawsweeper

clawsweeper Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: S labels Oct 3, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review October 3, 2026 17:45
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 3, 2026
@clawsweeper

clawsweeper Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 3, 2026, 2:05 PM ET / 18:05 UTC (Revision 2).

ClawSweeper review

What this changes

The Control UI spells out elapsed time in completed-work headings and shows total tool-call counts when expanded, while retaining visible non-success outcomes.

Merge readiness

✅ Ready for maintainer review

This PR remains useful: current main still uses abbreviated durations and collapsed tool-call totals. No actionable correctness or security defect was found, and the inspected before/after screenshots support the visible change.

Priority: P3
Reviewed head: adb59205afc980ddb01e8c07446696609629ce7b

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused implementation with directly relevant visual proof and no actionable findings.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after captures of the production Control UI in Chromium with synthetic Gateway history directly show the changed completed-work renderer displaying spelled-out elapsed time and omitting collapsed totals. Existing boundary tests supplement the reported expansion and retained-outcome checks. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected before/after captures of the production Control UI in Chromium with synthetic Gateway history directly show the changed completed-work renderer displaying spelled-out elapsed time and omitting collapsed totals. Existing boundary tests supplement the reported expansion and retained-outcome checks. No stored-data contract changes.
Evidence reviewed 10 items Introduced production change: The pinned introduction delta adds localized long-duration formatting and conditions total-count visibility on expansion; outcome rendering and timing collection are unchanged.
Existing formatting owner reused: The new formatter reuses canonical duration decomposition and existing locale-aware unit formatting, with a bounded formatter cache refreshed when the locale changes.
Timing ownership preserved: Work duration still requires a matching session key, terminal run identity, terminal status, and finite runtime; absent matching facts produce an untimed heading.
Findings None None.
Security None None.

How this fits together

The Control UI groups completed assistant narration and tool activity above the final answer. It consumes Gateway-reported run timing and prepared tool outcomes to render an expandable work summary.

flowchart TD
  A[Gateway run timing] --> C[Match completed conversation run]
  B[Conversation and tool activity] --> C
  C --> D[Localized elapsed time]
  C --> E[Tool totals and outcomes]
  D --> F[Collapsed work heading]
  E --> F
  E --> G[Expanded work details]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +24, Tests +16, Docs +1. Total +41 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 3 32 8 +24
Tests 5 42 26 +16
Docs 1 6 5 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 80 39 +41

Review metrics

None.

Technical review

Best possible solution:

Keep completed-work presentation within the existing renderer, using authoritative runtime and localized units while preserving expandable totals and visible outcomes.

Do we have a high-confidence way to reproduce the issue?

Not applicable as a bug reproduction: this is a presentation improvement, and inspected before/after Control UI captures demonstrate the requested wording change.

Is this the best way to solve the issue?

Yes. Reusing existing duration decomposition and localized unit formatting is a focused solution, and the expansion condition preserves the existing counting owner.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against f7d9a968f278.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is bounded presentation polish with unchanged timing, configuration, and stored-data contracts.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Inspected before/after captures of the production Control UI in Chromium with synthetic Gateway history directly show the changed completed-work renderer displaying spelled-out elapsed time and omitting collapsed totals. Existing boundary tests supplement the reported expansion and retained-outcome checks. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected before/after captures of the production Control UI in Chromium with synthetic Gateway history directly show the changed completed-work renderer displaying spelled-out elapsed time and omitting collapsed totals. Existing boundary tests supplement the reported expansion and retained-outcome checks. No stored-data contract changes.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected before/after captures of the production Control UI in Chromium with synthetic Gateway history directly show the changed completed-work renderer displaying spelled-out elapsed time and omitting collapsed totals. Existing boundary tests supplement the reported expansion and retained-outcome checks. No stored-data contract changes.

Evidence

What I checked:

  • Introduced production change: The pinned introduction delta adds localized long-duration formatting and conditions total-count visibility on expansion; outcome rendering and timing collection are unchanged. (ui/src/pages/chat/components/chat-message-stream.ts:208, adb59205afc9)
  • Existing formatting owner reused: The new formatter reuses canonical duration decomposition and existing locale-aware unit formatting, with a bounded formatter cache refreshed when the locale changes. (ui/src/lib/format-duration.ts:14, adb59205afc9)
  • Timing ownership preserved: Work duration still requires a matching session key, terminal run identity, terminal status, and finite runtime; absent matching facts produce an untimed heading. (ui/src/pages/chat/chat-thread-grouping.ts:596, adb59205afc9)
  • Still necessary on main: Fetched main still imports the compact formatter and renders total tool calls regardless of expansion. (ui/src/pages/chat/components/chat-message-stream.ts:208, f7d9a968f278)
  • Latest release comparison: The latest supplied release contains compact and single-unit human formatters but not the new long-duration formatter. (ui/src/lib/format-duration.ts:8, fc23bc864e45)
  • Inspected visual proof: Locally inspected the downloaded before and after images linked in the captured PR body. The production Control UI with synthetic Gateway history changes from “Worked for 2m 3s · 5 tool calls” to “Worked for 2 minutes, 3 seconds.” The body also records desktop/mobile inspection and expansion retaining five calls; screenshots directly establish the collapsed presentation change. (e4075a9d83fc)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • RomneyDa: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-03T17:51:50.304Z sha e4075a9 :: needs maintainer review before merge. :: none

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: e96eab0c-242d-4ea6-b93f-68a22c63c8d0
@roboclaw-bot
roboclaw-bot merged commit 4e2ba06 into main Oct 3, 2026
88 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/improve-tool-call-duration-wording branch October 3, 2026 18:07
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 4, 2026
…penclaw#164430)

* improve(ui): show readable elapsed time in completed work summaries

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: fc79f226-a7bf-465c-89fc-9093f53f108a

* improve(ui): show readable elapsed time in completed work summaries

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: e96eab0c-242d-4ea6-b93f-68a22c63c8d0

---------

Co-authored-by: steipete <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant