Repository navigation
fix(charge): show skin temperature in the reader's unit in the Charge breakdown - #2904
Open
UtkuDenizAltiok wants to merge 1 commit into
Open
UtkuDenizAltiok wants to merge 1 commit into
UtkuDenizAltiok wants to merge 1 commit into
Conversation
… breakdown
The "What shaped it" skin-temperature row printed the engine's Celsius
deviation to everyone, with no degree sign in English ("+0.4 C vs
baseline"), even when Settings asks for Fahrenheit. Both platforms did it:
Apple shows the engine's Celsius-only valueText verbatim, Android formatted
the typed value with a Celsius-only string.
The engine text stays as it is (it is pinned byte-for-byte across Swift and
Kotlin). The display layer now formats the row from the night's raw
deviation in the reader's unit: "+0.4 °C vs baseline" or "+0.8 °F vs
baseline". A difference converts by 9/5 with no +32 offset, from the
unrounded value (0.44 °C is 0.792 °F, so +0.8, not the +0.7 a rounded +0.4
would give). Apple's separate relative row ("vs your normal") follows the
same rule.
Rounding is explicit and shared: half away from zero, once, the display rule
RecoveryScorer.displayRounded already applies to breathing. Foundation's
locale formatter rounds a tie the other way from Java's (0.25 printed +0.2
on Apple and +0.3 on Android) and prints "-+0.0" for a negative zero; the
old hand-built sign on Apple's relative row printed "+-0.0". Anything that
rounds to zero now prints +0.0 on both platforms.
Apple: ChargeBreakdownFormat.skinTempDeviationFigure / displayDriver;
ChargeBreakdownSection reads the unit preference the way other temperature
read-outs do, so all three hosts (Today sheet, Intelligence, Coupled) are
covered. Android: chargeDriverTempDeviation in TodayScreen.kt and a new
today_driver_value_temp_deviation_fahrenheit string in every locale; the
Italian Celsius string gains its missing degree sign.
Verified by oracle: the Swift twin compiled standalone over 21 inputs per
unit, its stdout pasted verbatim as the Kotlin test's expected values.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
UtkuDenizAltiok
added a commit
to UtkuDenizAltiok/noop
that referenced
this pull request
Nov 6, 2026
…yanbr#2905 (sleep-debt source)
DX23876
pushed a commit
to DX23876/noop
that referenced
this pull request
Nov 8, 2026
Adopted from ryanbr#2899 and ryanbr#2904 (by @UtkuDenizAltiok), merged by hand because both edit the same block, plus the same fix for the Forge design. - The classic Charge breakdown (Today, Intelligence, Coupled, macOS) drew the scorer's "Skin temperature" driver row and then a separate SkinTempDeviationRow for the same deviation. The extra row now shows only when no driver row already reports it (ryanbr#2899). - Both rows printed the engine's Celsius figure without a degree sign to everyone, Fahrenheit readers included. They now show the reader's unit ("+0.4 °C" / "+0.8 °F vs baseline"); a difference converts by 9/5 with no +32 offset (ryanbr#2904). The engine text stays unchanged. - Forge's Charge page and Today driver rows (ForgeToday.driverValue) always printed "°C vs usual". They now use the same figure in the reader's unit; the key "%@ °C vs usual" becomes "%@ vs usual" with the existing translations minus the hard-coded unit. - Polish "%@ względem bazy" reads "%@ względem wartości bazowej". The Android (Kotlin) hunks are left out and can follow separately; this change covers the Apple apps only. Not compiled here (no Swift toolchain in this environment). Analysis migration required: no Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015AWc14WNvMmSF4RHP6ww4d
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.
What
The Charge breakdown's skin-temperature row ("What shaped it") printed the engine's Celsius deviation to everyone, even when Settings asks for Fahrenheit. The English text also had no degree sign. It happened on both platforms:
valueTextverbatim, which is Celsius-only by contract:+0.4 C vs baseline.%1$s C vs baseline.Now the row reads
+0.4 °C vs baseline, or+0.8 °F vs baselinefor a Fahrenheit reader. Apple's separate relative row (+0.3 °C vs your normal) follows the same rule.How
The engine text is unchanged. It stays pinned byte-for-byte across Swift and Kotlin. Only the display layer changes, formatting the row from the night's raw deviation.
The conversion is for a difference: ×9/5 with no +32 offset, applied to the unrounded value. For example, 0.44 °C is 0.792 °F, so the row shows +0.8, not the +0.7 a rounded +0.4 would give.
Rounding is explicit and shared: once, half away from zero. This is the display rule
RecoveryScorer.displayRoundedalready applies to breathing. While testing this I found two formatter differences at round-off points:+0.2on Apple and+0.3on Android.-+0.0for a negative zero, and the old hand-built sign on Apple's relative row printed+-0.0.Anything that rounds to zero now prints
+0.0on both platforms, as Kotlin'sdisplayRoundedalready did.Apple:
ChargeBreakdownFormat.skinTempDeviationFigureanddisplayDriver.ChargeBreakdownSectionreads the temperature preference the way other temperature read-outs do, so all three hosts are covered (Today's Charge sheet, Intelligence, Coupled).Android:
chargeDriverTempDeviationinTodayScreen.ktand a newtoday_driver_value_temp_deviation_fahrenheitstring in every locale. The Italian Celsius string also gets its missing degree sign.Verification
ChargeDriverTempDeviationTest. The same ties are pinned inChargeBreakdownFormatTests.StrandTestson macOS: 2306 tests, 0 failures.NOOPiOSsimulator build passes.android.ymlon this head): run 42167206054 green at2d482919(Build debug APK and Run unit tests both success)i18n_audit.py --ci upstream/mainexit 0;doc_comment_lint.pyclean; Tools 338 OK; parity acceptance OK.🤖 Generated with Claude Code