Repository navigation
improve(ui): show readable elapsed time in completed work summaries - #164430
Conversation
Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: fc79f226-a7bf-465c-89fc-9093f53f108a
|
🦞👀 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. |
|
Codex review: needs maintainer review before merge. Reviewed October 3, 2026, 2:05 PM ET / 18:05 UTC (Revision 2). ClawSweeper reviewWhat this changesThe 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 Review scores
Verification
How this fits togetherThe 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]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +24, Tests +16, Docs +1. Total +41 across 9 files. View PR surface stats
Review metricsNone. Technical reviewBest 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. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: e96eab0c-242d-4ea6-b93f-68a22c63c8d0
|
Merged via squash.
|
…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]>
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
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.mjspassed, including UI/test typechecks, i18n verification, lint, formatting, and export guards.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
After
Worked on by
Work sessions
View the OpenClaw team session