Commit Graph

9 Commits

Author SHA1 Message Date
cf29d17183 Also suppress nags for skipped medications 2026-02-19 20:40:31 -06:00
cc1aace73d Fix presence tracking and med reminder bugs 2026-02-19 20:31:43 -06:00
e9a2f96f91 Fix offset-naive/aware datetime error in nag checker
Make last_nag_at timezone-aware before subtracting from the tz-aware
current_time, and store future nag timestamps with timezone.utc to
prevent the mismatch recurring.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-19 19:43:32 -06:00
288e447d3e Fix nagging for doses not yet due — check scheduled time before nagging
should_send_nag() was iterating all pending schedules for today without
verifying the scheduled time had actually passed. A dose scheduled for
18:00 would get nagged at 13:15. Add an early return when current_time
is before the scheduled dose time.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 13:17:51 -06:00
d2b074d39b Fix VARCHAR vs TIME type mismatch in med_logs queries (#15)
The medication_schedules.adjusted_time column is a TIME type, but
med_logs.scheduled_time is VARCHAR. When adjusted_time values were
passed into queries against med_logs, PostgreSQL rejected the
comparison. Add _normalize_time() to convert datetime.time objects
to "HH:MM" strings at the entry points of should_send_nag,
record_nag_sent, and mark_med_taken.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 13:14:20 -06:00
f826e511d5 fixing snitch and adaptive medication timing persistance and logic 2026-02-17 18:52:35 -06:00
8ac7a5129a fixed spamming i hope 2026-02-17 18:11:44 -06:00
d673d73530 opus pass 2 2026-02-17 00:30:05 -06:00
d4fb41ae6b Add adaptive medication timing, Discord presence tracking, and nagging system 2026-02-16 20:00:53 -06:00