Skip to content

Fix skin temp ignoring Fahrenheit unit preference in Deep Timeline (#101)#104

Closed
digitalerdude wants to merge 2 commits into
ryanbr:mainfrom
digitalerdude:meine-zweite-aenderung
Closed

Fix skin temp ignoring Fahrenheit unit preference in Deep Timeline (#101)#104
digitalerdude wants to merge 2 commits into
ryanbr:mainfrom
digitalerdude:meine-zweite-aenderung

Conversation

@digitalerdude

Copy link
Copy Markdown

Summary

Test plan

  • xcodebuild build -scheme Strand -destination 'platform=macOS' succeeds with no new warnings/errors.
  • Manual check on a device: Settings → Fahrenheit, open a day's Deep Timeline on the Skin Temp metric, confirm the readout, chart line, and axis all read in °F.

🤖 Generated with Claude Code

digitalerdude and others added 2 commits July 8, 2026 15:45
The Today screen's Effort hero circle always showed the raw internal
0-100 value regardless of the Effort scale preference (Settings ->
Units), so choosing the WHOOP 0-21 scale still displayed numbers like
47 instead of a 0-21 value. HeroScoreCell also hardcoded the vessel
fill fraction to score/100.

Convert the Effort score with UnitFormatter.effortValue(_:scale:) at
the call site and give HeroScoreCell an optional maxValue (default
100, unaffected for Charge/Rest) so the vessel fill matches the
displayed number on both scales.
…yanbr#101)

FullDayChartView hardcoded °C for skin temp everywhere — the readout label,
the axis, and the chart's own y-domain (computed from the raw plotted
points, not the formatter) — so switching the app to Fahrenheit had no
effect on this screen. Now it resolves the same UnitPrefs temperature
override MetricExplorerView already respects, and converts skin temp
points to °F upfront so the chart's axis and the readout stay in sync.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ryanbr ryanbr closed this Jul 9, 2026
digitalerdude pushed a commit to digitalerdude/noop that referenced this pull request Jul 9, 2026
…ryanbr#101)

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

ryanbr#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.

ryanbr#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 ryanbr#104: ryanbr#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 ryanbr#104 (closes ryanbr#45 + ryanbr#101). iOS-only; rides the next build (WSL can't
compile Swift).
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.

Skin temp metric not syncing with Fahrenheit The Effort scale setting doesn't seem to be applied to the Today screen. (UI)

2 participants