Repository navigation
Read a sub-minute wait in seconds on the Project board - #1897
Merged
Merged
Conversation
A card that waited 40 seconds read `0m` on the board's Waiting group and on all three duration metrics (PR merge time, issue close time, task completion), so a 35-second median merge looked like "instant or unknown". `waitedLabel` now carries seconds under a minute and never floors a span over zero to `0s`; missing and negative spans still return nothing, and an unread duration stays the dash. `elapsedLabel` next door already avoided `0m` this way, so the two labels now agree. Fixes ThinkFlowLab#1896
Contributor
Author
|
Verdict requested for this tip: 463907e (tree c1d5c525703ce5cf6289eea65e87706ffc77974a, base 148554c) @Birfy review request — #1896 ( What to look at:
Owner: Dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1896
Owner: Dev
Written-by: Dev-2
Reviewer: Reviewer
Claim-Id: d4afd33d4dfa486f9882ed19d0abaea2
Base: 148554c
Verified commit: 72b2d9d926ef3a687590fbdd6699b95b6c9c47b2 (tree
c1d5c525703ce5cf6289eea65e87706ffc77974a);the pushed head
463907e9cc14d9565f2d59c79ed08dcab571d3a1was rebuilt from that same tree by the pushpath, so the two commits carry identical content
Tree: c1d5c525703ce5cf6289eea65e87706ffc77974a
Diff: 8 files, +85/−5 — the label (
core/src/client/project-board.js), the regenerated bundle(
core/client.js), the test, the twopatches/ds-bot/mirrors the generator owns for those files(
0008-client-bundle.patchandfiles/src/client/project-board.js,files/test/project-board-view.test.js),the
core-clientsubsystem page and onechangelog.d/fragmentWhat was wrong
waitedLabelfloored to whole minutes, so any span under a minute read0m. The label is not only acard's wait line (
Waitinggroup) — the three duration metrics (prMergeMedianMs,issueCloseMedianMs,taskDoneMedianMs) go through the same function, so a 35-second median merge printed0m, which areader takes for "instant or unknown" rather than "35 seconds".
elapsedLabelnext door(
core/src/client/activity-row.js) already floors withMath.max(1, …)and never says0m, so theboard and the activity row disagreed about the same span.
What changed
waitedLabelcarries seconds under a minute:40_000 → 40s,59_999 → 59s,0 → 0s, and a spanover zero never floors to
0s(1 → 1s), the same wayelapsedLabelnever says0m. At and abovea minute the units are unchanged (
1m,3h,50d).null, so the cardrenders nothing and a duration the host could not read still renders the dash — the "unknown is
never zero" rule is untouched.
stay in milliseconds.
core/client.jswas rebuilt fromcore/src/client/and thepatches/ds-bot/mirrors regenerated, socheck/canonicalstay green.docs/subsystems/core-client.mdrecords the unit rule and achangelog.d/fragment names the visible change.Red first
The test, on
148554c1with onlycore/test/project-board-view.test.jschanged:The test also pins the two neighbouring cases (
59_999 → 59s,0 → 0s) and the three metrics, so apartial fix that only touched the card line would still fail.
Verification at the tip
Ran:at72b2d9d926ef3a687590fbdd6699b95b6c9c47b2on the committed tree,git status --porcelainempty before and after:
TZ=UTC ARCH_DOCS_BASE=148554c19941d77407df6e1916de8d6d393e359f npm run verify— exit 0: core2290/2290, social 541/541, tree 127/127, timeline 135/135, workflow 336/336,
.github/scripts563/563, interop 37/37, live-e2e 24/24; oxlint 0 errors (core 73 warnings, plugin lints
36/9/2/16 and 1/0 warnings);
arch-docs: OK (8 changed file(s));build-client --checkclean.node scripts/ds-bot-patches.mjs check— three lines ok (pin tree5834c00, 10 patches apply inorder,
core/equalsds-bot/+ patches).node scripts/ds-bot-patches.mjs canonical—ok patches/ds-bot/ is what generate writes (generate is a no-op).node .github/scripts/changelog.mjs check— 5 fragments well formed;check-mojibake --check— 0occurrences of U+FFFD.
Not run:the smoke bench (noindex.jsorsrc/host/change) and the CIpackagejob's packcheck, typecheck and actionlint, which run in CI.
{ "pr": 1897, "claim": "Dev", "issue": 1896, "summary": "waitedLabel floored to whole minutes, so a card that waited 40 seconds read 0m — and the three duration metrics use the same label, so a 35-second median merge printed 0m, which reads as instant or unknown. The label now carries seconds under a minute, never flooring a span over zero to 0s, while missing and negative spans still return null and an unread duration stays the dash. elapsedLabel next door already avoided 0m, so the two labels agree. The card line and the three metrics keep calling the one function; no host change.", "files": [ "core/src/client/project-board.js", "core/client.js", "core/test/project-board-view.test.js", "patches/ds-bot/0008-client-bundle.patch", "patches/ds-bot/files/src/client/project-board.js", "patches/ds-bot/files/test/project-board-view.test.js", "docs/subsystems/core-client.md", "changelog.d/1896-waited-label-seconds.fixed.md" ], "checks": { "ran": "TZ=UTC ARCH_DOCS_BASE=148554c1 npm run verify; node scripts/ds-bot-patches.mjs check; node scripts/ds-bot-patches.mjs canonical; node core/scripts/build-client.mjs --check", "result": "green", "at": "72b2d9d926ef3a687590fbdd6699b95b6c9c47b2" }, "next": "none — ready for review" }