fix(tasks): a cycle chip counts its days left whether ticked or not
It printed the unticked days left, so ticking a cycle off dropped its figure by one, and on the last day read 0d. Tasks now carry daysLeft, the period's days from today, and the chip prints that. Found in the whole-branch review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f19ef32e4a
commit
4427f6c2e5
3 files changed
+17
-2
No files matched your search
+2
-1
@@ -87,7 +87,7 @@ export function taskStatus(input: {
|
||||
return {
|
||||
scope, measure: "amount", periodStart: start, required, count,
|
||||
met: count >= required, needed: Math.max(0, required - count),
|
||||
open: left.length, shortfall: false,
|
||||
open: left.length, shortfall: false, daysLeft: left.length,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -100,6 +100,7 @@ export function taskStatus(input: {
|
||||
return {
|
||||
scope, measure: "days", periodStart: start, required, count,
|
||||
met: count >= required, needed, open, shortfall: needed > open,
|
||||
daysLeft: left.length,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user