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) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5
parent
7f384eb9db
commit
41f0330e02
+6
-2
@@ -90,7 +90,11 @@ export function App() {
|
||||
* the source's wording; they can overrule it either way.
|
||||
*/
|
||||
const repeatsDaily = (row: RowEvent): boolean =>
|
||||
resolveDaily(row.event, prog.progress[row.event.id]?.daily);
|
||||
resolveDaily(
|
||||
row.event,
|
||||
prog.progress[row.event.id]?.daily,
|
||||
prefs.detectDaily,
|
||||
);
|
||||
|
||||
/** Today's state for a repeating event, or undefined if it does not repeat. */
|
||||
const dailyBadge = (row: RowEvent): DailyBadge | undefined => {
|
||||
@@ -395,7 +399,7 @@ export function App() {
|
||||
region={prefs.region}
|
||||
now={now}
|
||||
daily={repeatsDaily(openRow)}
|
||||
detectedDaily={isDaily(openRow.event)}
|
||||
detectedDaily={prefs.detectDaily && isDaily(openRow.event)}
|
||||
dailyDays={daily.daysFor(openRow.event.id)}
|
||||
onDaily={prog.setDaily}
|
||||
onToggleDay={daily.toggleDay}
|
||||
|
||||
@@ -86,6 +86,26 @@ export function Controls({
|
||||
Show events I've finished
|
||||
</label>
|
||||
|
||||
{/* Detection reads the source's wording and is wrong in both
|
||||
directions. Off leaves only the events the reader marked, and
|
||||
discards nothing — every mark and logged day survives, so it can
|
||||
be switched back on. */}
|
||||
<label className="flex cursor-pointer select-none items-start gap-2 text-xs text-muted">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={prefs.detectDaily}
|
||||
onChange={(e) => onUpdate({ detectDaily: e.target.checked })}
|
||||
className="mt-px size-4 accent-[var(--color-near)]"
|
||||
/>
|
||||
<span>
|
||||
Spot daily events automatically
|
||||
<span className="mt-0.5 block max-w-xs leading-relaxed text-faint">
|
||||
Off, only events you mark yourself get a checklist. Your ticks
|
||||
and streaks are kept either way.
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
|
||||
{ignoredCount > 0 && (
|
||||
<label className="flex cursor-pointer select-none items-center gap-2 text-xs text-muted">
|
||||
<input
|
||||
|
||||
@@ -10,6 +10,12 @@ export interface Prefs {
|
||||
hiddenGames: GameId[];
|
||||
/** How the list is ordered. Deadline order is the default and the fallback. */
|
||||
sort: SortMode;
|
||||
/**
|
||||
* Whether to guess which events repeat daily from what the source printed.
|
||||
* Off leaves only the ones the reader marked themselves; it never discards a
|
||||
* mark or a logged day, so it is reversible.
|
||||
*/
|
||||
detectDaily: boolean;
|
||||
showCompleted: boolean;
|
||||
/** Reveal events the reader has ignored, so they can be restored. */
|
||||
showIgnored: boolean;
|
||||
@@ -24,6 +30,7 @@ function defaults(): Prefs {
|
||||
region: guessRegion(),
|
||||
hiddenGames: [],
|
||||
sort: "ending",
|
||||
detectDaily: true,
|
||||
showCompleted: true,
|
||||
showIgnored: false,
|
||||
regionConfirmed: false,
|
||||
|
||||
Reference in New Issue
Block a user