feat(todo): Reporting, with goals, streaks and what was done (ADR 0033, D36)
A daily and a weekly goal, each with its progress, streak and chart, days off and vacation mode, and the history of completed tasks by project, all worked out on the device from what the tasks keep. Today shows a quiet card once a day when the goal is reached. No karma, nothing to share. Whats-New: Reporting: set a daily and a weekly goal, follow your streaks and see what you've done, with days off and vacation, under Browse. Whats-New-De: Auswertung: Lege ein Tages- und ein Wochenziel fest, verfolge deine Serien und sieh, was du erledigt hast, mit freien Tagen und Urlaub, in der Übersicht. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
016b74ff74
commit
bd1b19ed32
1 changed files with 1651 additions and 3 deletions
|
|
@ -25,6 +25,43 @@ void main() {
|
|||
);
|
||||
});
|
||||
|
||||
test('goals, days off and vacations read back as they were set', () {
|
||||
const settings = TodoSettings(
|
||||
goals: GoalSettings(
|
||||
daily: 3,
|
||||
weekly: 12,
|
||||
daysOff: {DateTime.sunday},
|
||||
vacations: [
|
||||
Vacation(Day(2026, 8, 1), Day(2026, 8, 14)),
|
||||
Vacation(Day(2026, 11, 1)),
|
||||
],
|
||||
celebrated: Day(2026, 11, 6),
|
||||
),
|
||||
);
|
||||
|
||||
expect(decodeSettings(encodeSettings(settings)), settings);
|
||||
});
|
||||
|
||||
test('a goal of nothing or a weekday out of range reads as at first', () {
|
||||
expect(
|
||||
decodeSettings(
|
||||
payload({
|
||||
'schemaVersion': 1,
|
||||
'goals': {
|
||||
'daily': 0,
|
||||
'weekly': -2,
|
||||
'daysOff': [9, DateTime.monday],
|
||||
'vacations': [
|
||||
{'from': 'soon'},
|
||||
3,
|
||||
],
|
||||
},
|
||||
}),
|
||||
)?.goals,
|
||||
const GoalSettings(daysOff: {DateTime.monday}),
|
||||
);
|
||||
});
|
||||
|
||||
test("Upcoming's Display reads back as it was set", () {
|
||||
const settings = TodoSettings(
|
||||
upcoming: UpcomingView(
|
||||
|
|
|
|||
Loading…
Reference in a new issue