Fix skin temp ignoring Fahrenheit unit preference in Deep Timeline (#101)#104
Closed
digitalerdude wants to merge 2 commits into
Closed
Fix skin temp ignoring Fahrenheit unit preference in Deep Timeline (#101)#104digitalerdude wants to merge 2 commits into
digitalerdude wants to merge 2 commits into
Conversation
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>
2 tasks
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
UnitPrefs.temperatureoverride).Test plan
xcodebuild build -scheme Strand -destination 'platform=macOS'succeeds with no new warnings/errors.🤖 Generated with Claude Code