[CLI] gram view labels every timer as "min" — ~{1h} displays as ~1min #25
Labels
No labels
bug
discussion
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
research
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gram-lang/gram#25
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Version:
@gram-lang/cli1.2.1 (current npmlatest), on macOS.Summary
The terminal renderer prints a timer's numeric value with a hardcoded
minsuffix, ignoring the parsed unit. The parser and the timing aggregation are both correct — this is display only.Reproduction
Every unit renders as
min, including~{1h}→~1min. All four ofs,sec,minandhare documented units in the times reference.The model is correct
gram build --prettykeeps the units and aggregates them properly:64.5 min = 20s + 20s + 20s + 90s + 2min + 1h. Correct to the decimal. So the defect is confined to the renderer's unit label. Possibly related to the timing refactor in #15.
Impact
gram cookis meant to guide someone step by step in the kitchen. Displaying~1minfor a one-hour rest is actively misleading at the moment it matters most.Going by the pipeline in CONTRIBUTING, this looks confined to
packages/renderer— the compiled JSON thatkitchenproduces is already correct.Also, same area: the duration summary
1h4.5above is correct arithmetic but not a duration anyone reads — presumably1h04or1h04min30swas intended. The same formatter drops the leading zero on whole minutes (Total: 24h7for 24 h 07 on another recipe), and on a longer recipe the raw float surfaces directly:One more small thing in the same renderer:
@cannelle{1/4 càc}displays as0,3 càc— a fraction rounded to one decimal rather than shown as1/4.Drafted with AI assistance, verified by hand: every reproduction above was run locally against 1.2.1 and its output pasted verbatim.
Thanks again for your report! The unit label was indeed wrong in the CLI view, not the renderer: a fix for the timer units, the duration summary and the 1/4 fraction display is up in #38 and will ship in the next release.