feat(proactive): ThermalWarningRule surfaces why wake-word paused#513
Merged
Conversation
## Priority 3 — UX polish
VoiceService already silently pauses wake-word on WARM/HOT thermal
states (via SaverStateProvider). Users had no way to tell *why*
background voice listening just stopped — looked like the device
broke. Now a proactive card explains the situation and suggests
moving the tablet somewhere cooler.
- WARM → NORMAL priority nudge ("I'll ease off background work...")
- HOT → HIGH priority nudge ("wake-word listening is paused...")
- Stable ids within a bucket so SuggestionState doesn't re-surface
the card on every poll.
- expiresAtMs = now + 5 min so the card retires shortly after the
temperature recovers.
Wired into SuggestionEngine alongside LowBatteryRule,
ChargingCompleteRule, ForgotLightsAtBedtimeRule.
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.
Priority 3 — UX polish
Summary
VoiceServicealready silently pauses wake-word when the battery saver trips on WARM/HOT thermal states (viaSaverStateProvider). Users had no way to tell why background listening just stopped — from their point of view the device looked broken.New
ThermalWarningRuleexplains the situation and suggests moving the tablet somewhere cooler.SuggestionStatedoesn't re-surface the card on every poll.expiresAtMs = now + 5 minso the card retires shortly after the temperature recovers.Wired into
SuggestionEnginealongsideLowBatteryRule,ChargingCompleteRule, andForgotLightsAtBedtimeRule.Test plan
ThermalWarningRuleTestcovers: NORMAL emits nothing, WARM emits NORMAL priority, HOT emits HIGH priority, stable ids within bucket,expiresAtMsset../gradlew :app:testStandardDebugUnitTest— green./gradlew :app:assembleStandardDebug— green