Session 55: Cycling only #232

Closed
opened 2026-11-08 19:55:58 +00:00 by chris-kreidl · 1 comment
chris-kreidl commented 2026-11-08 19:55:58 +00:00 (Migrated from github.com)

55 · Cycling only: strength out of the app

Phase: Cycling only 1/2 (owner request 2026-11-08, #231) · Branch: session/55-cycling-only · Depends on: nothing

Strength training went in early (sessions 08, 10, 12b): the coach prescribed it, the rules placed it, its fatigue fed ATL, and Progress charted estimated 1RMs. The owner never logged a strength session (production has no SessionLog or LoggedSet rows) and judges the design wasn't thought through. Take it out so the coaching can focus on the bike; strength may come back later as a fresh design, not this one. This session removes every reader and writer. The tables, columns and enum values stay (unused) until session 56 drops them, because production runs the previous build on the new schema during a deploy and after a rollback (CLAUDE.md → Migrations).

Read first

  • docs/requirements.md → "Strength alongside the bike", FR-1, FR-2, FR-3, FR-4, FR-8, FR-10, FR-12b, FR-15, FR-16 and the "Data model" and "AI design" sections (grep for strength, exercise, e1RM, RPE)
  • docs/decisions.md: grep for strength, RIR, exercise, 12b, TSS-eq
  • prisma/schema.prisma: SessionKind.strength, PlanTrigger.strength_logged, AiPurpose.normalise, ExercisePattern, DoseType, Equipment, AthleteProfile.strengthPerWeek and excludedExercises, Exercise, PlannedSession's strength fields, PlannedExercise, SessionLog, LoggedSet, DailyLoad.strengthTssEq, User.customExercises
  • Find the footprint with grep -rli 'strength\|exercise\|e1rm\|rir\b' src e2e evals scripts prisma/seed* (about 165 files at the time of writing)

Goal

  1. Plans. Generate, re-plan and chat prompts prescribe rides only: no strength sessions, no placement text, no strength in the output schemas (PlanDraft, PlanPatch). Bump each prompt version and re-record fixtures (bun run ai:record). Evals: drop or rewrite long-block-two-strength, and take strength out of the other athletes and replan base plans.
  2. The active plans. Plans are append-only. For each user's active plan whose remaining days hold strength sessions, write one new version without them: today's or a later strength session that wasn't logged is gone, past ones stay as history. Use an existing PlanOrigin and PlanTrigger if one fits, or add a value (adding an enum value is safe). Run it in the build's migrate step or as a one-off script: say which and why in docs/decisions.md. Older versions keep their strength sessions in the database. The plan views, version history and diff must still read them without crashing (skip or label them), since session 56 is the one that removes them.
  3. Rules. Remove strength-dose and exercise-selection. Remove strength from key-workout-protection (strength before a hard ride), availability (strength time), structure, training-load and RULES_CONFIG, plus their labels and settings rows. The overrides validator ignores stored strength keys (a user may have overridden them) and the settings save drops them.
  4. Load. Strength TSS-eq is gone: DailyLoad recompute writes strengthTssEq 0 (the column stays until 56), and form, projection and the "today" readout read bike TSS only. No stored logs exist, so no history changes. Check that by recomputing the owner's load on a bun run db:pull copy: CTL, ATL and TSB match before and after.
  5. Logging. Remove the strength logger (/log/strength, the draft, the exercise picker), the strength_logged trigger's producers, the normalise (exercise mapping) AI task and its model setting, and strength from Log, History, Today, Plan's calendar, session dialog and week totals, matching rides and the Strava upload.
  6. Profile and onboarding. Remove strength sessions per week, excluded exercises and lifting maxes from onboarding, Settings → Profile and the athlete fields. Stored values stay in the columns and are no longer read.
  7. Progress and export. Remove the e1RM chart and strength from the weekly TSS chart's sources. CSV and the account JSON export stop writing strength sets; the privacy page stops describing them.
  8. Docs. Rewrite FR-1, FR-2, FR-3, FR-4, FR-8, FR-10, FR-12b, FR-15 and FR-16 without strength. Replace "Strength alongside the bike" with a short note: removed 2026-11, why, and that a later design starts fresh. Data model: mark the strength tables as unused, to be dropped in 56. AI design: the new prompt versions, and no normalise task. Add a decisions entry.

Rules

  • No migration that drops, renames, retypes or tightens anything. Additive changes only (e.g. a new enum value). Session 56 drops them.
  • The previous build must keep working on this build's schema and data. That includes a new plan version with no strength sessions, and the previous build's strength logger writing a row during the deploy window (harmless; 56 drops it).
  • Plans stay append-only. No stored PlanVersion or past session is edited.
  • src/domain/ stays pure. Delete the domain code and its tests rather than leaving dead exports.

Tests

  • Unit: the rules suite without strength rules; load recompute with bike TSS only; the overrides validator accepts stored strength keys and drops them; plan views read an old version that holds strength sessions.
  • The active-plan step: a plan with future strength sessions gets one new version without them; past and logged ones stay; running it twice writes nothing the second time.
  • E2E: delete strength.e2e.ts and exercise-mapping.e2e.ts. Remove strength from e2e/support/test-user.ts and seed-progress.ts, and from any flow that asserts it (Today, Plan, charts, edits, export, a11y, keyboard).
  • Evals: bun run eval and bun run eval:replan stay 100% compliant with no strength in any plan.

Out of scope

Dropping the tables, columns and enum values (session 56). A new strength design. File anything else as an issue.

Done when

No screen, prompt, rule, export or AI task mentions strength. The owner's active plan has a new version without strength, and older versions still open. Load history is unchanged. The requirements read as a cycling app. Unit, typecheck, lint, format, audit and e2e pass. Add an owner check (a now issue): open Plan, Today, Progress, Settings and onboarding on the phone and confirm no strength is left. Finish with the end-of-session ritual in CLAUDE.md.

# 55 · Cycling only: strength out of the app **Phase:** Cycling only 1/2 (owner request 2026-11-08, #231) · **Branch:** `session/55-cycling-only` · **Depends on:** nothing Strength training went in early (sessions 08, 10, 12b): the coach prescribed it, the rules placed it, its fatigue fed ATL, and Progress charted estimated 1RMs. The owner never logged a strength session (production has no `SessionLog` or `LoggedSet` rows) and judges the design wasn't thought through. Take it out so the coaching can focus on the bike; strength may come back later as a fresh design, not this one. This session removes every reader and writer. The tables, columns and enum values stay (unused) until session 56 drops them, because production runs the previous build on the new schema during a deploy and after a rollback (`CLAUDE.md` → Migrations). ## Read first - `docs/requirements.md` → "Strength alongside the bike", FR-1, FR-2, FR-3, FR-4, FR-8, FR-10, FR-12b, FR-15, FR-16 and the "Data model" and "AI design" sections (grep for strength, exercise, e1RM, RPE) - `docs/decisions.md`: grep for strength, RIR, exercise, 12b, TSS-eq - `prisma/schema.prisma`: `SessionKind.strength`, `PlanTrigger.strength_logged`, `AiPurpose.normalise`, `ExercisePattern`, `DoseType`, `Equipment`, `AthleteProfile.strengthPerWeek` and `excludedExercises`, `Exercise`, `PlannedSession`'s strength fields, `PlannedExercise`, `SessionLog`, `LoggedSet`, `DailyLoad.strengthTssEq`, `User.customExercises` - Find the footprint with `grep -rli 'strength\|exercise\|e1rm\|rir\b' src e2e evals scripts prisma/seed*` (about 165 files at the time of writing) ## Goal 1. **Plans.** Generate, re-plan and chat prompts prescribe rides only: no strength sessions, no placement text, no strength in the output schemas (`PlanDraft`, `PlanPatch`). Bump each prompt version and re-record fixtures (`bun run ai:record`). Evals: drop or rewrite `long-block-two-strength`, and take strength out of the other athletes and replan base plans. 2. **The active plans.** Plans are append-only. For each user's active plan whose remaining days hold strength sessions, write one new version without them: today's or a later strength session that wasn't logged is gone, past ones stay as history. Use an existing `PlanOrigin` and `PlanTrigger` if one fits, or add a value (adding an enum value is safe). Run it in the build's migrate step or as a one-off script: say which and why in `docs/decisions.md`. Older versions keep their strength sessions in the database. The plan views, version history and diff must still read them without crashing (skip or label them), since session 56 is the one that removes them. 3. **Rules.** Remove `strength-dose` and `exercise-selection`. Remove strength from `key-workout-protection` (strength before a hard ride), `availability` (strength time), `structure`, `training-load` and `RULES_CONFIG`, plus their labels and settings rows. The overrides validator ignores stored strength keys (a user may have overridden them) and the settings save drops them. 4. **Load.** Strength TSS-eq is gone: `DailyLoad` recompute writes `strengthTssEq` 0 (the column stays until 56), and form, projection and the "today" readout read bike TSS only. No stored logs exist, so no history changes. Check that by recomputing the owner's load on a `bun run db:pull` copy: CTL, ATL and TSB match before and after. 5. **Logging.** Remove the strength logger (`/log/strength`, the draft, the exercise picker), the `strength_logged` trigger's producers, the normalise (exercise mapping) AI task and its model setting, and strength from Log, History, Today, Plan's calendar, session dialog and week totals, matching rides and the Strava upload. 6. **Profile and onboarding.** Remove strength sessions per week, excluded exercises and lifting maxes from onboarding, Settings → Profile and the athlete fields. Stored values stay in the columns and are no longer read. 7. **Progress and export.** Remove the e1RM chart and strength from the weekly TSS chart's sources. CSV and the account JSON export stop writing strength sets; the privacy page stops describing them. 8. **Docs.** Rewrite FR-1, FR-2, FR-3, FR-4, FR-8, FR-10, FR-12b, FR-15 and FR-16 without strength. Replace "Strength alongside the bike" with a short note: removed 2026-11, why, and that a later design starts fresh. Data model: mark the strength tables as unused, to be dropped in 56. AI design: the new prompt versions, and no normalise task. Add a decisions entry. ## Rules - No migration that drops, renames, retypes or tightens anything. Additive changes only (e.g. a new enum value). Session 56 drops them. - The previous build must keep working on this build's schema and data. That includes a new plan version with no strength sessions, and the previous build's strength logger writing a row during the deploy window (harmless; 56 drops it). - Plans stay append-only. No stored PlanVersion or past session is edited. - `src/domain/` stays pure. Delete the domain code and its tests rather than leaving dead exports. ## Tests - Unit: the rules suite without strength rules; load recompute with bike TSS only; the overrides validator accepts stored strength keys and drops them; plan views read an old version that holds strength sessions. - The active-plan step: a plan with future strength sessions gets one new version without them; past and logged ones stay; running it twice writes nothing the second time. - E2E: delete `strength.e2e.ts` and `exercise-mapping.e2e.ts`. Remove strength from `e2e/support/test-user.ts` and `seed-progress.ts`, and from any flow that asserts it (Today, Plan, charts, edits, export, a11y, keyboard). - Evals: `bun run eval` and `bun run eval:replan` stay 100% compliant with no strength in any plan. ## Out of scope Dropping the tables, columns and enum values (session 56). A new strength design. File anything else as an issue. ## Done when No screen, prompt, rule, export or AI task mentions strength. The owner's active plan has a new version without strength, and older versions still open. Load history is unchanged. The requirements read as a cycling app. Unit, typecheck, lint, format, audit and e2e pass. Add an owner check (a `now` issue): open Plan, Today, Progress, Settings and onboarding on the phone and confirm no strength is left. Finish with the end-of-session ritual in `CLAUDE.md`.
chris-kreidl commented 2026-11-08 20:15:06 +00:00 (Migrated from github.com)

Also: e2e/offline.e2e.ts logs a strength session offline. Rewrite it around a hand-logged ride, and wait for the service worker to report offline before saving; that should also fix its flake (#93).

Also: `e2e/offline.e2e.ts` logs a *strength* session offline. Rewrite it around a hand-logged ride, and wait for the service worker to report offline before saving; that should also fix its flake (#93).
Sign in to join this conversation.
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#232
No description provided.