fix(cli): show real timer units, readable durations and fractions in gram view #38
No reviewers
Labels
No labels
bug
discussion
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gram-lang/gram!38
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/cli-view-timer-units"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #25
Root cause is in
packages/cli, not the renderer: the timer unit lives on the token (item.unit), but the CLI readquantity.unitand fell back tomin.gram viewand cook mode show the real timer unit (~{1h}→~1h,~{20s}→~20s)formatDurationrounds to the minute from 1h up and to the second below (64.5→1h 5m,25.08→25m 5s)idlewhile the header readrest)1/4 càc, not0,3)formatTimerandtoCommonFraction, documented in the API reference (EN/FR)Not changed: renderer HTML/Markdown timer output (already correct, snapshots untouched),
ui/diff.tsandEndScreenduration formats.Checks: build, typecheck, lint, 1090 tests and 94 conformance cases pass.
gram viewlabels every timer as "min" —~{1h}displays as~1min#25