Add day-of and crock-pot start-by reminders (Feature 20)
CI / ci (push) Successful in 7m39s
CI / ci (pull_request) Successful in 7m24s

Register plan.Service.ReminderSchedules as the day_of_reminder schedule:
daily at the household reminder_time (period YYYY-MM-DD) it emits
day_of_reminder:YYYY-MM-DD, "Tonight: {dinner} · Recipe →" linking
/dinner/{id}; for a crock-pot dinner whose start_by is earlier than
reminder_time it also fires 15 minutes before start_by (period
start:YYYY-MM-DD) and emits day_of_reminder:start:YYYY-MM-DD, "Start the
crock pot by {time}". A date whose week has no plan emits nothing.

The scheduler gains DailyAt rules, whose fire time per date is looked up
from data on every pass (a failed lookup is retried every ClaimRetry),
and a Schedule Key that prefixes period keys so two schedules of one
name claim different periods.

Maestro task 30963b62-2803-4879-82ff-c351cc6628cf.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-10 12:51:54 -04:00
co-authored by Claude Opus 5.5
parent 15860fbbaf
commit a7a56623e5
9 changed files with 660 additions and 74 deletions
+5
View File
@@ -198,6 +198,11 @@ func run(cfg config.Config, logger *slog.Logger) error {
if err := sched.Register(planSvc.DraftSchedule()); err != nil {
return err
}
for _, sch := range planSvc.ReminderSchedules() {
if err := sched.Register(sch); err != nil {
return err
}
}
router, err := server.NewRouter(logger, version, cfg.TrustedProxy, authFlow, sessions, settings, search, ai, chatSvc, dinnerSvc, suggestSvc, planSvc, shopSvc, googleSvc, pushSvc, ideasSvc, runner, photos, frontend.Assets())
if err != nil {