Ready batch: projection, Undo re-plan, stored zones, price check #293

Merged
chris-kreidl merged 6 commits from fix/ready-batch-2026-11-18 into main 2026-11-19 04:01:38 +00:00
chris-kreidl commented 2026-11-19 03:44:10 +00:00 (Migrated from github.com)

Four Ready issues, one commit each.

  • #101 Progress's fitness projection counts planned sessions from today on. Days since the last stored load are treated as rest, as on Today, so missed rides no longer count as ridden.
  • #120 Undo re-plans the restored version right away if your schedule or training-rule settings changed after it was made. That means a profile_changed ReplanTrigger newer than the version, so no migration is needed. Help (your-plan.md) and FR-13 are updated.
  • #159 Progress reads time in zone from stored histograms instead of decoding every ride stream. Power uses Ride.powerHistogram (30 s power over riding time, the measure Today and ride feedback use; your choice). Heart rate uses a new Ride.hrHistogram, added in one additive migration. Both are stored at import. Older rides are filled once by rideHistograms, which Today now shares too. power-histogram.ts is renamed to zone-histograms.ts.
  • #203 prompts/94-dependency-check.md now checks the price table in src/ai/cost.ts each round.

Expect a change on Progress: the power zones now count 30 s power over riding time, so stops are no longer Z1 and the short spikes in Z6–Z7 smooth out. A ride's own page still counts raw power; that's follow-up #292.

Checks

  • bun test: 1540 pass, 0 fail. New tests: the missed-session projection (fails on the old code), Undo's trigger, the HR histogram and its zones, and the lazy fill storing both histograms.
  • typecheck, lint, format:check, check-migrations, audit: all clean. Local DB matches the schema (no drift).
  • Playwright: plan-history, replan (including Undo), charts, ride and clearer-state all pass (10 flows).

Left open

  • #292: the ride page's time in zone.
  • The eval batch (#162, #181, #182, #184) comes in a separate PR.

Closes #101
Closes #120
Closes #159
Closes #203

🤖 Generated with Claude Code

Four Ready issues, one commit each. - **#101** Progress's fitness projection counts planned sessions from today on. Days since the last stored load are treated as rest, as on Today, so missed rides no longer count as ridden. - **#120** Undo re-plans the restored version right away if your schedule or training-rule settings changed after it was made. That means a `profile_changed` ReplanTrigger newer than the version, so no migration is needed. Help (`your-plan.md`) and FR-13 are updated. - **#159** Progress reads time in zone from stored histograms instead of decoding every ride stream. Power uses `Ride.powerHistogram` (30 s power over riding time, the measure Today and ride feedback use; your choice). Heart rate uses a new `Ride.hrHistogram`, added in **one additive migration**. Both are stored at import. Older rides are filled once by `rideHistograms`, which Today now shares too. `power-histogram.ts` is renamed to `zone-histograms.ts`. - **#203** `prompts/94-dependency-check.md` now checks the price table in `src/ai/cost.ts` each round. **Expect a change on Progress:** the power zones now count 30 s power over riding time, so stops are no longer Z1 and the short spikes in Z6–Z7 smooth out. A ride's own page still counts raw power; that's follow-up #292. ## Checks - `bun test`: 1540 pass, 0 fail. New tests: the missed-session projection (fails on the old code), Undo's trigger, the HR histogram and its zones, and the lazy fill storing both histograms. - typecheck, lint, `format:check`, `check-migrations`, audit: all clean. Local DB matches the schema (no drift). - Playwright: plan-history, replan (including Undo), charts, ride and clearer-state all pass (10 flows). ## Left open - #292: the ride page's time in zone. - The eval batch (#162, #181, #182, #184) comes in a separate PR. Closes #101 Closes #120 Closes #159 Closes #203 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ckreidl/trainer!293
No description provided.