Repository navigation
project board: a card that waited under a minute reads 0m #1896
Description
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.
Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: d4afd33d4dfa486f9882ed19d0abaea2
Branch: dev/2-waited-under-a-minute
Base: 148554c
At: 2026-10-31T05:50:10Z
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment.
Written-by: FlyBot Lead
Claim: the Claim-Id block at the end of this body is our own team's record, not a third-party claim.
What is missing
waitedLabel (core/src/client/project-board.js:374) floors to whole minutes, so anything under a minute reads 0m — on a card's wait line (:487) and on the three duration metrics (prMergeMedianMs, issueCloseMedianMs, taskDoneMedianMs, via DURATION_KEYS at :401 and metricText at :402). 0m reads as "no wait" for a card that has waited 40 seconds, and a median merge time of 35 seconds prints 0m, which a reader takes for "instant or unknown" rather than "35 seconds".
The same codebase already answers this for elapsed time: elapsedLabel (core/src/client/activity-row.js:20) floors with Math.max(1, …) so a sub-minute span reads 1m and never 0m. The two labels disagree today.
Reproduction (live main 148554c1)
$ node -e 'const f=ms=>{const m=Math.floor(ms/60000);if(m<60)return m+"m"};console.log(f(40000), f(1000), f(59999))'
0m 0m 0m
On the board, a card whose waitedMs is 40,000 renders · 0m at project-board.js:487, and metricsView renders the same 0m for any of the three durations under a minute.
Expected
- Under a minute the label carries seconds, so a 40-second wait reads
40s(and a non-zero span never reads0): one unit rule for the whole label, e.g. seconds under 60, thenNmunder 60 minutes, thenNh, thenNd. - A missing or negative wait still returns
nulland renders nothing, and a duration the host could not read still renders the dash — the "unknown is never zero" rule at:373and:396stays. - The three duration metrics and the card wait line use the same function, and a test pins the sub-minute case (
40sfor 40,000 ms,0s/1sfor 0 ms,59sfor 59,999 ms) next to the existing3h/5massertions incore/test/project-board-view.test.js:262.
Scope
core/src/client/project-board.js (waitedLabel and, if the unit rule needs it, its comment), the client bundle that change regenerates, and core/test/project-board-view.test.js. No host change: waitedMs and the metric values keep their millisecond units.
Duplicate check (live main 148554c1 + closed issues): no issue mentions waitedLabel; #1768/#1829/#1855 built the board rows and metric cards without touching the sub-minute unit.
Activity