Skip to content

fix(webui): correct activity timer duration - #4649

Merged
chengyongru merged 1 commit into
mainfrom
codex/fix-webui-activity-timer
Jul 15, 2026
Merged

chengyongru merged 1 commit into
mainfrom
codex/fix-webui-activity-timer

Conversation

@chengyongru

Copy link
Copy Markdown
Collaborator

Summary

Fix the WebUI activity timer so live Working for ... duration is measured from the user turn start instead of the first activity row.

Root cause

The activity cluster only received reasoning/tool trace messages, so live duration started at the first trace createdAt. Transcript replay also regenerated message timestamps from the refresh time, which could reset activity timing after a reload.

Changes

  • Carry the user turn start timestamp through activity timeline units.
  • Use the turn start timestamp for live activity duration while preserving completed latencyMs replay behavior.
  • Persist created_at_ms in WebUI transcript rows and replay it as UI createdAt.
  • Add regression coverage for live timing and persisted replay timestamps.

Validation

  • npm run test -- src/tests/thread-messages.test.tsx src/tests/agent-activity-cluster.test.tsx
  • uv run --extra dev pytest tests\utils\test_webui_transcript.py tests\channels\test_websocket_channel.py::test_webui_message_envelope_marks_inbound_metadata tests\channels\test_websocket_channel.py::test_webui_message_envelope_appends_user_transcript -q
  • npm run build
  • uv run ruff check nanobot\webui\transcript.py tests\utils\test_webui_transcript.py tests\channels\test_websocket_channel.py
  • Real gateway + Playwright check: seeded a pending activity turn and verified the page showed Working for 3m 50s, not Working for 10s.

@chengyongru chengyongru added bug Something isn't working webui priority: p2 Normal backlog: minor bug, enhancement, docs, cleanup, edge case, or unvalidated proposal. labels Jul 2, 2026
@chengyongru
chengyongru marked this pull request as ready for review July 15, 2026 08:45
@chengyongru
chengyongru merged commit ba86dcc into main Jul 15, 2026
5 checks passed
@chengyongru
chengyongru deleted the codex/fix-webui-activity-timer branch July 22, 2026 05:12
okwillbe pushed a commit to okwillbe/nanobot that referenced this pull request Aug 15, 2026
StefanoParadisi pushed a commit to StefanoHernandez/nanobot that referenced this pull request Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority: p2 Normal backlog: minor bug, enhancement, docs, cleanup, edge case, or unvalidated proposal. webui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant