feat(stats): redesign expanded session view with density chart (#304)

This commit is contained in:
sudacode authored and GitHub committed 2026-10-26 23:08:48 -07:00
1 parent cc9af79d6e
commit 6219a81144
13 files changed
+798 -890

No files matched your search

+7
View File
@@ -4,6 +4,7 @@ import test from 'node:test';
import {
epochDayToDate,
epochMsFromDbTimestamp,
formatClockDuration,
formatRelativeDate,
formatSessionDayLabel,
} from './formatters';
@@ -153,3 +154,9 @@ test('formatSessionDayLabel includes year for past-year dates', () => {
assert.notEqual(label, withoutYear);
}, fixedNow);
});
test('formatClockDuration keeps seconds for sub-hour spans', () => {
assert.equal(formatClockDuration(42_000), '42s');
assert.equal(formatClockDuration(372_000), '6m 12s');
assert.equal(formatClockDuration(3_780_000), '1h 3m');
});