Commit Graph

69 Commits

Author SHA1 Message Date
dfc883acb6 feat: replace per-workout-type phase-detection settings with one global pair
The 14 phase-related profile columns (warmup/cooldown per workout type,
plus an unused Interval pair) added more granularity than wanted. Migration
0006 drops all 14 and adds a single warmup_minutes/cooldown_minutes pair
applied uniformly to every fixed-duration workout type; Interval still
detects phases from lap data directly and ignores this setting. Restores
a simplified Phase detection section in the Profile UI with just the two
fields.
2026-07-18 08:53:21 +02:00
7f4877df57 feat: review queue polish (pace, sort, type filter), drop unused phase-detection UI
Review Queue: show pace alongside distance/duration/HR, sort by activity
date (most recent first) instead of classification timestamp, and add a
filter by workout kind with a special "Unsorted" option for runs where
the rule engine found zero candidates at all (distinct from ambiguous
multi-candidate runs).

Profile: remove the phase-detection warm-up/cool-down section from the
UI -- not used by anything yet (phase segmentation is future work) and
was adding noise. The underlying fields are untouched so no data is lost
and the settings screen still round-trips them on save.
2026-07-18 08:39:23 +02:00
75d8a8dd0d docs: fix stale env-var docs, document validateProfile's zone-range rationale
Two Minor findings from the final whole-branch review: the smartrun-dev
skill still told developers to set GARMIN_EMAIL/GARMIN_PASSWORD (now
sourced from the profile row instead), and validateProfile's deliberate
choice not to require 0-100% HR zone coverage had no explanation.
2026-07-17 19:36:51 +02:00
91b901ba60 fix: update seedsample for the fixed workout taxonomy and profile-based max HR
Update workout kinds by fixed name (via ListWorkoutKinds/UpdateWorkoutKind)
instead of creating new ones, since the taxonomy migration now seeds
Easy Run/Tempo/Interval by unique name. Set profile.MaxHeartRate so
avg_hr_pct_max is computed during classification, and drop the removed
appsync.Config.MaxHR field.
2026-07-17 19:29:02 +02:00
17ebe3c665 feat: add profile settings page and fixed-taxonomy WorkoutKinds UI with pace/HR-zone editing 2026-07-17 19:22:25 +02:00
9cfa3e138e feat: source Garmin credentials from the profile instead of env vars 2026-07-17 19:18:06 +02:00
c11dd152ba feat: classification reads max HR from the profile instead of static config
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-17 19:13:24 +02:00
078c87c413 feat: fix workout taxonomy to 7 types, add pace/HR-zone fields to the API 2026-07-17 19:09:55 +02:00
9c42931c9e fix: restore standard HR zone defaults, relax zone-boundary validation instead of migration 2026-07-17 19:06:01 +02:00
57be9065cd feat: add profile REST endpoints with HR zone validation
Implements GET /api/profile and PUT /api/profile endpoints with validation
of HR zones (must be contiguous, non-overlapping, 0-100%). Also updates
profile migration to use correct HR zone defaults (0-20, 20-40, etc.)
that match validation requirements.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-17 19:03:29 +02:00
6f62686d29 feat: support updating Garmin credentials at runtime
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-17 18:57:54 +02:00
684b026ff4 feat: add per-workout-type pace range and expected HR zone
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-17 18:53:55 +02:00
6e8bde7854 fix: rename colliding test workout kind name in sync test after taxonomy reseed
The migration 0004_workout_taxonomy.sql now seeds a fixed 'Tempo' kind.
The test was also creating a 'Tempo' kind, causing a UNIQUE constraint violation.
Renamed the test kind to 'Test Classification Tempo' to avoid collision.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-17 18:50:21 +02:00
69cb117eab feat: reseed workout_kinds with the fixed 7-type running taxonomy
- Add migration 0004_workout_taxonomy.sql to reset workout_kinds table
  with exactly 7 fixed named kinds (Easy Run, Long Run, Threshold 30',
  Threshold 60', Tempo, Interval, MAS Test), each with a never-matching
  placeholder rule
- Add test TestWorkoutTaxonomy_SeededWithSevenFixedTypes to verify all
  7 kinds are seeded and active
- Update TestKindAssignment_AppendOnlyHistoryAndCurrentView to use a
  unique kind name to avoid conflict with seeded kinds

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-17 18:48:04 +02:00
cfd315e132 fix: correct stale doc comment on Profile's Interval phase fields 2026-07-17 18:44:36 +02:00
4748917a25 feat: add single-profile settings table and store layer
Add Profile table to store Garmin credentials and engine configuration
parameters. Implements GetProfile() and UpdateProfile() store methods with
comprehensive test coverage. The profile singleton row is automatically
initialized on migration and persists all configuration state.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-17 18:41:37 +02:00
5fbc574d34 docs: merge plan tasks 9-11 into one so every commit typechecks cleanly 2026-07-17 18:38:14 +02:00
ece78526b4 chore: gitignore .superpowers/ scratch dir 2026-07-17 18:34:51 +02:00
f689f74ae0 Initial commit: smartrun MVP
Garmin run classification and progression tracker. Go backend (MCP
client to mcp-garmin, SQLite store, deterministic rule engine, REST
API) and React/TS frontend (Dashboard, Review Queue, Workout Kinds).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-17 18:33:06 +02:00