The check read "already sent?" and recorded the send afterwards, so two
overlapping checks could both notify. Claim the (goal, day) row first
with ON CONFLICT DO NOTHING and release it if ntfy fails, so a later
check retries. The handler now returns a typed result instead of a
map[string]any, and shares one ntfy client. Fix two comments that still
said nginx.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Like job-tracker, the tracker forwards the visitor's cookies to the site
backend's /auth/validate-admin instead of asking for an API key. Signed
in, the dashboard shows every device's data. The new /setup page has
instructions for each collector and creates and revokes API keys. The
userscript is served publicly at /tracker.user.js.
Co-Authored-By: Claude Opus 5.5 <[email protected]>