feat(tasks): a task can repeat every N days from a dated start
A third period, { unit: "cycle", days, from }, cut in day-key space like
weeks and months, so each game's per-server reset carries over. Tasks on
it are tallied and switched apart (showCycleTasks, on by default), show
the days left in their chip, and the lower row's heading now names the
periods it holds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
42e3325a1f
commit
a80f581d8b
17 files changed
+286
-45
No files matched your search
@@ -139,6 +139,14 @@ describe("weekly and monthly tasks under the dailies", () => {
|
||||
expect(restored.showWeeklyTasks).toBe(true);
|
||||
expect(restored.showMonthlyTasks).toBe(false);
|
||||
});
|
||||
|
||||
test("cycle tasks are shown when the pref is absent or unreadable", () => {
|
||||
expect(defaults().showCycleTasks).toBe(true);
|
||||
expect({ ...defaults(), ...{ region: "europe" } }.showCycleTasks).toBe(true);
|
||||
expect(restorePrefsValue({}).showCycleTasks).toBe(true);
|
||||
expect(restorePrefsValue({ showCycleTasks: "no" }).showCycleTasks).toBe(true);
|
||||
expect(restorePrefsValue({ showCycleTasks: false }).showCycleTasks).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("restorePrefsValue", () => {
|
||||
@@ -165,6 +173,7 @@ describe("restorePrefsValue", () => {
|
||||
showChores: false,
|
||||
showWeeklyTasks: false,
|
||||
showMonthlyTasks: true,
|
||||
showCycleTasks: false,
|
||||
showCompleted: false,
|
||||
showIgnored: true,
|
||||
theme: "light" as const,
|
||||
|
||||
Reference in new issue
Block a user