feat(#2): адаптивный шедулер — сдвигает напоминания на «хорошие» часы из истории

This commit is contained in:
AnRil
2026-05-22 13:52:38 +07:00
parent 81481f2131
commit a0b89ddf71
7 changed files with 152 additions and 9 deletions

View File

@@ -118,6 +118,8 @@ export function validateExerciseInput(
}
if (category !== undefined) out.category = category
if (dailyGoal !== undefined) out.dailyGoal = dailyGoal
const adaptive = bool(raw.adaptive)
if (adaptive !== undefined) out.adaptive = adaptive
return out
}
@@ -166,6 +168,11 @@ export function validateExercisePatch(
out.dailyGoal = v
}
}
if ('adaptive' in raw) {
const v = bool(raw.adaptive)
if (v === undefined) return null
out.adaptive = v
}
// Allow scheduler-controlled fields to be patched (used by store.markDone
// through this same boundary), but range-check them.
if ('nextFireAt' in raw) {