Skip to content

feat(proactive): ThermalWarningRule surfaces why wake-word paused#513

Merged
yuga-hashimoto merged 1 commit into
mainfrom
feat/thermal-proactive-rule
Apr 22, 2026
Merged

feat(proactive): ThermalWarningRule surfaces why wake-word paused#513
yuga-hashimoto merged 1 commit into
mainfrom
feat/thermal-proactive-rule

Conversation

@yuga-hashimoto

Copy link
Copy Markdown
Owner

Priority 3 — UX polish

Summary

VoiceService already silently pauses wake-word when the battery saver trips on WARM/HOT thermal states (via SaverStateProvider). Users had no way to tell why background listening just stopped — from their point of view the device looked broken.

New ThermalWarningRule 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, and ForgotLightsAtBedtimeRule.

Test plan

  • New ThermalWarningRuleTest covers: NORMAL emits nothing, WARM emits NORMAL priority, HOT emits HIGH priority, stable ids within bucket, expiresAtMs set.
  • ./gradlew :app:testStandardDebugUnitTest — green
  • ./gradlew :app:assembleStandardDebug — green

## 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.
@yuga-hashimoto
yuga-hashimoto merged commit bc4b652 into main Apr 22, 2026
2 checks passed
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.

1 participant