Skip to content

Add per-dog distraction analytics and event annotations - #63

Merged
OwenTanzer merged 1 commit into
mainfrom
codex/issue-55-distraction-analytics
Jul 22, 2026
Merged

Add per-dog distraction analytics and event annotations#63
OwenTanzer merged 1 commit into
mainfrom
codex/issue-55-distraction-analytics

Conversation

@OwenTanzer

Copy link
Copy Markdown
Owner

Summary

  • add per-dog distraction summaries using observed ordinal distributions and median severity categories
  • add a mobile-friendly timeline that displays one selected distraction category at a time
  • preserve missing-data semantics by charting only explicitly logged observations, including explicitly recorded Absent values
  • add persistent dated dog events with create, edit, and delete controls
  • render dog events as vertical contextual annotations on the distraction timeline
  • remove a dog's contextual events when the dog is deleted and backfill the new collection for existing databases

Why

Issue #55 asks for longitudinal distraction analytics without inventing zero-value observations or introducing false precision. A categorical distribution plus an observed median keeps the scale ordinal, while the single-series selector keeps the chart readable on small screens. Dated event annotations give trainers context for changes in behavior over time.

Data and compatibility

  • adds dogEvents to the shared database blob and Worker default blob
  • normalizes older persisted blobs that do not contain dogEvents
  • stores domain dates separately from audit timestamps
  • requires non-empty labels and valid calendar dates

Validation

  • npm test — 28 tests passed, including ordinal aggregation and no-fabricated-observation coverage
  • npm run build — production TypeScript and Vite build passed
  • npm run lint — passed with 3 pre-existing warnings
  • npm run typecheck in worker/ — passed
  • git diff --check — passed

Closes #55

@OwenTanzer
OwenTanzer marked this pull request as ready for review July 22, 2026 21:05
@OwenTanzer
OwenTanzer merged commit 034c9a3 into main Jul 22, 2026
1 check passed
@OwenTanzer
OwenTanzer deleted the codex/issue-55-distraction-analytics branch July 22, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Distraction analytics timeline with averages and annotated events

1 participant