diff options
Diffstat (limited to 'src/lib/shared/routine-metrics.ts')
| -rw-r--r-- | src/lib/shared/routine-metrics.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/shared/routine-metrics.ts b/src/lib/shared/routine-metrics.ts index 59413c2..4af989d 100644 --- a/src/lib/shared/routine-metrics.ts +++ b/src/lib/shared/routine-metrics.ts @@ -64,8 +64,10 @@ export function computeRoutineState( // Buckets on overdue time in units of the routine's own frequency: // not due / due now / late (half a period overdue) / very late (a full // period overdue — a weekly routine two weeks old lands here). + // A routine that was never done is always at least due: there is + // something to do, even right after creation. const status: RoutineStatus = - rawRatio < 0 + rawRatio < 0 && lastDoneMs !== null ? 'ok' : overdueRatio < 0.5 ? 'due' |
