Skip to content

Today/Deep Timeline: respect °F + Effort scale on the hero, with one-decimal Effort (#45, #101)#121

Merged
ryanbr merged 1 commit into
mainfrom
ios-timeline-temp-effort-104
Jul 9, 2026
Merged

Today/Deep Timeline: respect °F + Effort scale on the hero, with one-decimal Effort (#45, #101)#121
ryanbr merged 1 commit into
mainfrom
ios-timeline-temp-effort-104

Conversation

@ryanbr

@ryanbr ryanbr commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Reimplements the two fixes from #104 under our own identity, with the Effort display-precision nit fixed. Supersedes #104closes #45 and #101.

#101 — Deep Timeline skin temp respects °F

FullDayChartView hardcoded skin temp to °C. Now a displayPoints projection converts to °F when the user's temperature preference is Fahrenheit, and the chart line, y-axis domain + gridlines, stats footer, readout, and unit suffix all read from it. The timeline series is the absolute skin temp (skinTempCelsius), so the absolute ×9/5+32 conversion is correct (not a deviation rescale). Mirrors MetricExplorerView.

#45 — Today hero Effort respects the Effort scale

The hero Effort vessel ignored the 0–100 vs WHOOP-0–21 setting (always 0–100). Now it shows effortValue(strain, scale) with a matching vessel max (100 or 21) — the fill stays exact while the number honours the toggle like every other Effort read-out.

The fix over #104

#104 fed the raw value straight to CountUpNumber, which renders Int(rounded()) — so on the WHOOP 0–21 scale the hero showed "13" instead of the one-decimal "12.6" that the app-wide effortDisplay convention (and WHOOP itself) uses, inconsistent with the Effort tile on the same screen. CountUpNumber gains a decimals param (default 0 keeps Charge/Rest/100-scale byte-identical); the 0–21 Effort hero passes 1. Accessibility label matches.

Notes

  • iOS/macOS only — not locally compile-verified (WSL can't build Swift); self-reviewed (TrendPoint(date:value:) init confirmed; the other four CountUpNumber call sites use the no-decimals form and are unchanged). Rides the next build.
  • Worth a follow-up check on whether Android's Deep Timeline / Today hero have the same two gaps, for lockstep.

Reimplement the two fixes from #104 under our own identity, with the Effort
display-precision nit fixed:

#101 — Deep Timeline (FullDayChartView) hardcoded skin temp to °C. Route the
chart line, y-axis domain + gridlines, stats footer and readout through a
displayPoints projection that converts to °F when the user's temperature
preference is Fahrenheit (the series is the ABSOLUTE skinTempCelsius, so the
absolute ×9/5+32 conversion is correct — not a deviation rescale), and label the
suffix from the resolved unit. Mirrors MetricExplorerView.

#45 — the Today hero Effort vessel ignored the Effort-scale setting (always 0–100).
Show it on the chosen scale via effortValue(strain, scale) with a matching vessel
max (100 or 21), so the fill stays exact while the number honours the toggle like
every other Effort read-out.

Nit over #104: #104 fed the raw value to CountUpNumber, which renders
Int(rounded()), so the WHOOP 0–21 hero showed "13" instead of the one-decimal
"12.6" the app-wide effortDisplay convention (and WHOOP itself) uses — visibly
inconsistent with the Effort tile on the same screen. CountUpNumber gains a
decimals param (default 0 keeps Charge/Rest/100-scale byte-identical); the 0–21
Effort hero passes 1. Accessibility label matches.

Supersedes #104 (closes #45 + #101). iOS-only; rides the next build (WSL can't
compile Swift).
@ryanbr ryanbr merged commit ed688e4 into main Jul 9, 2026
digitalerdude pushed a commit to digitalerdude/noop that referenced this pull request Jul 9, 2026
FullDayChartScreen hardcoded skin temp to °C — the chart line, y-axis, stats and
readout all ignored the Fahrenheit unit preference. Add a displayPoints projection
that converts the ABSOLUTE per-timestamp skin temp (skinTempCelsius) with the
absolute x9/5+32 (not a deviation rescale) when °F is selected, and route the
chart, stats and readout through it; the suffix now reads from the resolved unit.
Read the preference once per composition via UnitPrefs.temperature(context),
mirroring CompareScreen.

Lockstep companion to the iOS FullDayChartView fix (the ryanbr#101 half of PR ryanbr#121);
the Effort-scale half of that PR does NOT apply here — Android's Today hero
already honours the Effort scale + one-decimal WHOOP display (ScoreHeroRow, #313).

Verified: :app:compileFullDebugKotlin passes.
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.

The Effort scale setting doesn't seem to be applied to the Today screen. (UI)

1 participant