Skip to content

Health basis honesty + 20–80% charging guidance (#114)#143

Merged
almothafar merged 1 commit into
masterfrom
claude/issues-112-113-z070tr
Jul 13, 2026
Merged

Health basis honesty + 20–80% charging guidance (#114)#143
almothafar merged 1 commit into
masterfrom
claude/issues-112-113-z070tr

Conversation

@almothafar

Copy link
Copy Markdown
Owner

Closes #114.

What changed

Both decisions settled with the maintainer in-session (recorded in the issue body).

Part A — health basis honesty. The Insights figure already prefers the measured basis (capacity ÷ rated capacity); the misleading case was the cycle fallback, whose app-tracked count starts at zero on install and understates wear on any phone older than the app:

  • Basis caption now distinguishes the cycle source: "Estimated from charge cycles (reported by Android)" vs "Estimated from cycles tracked since install — real wear may be higher" (new BatteryHealthTracker.isCycleCountFromOs()).
  • "How it works" rewritten: explains all three bases, notes the curve is a generic lithium-ion approximation (real cycle life varies by manufacturer and cell, Li-ion and Li-Po alike — no chemistry branching, EXTRA_TECHNOLOGY is unreliable free-text), and adds the 20–80 care tip.

Part B — retire the "healthy charge" concept. Plugging in at ≤20% no longer flips notification titles; the plumbing (HEALTHY_CHARGE_THRESHOLD, setIsHealthy, title pairs) is deleted:

Verification

PowerConnectionReceiverTest updated for the simplified notifyChargeConnected signature. In-session checks were static (env can't build, #137): no dangling references to removed strings/symbols, values ↔ values-ar parity, XML validity. CI on this PR is the compile + test gate.

🤖 Generated with Claude Code

https://claude.ai/code/session_015ZMe8rrw7eQKz69R4Xw3t5


Generated by Claude Code

Part A - health basis: the Insights health figure already prefers the
measured value (capacity / rated capacity); the misleading case was the
cycle-based fallback, whose app-tracked count starts at zero on install
and so understates wear on any phone older than the app. Now:

- The basis caption distinguishes the cycle sources: "reported by
  Android" (lifetime count, Android 14+) vs "tracked since install -
  real wear may be higher" (new BatteryHealthTracker.isCycleCountFromOs)
- "How it works" rewritten to explain all three bases and note the
  cycle curve is a generic lithium-ion approximation (real cycle life
  varies by manufacturer and cell, Li-ion and Li-Po alike), plus the
  20-80% care tip

Part B - charging guidance: retire the "healthy/regular charge" concept
(plugged in at <=20% flipped notification titles); starting low is not a
virtue under modern guidance, and the full-charge text even encouraged
staying plugged at 100%. Now:

- One neutral title per event: "Charging started", "Battery fully
  charged"; the critical alert title "Healthy charge time" becomes
  "Battery critically low"
- Full-charge text now nudges unplugging: batteries age fastest kept at
  100%, stay roughly 20-80% day to day
- Warning/critical/full copy grammar cleaned up
- Deleted the healthy-flag plumbing (threshold, setIsHealthy, title
  flips) and six dead strings from the pre-#122 charger messages

All copy mirrored in values-ar. An actual "unplug at X%" reminder stays
out of scope (#115).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015ZMe8rrw7eQKz69R4Xw3t5
@almothafar almothafar merged commit 8b5c361 into master Jul 13, 2026
2 checks passed
@almothafar almothafar deleted the claude/issues-112-113-z070tr branch July 13, 2026 02:33
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.

Revisit battery-health basis (cycle-count accuracy) and charging guidance (20–80% range)

2 participants