Commit Graph

3 Commits

Author SHA1 Message Date
can1357 8a32eceb53 fix(utils): clamped usage durations to suppress stale negative reset countdowns
- Clamped `formatDuration` to return `0ms` for non-positive, NaN, or infinite inputs.
- Updated usage report rendering to suppress reset countdowns when `resetsAt` is absent or no longer in the future.
- Added unit tests for `formatDuration` covering clamped values and standard duration formatting.
2026-05-26 20:22:25 +02:00
can1357 641dad3f9f fix(utils): adjusted compact number formatting to trim redundant decimals
- Updated `formatNumber` to use a helper that removes trailing `.0` for compact K/M/B values.
- Adjusted small-value branches so exact thousands and millions now format as whole units while keeping one decimal for fractional values.
- Revised the function comment examples to match the new `1K` and `1M` outputs.
2026-05-03 07:39:52 +02:00
can1357 abf8c1efc9 refactor: unslop common utilities 2026-02-22 11:01:11 +01:00