You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
replace General with custom distance + fix 10K VDOT
Replace the "General training" distance card with a "Custom" card
that lets the user enter any race distance (1–200 km/mi). Custom
distances route to the closest predefined plan template:
≤ 15.5 km → 10k template
≤ 31.5 km → half-marathon template
> 31.5 km → marathon template
The unit toggle propagates to the custom-distance input — entering
"15" in km mode then toggling to mi shows "9.25". Typing in the
custom field auto-selects the Custom radio.
While in there, switch VDOT computation from table lookup to
Daniels' canonical formula. The previous TEN_K_VDOT table I'd added
during the audit had wrong values (35:11 indexed as VDOT 50 when it's
actually VDOT 60); the formula corrects this and also makes custom
distances consistent with predefined ones. Half-marathon and marathon
VDOT values are unchanged. Pace tables (PACE_S/M/U/I/R) remain as
VDOT-indexed lookups since those are the methodology deliverable.
I18N: replace `0`/`general`-keyed entries with `custom`; add
`labelCustomDistance` and `errCustom` strings in EN+ES.
Tests: 9 new tests covering computeVDOT, closestTemplate, and the
custom-distance plan flow. Updated VDOT-lookup tests for the
corrected 10k values. 142 tests, 0 failures.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CLAUDE.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,8 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
6
6
7
7
vtrain is a single-page static site that generates 12-week running training plans following Jack Daniels' VDOT methodology. Hosted on GitHub Pages at `vtrain.jandroav.net`. The UI is bilingual (English default, Spanish toggle) and supports both km and miles via a unit toggle. UI copy lives in `I18N`. Workouts in `PLAN_CONFIG` are stored in km + Spanish Daniels notation and converted at render time: `translateWorkout` for ES→EN, `applyUnitToWorkout`/`paceKmToMi`/`applyUnitToKmTotal` for km→mi (track meter reps stay metric — track is universal). Distance precision: continuous values round to 0.25 mi, weekly totals round to whole miles.
8
8
9
+
VDOT is computed via Daniels' canonical formula in `computeVDOT(distanceKm, raceTimeSeconds)` — no race-time lookup tables. This gives consistent values for any race distance (predefined or custom). Custom distances route to the closest predefined plan template (10/21/42 km) via `closestTemplate(distanceKm)`.
10
+
9
11
## Files
10
12
11
13
-**`index.html`** — form (distance / race date / goal time) and output container. Inline CSS, dark theme.
Copy file name to clipboardExpand all lines: README.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,12 @@
1
1
# vtrain
2
2
3
-
12-week training plan generator following [Jack Daniels'](https://en.wikipedia.org/wiki/Jack_Daniels_(coach)) VDOT methodology — for 10k, half-marathon, marathon, and general training.
3
+
12-week training plan generator following [Jack Daniels'](https://en.wikipedia.org/wiki/Jack_Daniels_(coach)) VDOT methodology — for 10k, half-marathon, marathon, or any custom race distance.
-**Any race distance**: pick from the four predefined distances (marathon, half, 10k) or enter a custom distance — vtrain routes custom distances to the closest predefined plan template
9
10
-**Daniels methodology**, 12 weeks across the four phases:
10
11
-**Phase I — Foundation** (s1–s3): easy running + strides
11
12
-**Phase II — Early Quality** (s4–s6): repetition (R) work
0 commit comments