Skip to content

fix(cli): history list never prints 60m ago or 24h ago - #5818

Open
rudycelekli wants to merge 1 commit into
heygen-com:mainfrom
rudycelekli:fix/cli-history-ago-unit-rollover
Open

rudycelekli wants to merge 1 commit into
heygen-com:mainfrom
rudycelekli:fix/cli-history-ago-unit-rollover

Conversation

@rudycelekli

@rudycelekli rudycelekli commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

What

hyperframes history prints relative ages that read as the next unit's size: 60m ago and 24h ago.

Why

ago() rounds each unit. An entry 3,570 s old (59.5 minutes) prints 60m ago instead of 59m ago, and one 86,000 s old prints 24h ago instead of 23h ago.

Related work

No overlapping PR found. Related in spirit to #5817 (rounding rollover in ui/format.ts), but touches a different file.

How

Floor minutes, hours and days; seconds stay rounded. The function moves unchanged in shape into utils/historyAgo.ts and takes now as an argument, so it can be tested without the history command's workspace dependencies.

Test plan

  • Unit tests added in utils/historyAgo.test.ts. The boundary case fails with the old rounding and passes with the fix (vitest run src/utils/historyAgo.test.ts).
  • oxfmt --check and oxlint clean on changed files.
  • Manual testing performed (not applicable)
  • Documentation updated (not applicable)
  • Comments follow CONTRIBUTING.md "Comments".

Not run locally: history.test.ts and workspace typecheck (workspace packages were not installed), comment citation/ratchet scripts.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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