Conversation
…nstead of nothing (ryanbr#2208 second half) ryanbr#2208 stopped the Liquid Today header drawing the STRAP's charge under an active ring, and the control has shown nothing under a ring since: `StrapBatteryDisplay.resolve` answered `.notActiveDevice` for every non-WHOOP active device because it could not tell whose number it held. The ring's own charge was already there - `LiveState.ouraBatteryPct` on iOS and `SourceCoordinator.ouraBatteryPct` on Android, both cleared with the link (ryanbr#2075), both already resolved by `LiveConsoleReadout.batteryPercent` for the Live console and the Devices list. The header was the one surface still blind to it. - iOS `StrapBatteryDisplay.resolve` takes `ringPct` + `ringCharging` (no defaults, for the same reason `activeIsWhoop` has none): a non-WHOOP active device with a ring charge reported this link is `.charge(isRing: true)`; with none it stays `.notActiveDevice`, so a generic HR strap or a machine - which never write `ouraBatteryPct` - keep the control off the header exactly as before. Charging under a ring is the ring's charger state (`OuraWearState.charging`), never the strap's BATTERY_LEVEL bit. - `.charge` carries `isRing` so the VoiceOver label names the device the number belongs to: "Ring battery N percent(, charging)" - "Strap battery" over a ring's charge would be the ryanbr#2208 misattribution again, in the label instead of the number. Strings in every catalog locale. - Android: `HeaderBatteryDisplay.resolve`, a pure twin of the iOS resolver (minus the charging bit the Android ring never drew), replaces the `strapIsActiveDevice` gate + raw `batteryPct` pair on `LiquidTodayHeader`; `LiquidBatteryRing` takes `isRing` for its label (`today_ring_battery_percent`, every locale). Verification: `LiquidBatteryDisplayTests` 15/15 under `xcodebuild test` (Strand, macOS), four new ring cases; `HeaderBatteryDisplayOracleTest` 4/4 - the 60-line expected literal is the verbatim stdout of the Swift enum compiled standalone (`swiftc -O`) over the whole activeIsWhoop x connected x strap-% x ring-% grid, plus the named ryanbr#2208/ryanbr#2216 cases; `Strand` (macOS) and `NOOPiOS` build; `compileFullDebugKotlin` clean; `i18n_audit --ci` (both platforms) and `doc_comment_lint` green. Display-only - the values come from the same fields the Live console already shows on hardware. Refs ryanbr#2208, ryanbr#2216, ryanbr#2075. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QrsZczdGcUyQSJVuYZuwUF
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.
#2208 stopped the Liquid Today header drawing the STRAP's charge under an active ring, and the control has shown nothing under a ring since:
StrapBatteryDisplay.resolveanswered.notActiveDevicefor every non-WHOOP active device because it could not tell whose number it held. The ring's own charge was already there —LiveState.ouraBatteryPcton iOS andSourceCoordinator.ouraBatteryPcton Android, both cleared with the link (#2075), both already resolved byLiveConsoleReadout.batteryPercentfor the Live console and the Devices list. The header was the one surface still blind to it.Change
StrapBatteryDisplay.resolvetakesringPct+ringCharging(no defaults, for the same reasonactiveIsWhoophas none): a non-WHOOP active device with a ring charge reported this link is.charge(isRing: true); with none it stays.notActiveDevice, so a generic HR strap or a machine — which never writeouraBatteryPct— keep the control off the header exactly as before. Charging under a ring is the ring's charger state (OuraWearState.charging), never the strap's BATTERY_LEVEL bit..chargecarriesisRingso the VoiceOver label names the device the number belongs to: "Ring battery N percent(, charging)" — "Strap battery" over a ring's charge would be the [oura][ui] Today screen still draws the WHOOP's charge under an active Oura ring — #2076 covered the Live Console, Devices and the widget, not Today #2208 misattribution again, in the label instead of the number. Strings in every catalog locale.HeaderBatteryDisplay.resolve, a pure twin of the iOS resolver (minus the charging bit the Android ring never drew), replaces thestrapIsActiveDevicegate + rawbatteryPctpair onLiquidTodayHeader;LiquidBatteryRingtakesisRingfor its label (today_ring_battery_percent, every locale).Design tokens only (the ring's stroke and hues are unchanged); no new colours, fonts or spacing.
Verification
LiquidBatteryDisplayTests15/15 underxcodebuild test(Strand, macOS), four new ring cases.HeaderBatteryDisplayOracleTest4/4 — the 60-line expected literal is the verbatim stdout of the Swift enum compiled standalone (swiftc -O) over the whole activeIsWhoop × connected × strap-% × ring-% grid, plus the named [oura][ui] Today screen still draws the WHOOP's charge under an active Oura ring — #2076 covered the Live Console, Devices and the widget, not Today #2208 / battery: say whose charge it is on all seven surfaces, not three #2216 cases.Strand(macOS) andNOOPiOSbuild;compileFullDebugKotlinclean;i18n_audit --ci(both platforms) anddoc_comment_lintgreen.Refs #2208, #2216, #2075.