feat: let the reader switch off daily detection

Guessing from a source's wording is right most of the time, and someone
who finds it wrong often enough should be able to stop it rather than
dismiss the same false positive every patch.

Off, only events the reader marked themselves get a checklist. It
silences the guess rather than deleting anything: overrides, ticks and
streaks all survive, so switching it back on restores exactly what was
there. With it off, marking an event stores an explicit yes, since there
is no longer a detection for an override to agree with.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Lucas WintherandClaude Opus 5 committed 2026-08-15 22:26:16 +02:00
1 parent 7f384eb9db
commit 41f0330e02
8 files changed
+64 -11

No files matched your search

+9
View File
@@ -73,6 +73,15 @@ describe("resolveDaily", () => {
expect(resolveDaily(plain, true)).toBe(true);
});
test("detection can be switched off entirely", () => {
// The preference only silences the guess. Nothing the reader marked is
// affected, and no logged day is touched, so it is reversible.
expect(resolveDaily(detected, undefined, false)).toBe(false);
expect(resolveDaily(detected, true, false)).toBe(true);
expect(resolveDaily(plain, true, false)).toBe(true);
expect(resolveDaily(detected, undefined, true)).toBe(true);
});
test("the reader can unmark a false positive", () => {
// A banner whose blurb happens to mention "daily login rewards" should not
// be stuck with a twenty-box checklist the reader cannot dismiss.