Fix bugs, add auto-refresh, quick-complete tasks, and every-N-day routines

- Fix bot auth: merge duplicate on_ready handlers so session restore runs (#13)
- Fix push notifications: pass Uint8Array directly as applicationServerKey (#6)
- Show specific conflict reason on schedule save instead of generic error (#17)
- Add inline checkmark button to complete tasks on routines timeline (#18)
- Add visibility-change + 60s polling auto-refresh to routines, meds, tasks (#15)
- Add every-N-day routine scheduling: schema, API, scheduler, and UI (#16)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-19 19:04:52 -06:00
parent 24a1d18b25
commit ecb79af44e
10 changed files with 288 additions and 96 deletions

View File

@@ -663,14 +663,6 @@ def _restore_sessions_from_cache():
print(f"Restored {restored} user session(s) from cache")
@client.event
async def on_ready():
print(f"Bot logged in as {client.user}")
loadCache()
_restore_sessions_from_cache()
backgroundLoop.start()
@client.event
async def on_message(message):
if message.author == client.user:
@@ -866,6 +858,7 @@ async def on_ready():
print(f"Bot logged in as {client.user}", flush=True)
print(f"Connected to {len(client.guilds)} guilds", flush=True)
loadCache()
_restore_sessions_from_cache()
backgroundLoop.start()
presenceTrackingLoop.start()
print(f"[DEBUG] Presence tracking loop started", flush=True)