Commit Graph
5 Commits
Author SHA1 Message Date
adamf 667091efb0 Expand tracker analytics and dashboard UX
Test and publish / publish (push) Successful in 4m27s
Test and publish / test (push) Successful in 9m45s
2026-10-23 20:16:50 +01:00
adamfandClaude Opus 5.5 cfe17ecf5d Fix location races, run database tests in CI, add make check
Test and publish / test (push) Has been cancelled
Test and publish / publish (push) Has been cancelled
Location: a leave decided its destination before taking the device lock,
so a "leave home" racing an "arrive gym" could undo the arrival. The
decision (now ingest.Destination) runs inside MoveTo under the lock.
Transition external IDs were device|label|time, which collided (500) when
out-of-order events were clamped to the same start; they now name the
interval being closed.

hypr-agent: a control command arriving during shutdown no longer blocks
its goroutine forever.

Tests: internal/testdb gives each database test its own throwaway
database, so they run in parallel and no longer truncate the dev data.
New store tests cover both location bugs. CI starts a Postgres container
so these tests actually run, and adds gofmt, staticcheck (pinned as a go
tool) and -race. `make check` runs the same locally.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 22:48:41 +01:00
adamfandClaude Opus 5.5 67638cdef0 Replace Apple Health ingest with iPhone location geofences
POST /api/v1/location/{arrive,leave} records place intervals (home or a
named place, and away in between) from Shortcuts automations. A stale
"leave" for a place the device has already left is ignored. The Health
Auto Export endpoint and its normalizer are removed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 22:06:25 +01:00
adamfandClaude Opus 5.5 e6a93be15c Gate the dashboard on the site's admin login and add a setup page
Test and publish / test (push) Successful in 25s
Test and publish / publish (push) Successful in 3m1s
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]>
2026-10-14 21:22:02 +01:00
adamfandClaude Opus 5.5 f4ce04875c Add activity tracker server, Hyprland agent and Gitea image publishing
Test and publish / test (push) Successful in 2m38s
Test and publish / publish (push) Failing after 2m30s
The Go API on PostgreSQL ingests desktop, browser, presence, manual and
Health Auto Export events and serves activities and daily goal summaries.
The Hyprland agent records window focus, idle and lock intervals.

The CI workflow publishes adam-french.co.uk/adamf/activity-tracker to the
Gitea registry and rolls the web_server stack onto it. The image probes
itself through a new `tracker healthcheck` command, because distroless
has no wget.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 20:38:12 +01:00