Skip to content

feat(desktop): per-turn wall-clock duration badge in the transcript (salvage #84430) - #87245

Merged
teknium1 merged 2 commits into
mainfrom
salv-84430
Aug 15, 2026
Merged

feat(desktop): per-turn wall-clock duration badge in the transcript (salvage #84430)#87245
teknium1 merged 2 commits into
mainfrom
salv-84430

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Salvage of #84430 (@Tommy00748) onto current main: each settled assistant reply now shows a small "⏱ 38s" badge (message.start → completion), giving a glanceable per-turn latency signal — renderer-only, no backend changes.

Pairs with #86923: since the turn clock now arms at submit, the badge measures the full user-perceived wait including gateway-accept latency.

Changes

  • Cherry-picked a6f7a5b (@Tommy00748, authorship preserved): ChatMessage.durationS stamped at completion (completeAssistantMessage settle paths + failAssistantMessage), rendered in AssistantFooter, carried through metadata.custom, added to the COMPARED_FIELDS re-render contract, turnDuration i18n key in all 5 locales. Not persisted (renderer-memory, matching reasoning-block durations). Perf-safe: value set once at completion, referentially stable across the 30 Hz delta stream.
  • Conflict resolution: kept main's completedAt/completeOpenTimelineParts timeline fields alongside the new durationS; dropped the PR's MessageAge footer component as redundant (main already renders MessageTimelineTimestamp).
  • Contributor mapping for 807847218@qq.com → Tommy00748.

Validation

Result
vitest (session hooks + assistant-message) 554/554 pass
typecheck (3 tsconfigs) + eslint clean (0 errors)

Infographic

Turn time badge

Tommy00748 and others added 2 commits August 15, 2026 13:20
Each assistant reply now carries a small time badge below the message text
showing how long its turn took (message.start -> message.complete), so
users can gauge task latency at a glance without hovering.

The duration is computed renderer-side from the per-session turnStartedAt
timestamp the app already tracks and stamped onto the ChatMessage at
completion (successful and failed turns alike). It is not persisted
backend-side, so messages hydrated from history have no badge — matching
how reasoning-block durations already behave.

Also adds the assistant.thread.turnDuration i18n key across all five
locale files.
@github-actions

github-actions Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

૮ >ﻌ< ა ci review

ran on 671eea3 — chore: map 807847218@qq.com -> Tommy00748 for attribution au

⚠️ Warnings

OSV vulnerability scan · View job

5 known vulnerabilities found in pinned dependencies.

How to fix:

Review the findings in the Security tab. Update the affected dependencies if a patched version is available.


debug info

CI timings

CI timings · View report · View job

Wall time 4m8s vs 3m38s (+13.8%). 14 job(s) slower, 20 faster, 3 unchanged.

  • Python tests / Run tests slice 9/12: +33.0s
  • Python tests / Run tests slice 3/12: +30.0s
  • Python tests / Run tests slice 4/12: -29.0s
  • Python tests / Run tests slice 6/12: -24.0s
  • Python tests / Run tests slice 12/12: -19.0s

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/desktop Electron desktop app (apps/desktop/*) labels Aug 15, 2026
@teknium1
teknium1 merged commit 9859e88 into main Aug 15, 2026
55 checks passed
@teknium1
teknium1 deleted the salv-84430 branch August 15, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants