Skip to content

feat(training): rebuild Training Load on the shared design kit - #29

Merged
DX23876 merged 6 commits into
mainfrom
redesign/d-training-load
Sep 17, 2026
Merged

DX23876 merged 6 commits into
mainfrom
redesign/d-training-load

Conversation

@DX23876

@DX23876 DX23876 commented Sep 17, 2026

Copy link
Copy Markdown
Owner

Summary

Fourth package of the redesign. Stacked on #26 → #27 → #28; until those merge, this diff includes them.

The Training Load screen stacked thirteen full-width cards under a dual ring. It now reads top to bottom as:

  1. Two lane cards, Strength and Cardio, with the percentage vs usual, status pill, measured figure, 8-week trend, coverage or "below your usual since …", thin-data caveat, and the provisional strength amount before a comparison exists. On iOS each card opens its own screen.
  2. Maturity line while there is no personal baseline yet.
  3. Duplicate review and sustained overload notices, unchanged, shown only when they apply.
  4. Four tiles (Adaptation, Recovery, Last 8 weeks, Session load). Each opens the existing card in full in a sheet.
  5. Strength and cardio development, side by side on wide windows.
  6. Shape of the week.
  7. How it works: maturity, data coverage, method and sources.

Value checklist, before → after

Before After
Ring + lane rows: working sets, weighted sets, TRIMP, "at least", % vs usual, rated/complete counts, below-since, caveat, provisional ring Lane cards (the "× usual" ratio stays in the 8-week sheet chart) ✅
Precision / maturity card Maturity line + explainer ✅
Duplicate review, sustained overload Unchanged ✅
Adaptation card Tile (both lanes' state) → full card ✅
Recovery card (HRV/RHR/breathing tiles, nights meter, summary) Tile (summary + three signal dots) → full card ✅
Last 8 weeks (ratio chart, status strip) Tile (8-week strip per lane) → full card ✅
Session load card Tile (AU, % vs usual) → full card ✅
Strength development (donut), cardio development (VO₂max, sparkline, source, method break) Unchanged cards ✅
Shape of the week Unchanged ✅
Data coverage, method + sources Explainer sheets ✅
Statement and legend cards Already not shown before this PR; dead code removed

Removed as unused: LoadDualRing, LoadRingReading, TrainingHeroSurface with its glow views, LoadZoneLegend, and the dial-scale parts of LoadScale (ratioText stays). TrainingStatusModel.statement and its tests are untouched.

Verification

  • iPhone 17 Pro simulator (--demo-seed --demo-screen trainingload, German locale):
    • dark and light screenshots of every section;
    • all four tile sheets and both explainer sheets opened;
    • one truncated tile title found and fixed.
  • macOS: xcodebuild -scheme Strand builds. Lane cards do not navigate there, because the detail column has no navigation stack.
  • Tests: TrainingLoadLanesTests, TrainingDesignKitTests, TrainingLoadChartSegmentsTests, TrainingLoadCardioAxisTests, TrainingLoadRatingsTests: 30 pass.
  • Strings: no new keys (checked against the build's .stringsdata).
  • Doc lint: OK.

Analysis migration required: no

Strength and Cardio both used effortColor, so the two training lanes were
indistinguishable. Each lane now owns one identity colour for all seven
chart styles in light and dark: electric teal for Strength and violet for
Cardio, kept clear of the status and Charge colours so a lane never reads
as a warning. The hexes live in LaneColorTable and LaneColorTests pin hue
separation and white-text contrast on the deep tones.

Analysis migration required: no
Move the detached computation in TrainingLoadModel.load into a static
prepare function without changing a line of its arithmetic, so a fixture
can run it. The pinned figures cover rated and unrated sets, an unknown
cardio day inside and outside the window, a duplicate awaiting review and
a session rated twice.

Analysis migration required: no
…s lanes

The Cardio and Strength screens computed "load vs your usual" their own
way: Cardio could fall back to non-TRIMP effort and knew no unknown days,
and both compared only through today. Tapping from Training Load to either
screen could therefore show a different percentage for the same week.

TrainingLoadLanes now holds the one strength and cardio lane computation,
read through any day. Training Load reads it through today. Cardio and
Strength read it through the selected week's Sunday, over their history
window plus the 84-day lookback a reading needs, and their load tiles and
coach context use it.

Analysis migration required: no
The three screens get one visual grammar while each keeps its own layout:
a lane hero card with status pill, count-up percentage and trend line,
a KPI strip, a load-over-time chart with 7D/4W/12W and the usual-week
band, summary tiles that open their full card, explainer rows that move
method text into sheets, a shared week control and a two-column layout
for wide windows. Blocks take finished values and only design tokens.
No screen uses them yet.

Analysis migration required: no
The screen stacked thirteen full-width cards under a dual ring whose two
arcs and centre words were hard to tell apart. It now opens on two lane
cards (percentage, status, measured figure, trend, coverage, caveat and
the provisional strength amount), a maturity line, the duplicate and
overload notices, four tiles that open the full Adaptation, Recovery,
8-week and Session load cards, the development cards, week shape, and
explainer rows for maturity, data coverage and method.

The dual ring, its reading type and hero surface, the unused statement
and legend cards and the dial scale helpers are removed.

Analysis migration required: no
Copilot AI balanced review requested due to automatic review settings September 17, 2026 16:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@DX23876
DX23876 merged commit 15bbbea into main Sep 17, 2026
21 of 24 checks passed
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.

2 participants