Skip to content

Show seconds and minutes-and-seconds in the elapsed work timer - #286

Merged
Fei2411 merged 1 commit into
devfrom
fix/elapsed-time
Oct 17, 2026
Merged

Fei2411 merged 1 commit into
devfrom
fix/elapsed-time

Conversation

@Fei2411

@Fei2411 Fei2411 commented Oct 17, 2026

Copy link
Copy Markdown
Owner

Issue

none (reported directly: the activity row and group member status rows only showed whole minutes starting at 1m).

What changed / 改了什么

  • elapsedLabel(ms) now formats < 60s as Ns (e.g. 1s, 12s), < 60m as Nm or Nm Ns (e.g. 1m, 1m 8s), and >= 60m as Nh or Nh Nm.
  • ActivityIndicator (src/client/activity-row.js) and useNow / since (src/client/member-status.js) now show elapsed time starting at 1s (>= 1000ms) and tick once per second.
  • Added font-variant-numeric: tabular-nums to .bt-typing-time and .bt-member-state so ticking digits keep a steady width.
  • Added unit tests for elapsedLabel and MemberState in test/member-status.test.js.

Changelog

Show elapsed work time in seconds (Ns) and minutes-and-seconds (Nm Ns) instead of starting at 1m.

How I checked it / 怎么验证的

  • npm test (in ds-bot/)
  • node scripts/build-client.mjs --check
  • npm run lint
  • Smoke test, for changes to index.js or src/host/ / 改了 index.js 或 src/host/ 时跑冒烟测试
  • Screenshot attached, for interface changes / 界面改动已附截图

Checklist / 检查

  • One issue, one subject. / 只做一件事。
  • src/client/ changed → npm run build ran and client.js is committed. / 改了 src/client/ 就已重新 build 并提交 client.js。
  • No keys, tokens or personal data, also in screenshots. / 没有密钥、token 或个人信息,截图里也没有。
  • No AI tool as author or Co-authored-by. / 没有把 AI 工具写成作者或 Co-authored-by。

The activity row and the group member rows waited a full minute before
showing elapsed time, and `elapsedLabel` rounded everything under an
hour down to whole minutes with a 1m floor (`Math.max(1, minutes)}m`).

Start ticking once a second from 1s, format under a minute as `Ns` and
under an hour as `Nm` or `Nm Ns`, and set `tabular-nums` on the timer
spans so ticking digits keep their width.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T05:39:48.553554Z f4e4d12 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Fei2411
Fei2411 merged commit e253732 into dev Oct 17, 2026
7 checks passed
@Fei2411
Fei2411 deleted the fix/elapsed-time branch October 17, 2026 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant