Skip to content

Don't call a battery draining on AC at 100% fully charged - #16278

Merged
omarchybot merged 1 commit into
quattrofrom
fix/pr-16272-draining-at-full
Oct 31, 2026
Merged

omarchybot merged 1 commit into
quattrofrom
fix/pr-16272-draining-at-full

Conversation

@omarchybot

Copy link
Copy Markdown
Collaborator

#16272 has the battery notification say Fully charged when UPower reports fully-charged, or when AC is online and the battery reads 100%. That second case also caught a battery that is draining while plugged in: a load bigger than the adapter pulls from a battery that still reads 100%, and the notification said Battery 100% · Fully charged · 53Wh, hiding both the live draw and the time left.

The AC-at-100% fallback now counts as full only when UPower does not report discharging, or the draw is idle (0.2W or less, the same charge_idle the rest of the script uses). A draining battery reads Battery 100% · 5h 19m left · ↓10W / 53Wh; fully-charged, charging, pending-charge and an idle discharging at 100% on AC are unchanged. battery-status-test.sh covers the draining case.

Found reviewing #16272 with Codex Medium and muse-spark-1.3-contributor (thinking high), both of which reviewed this change and found nothing further.

A load bigger than the adapter drains the battery while it still reads 100%, and the AC-at-100% fallback then said "Fully charged" and hid the live draw and the time left. The fallback now holds only when the battery is not discharging, or its draw is idle.

Co-Authored-By: Codex Medium <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The change appears safe to merge.

Summary

The change stops omarchy-battery-status from calling a battery fully charged when it is draining on AC at 100%.

  • A battery draining at 100% on AC shows its time and power draw.

Reviews (1) · Last reviewed commit: "Don't call a battery draining on AC at 1..." · Reviewed by Greptile

@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Oct 22, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator Author

Reviewed at 1c49d3e, and nothing needs changing.

The bug reproduces on a worker built from the Omarchy ISO. With the fix reverted, battery-status-test.sh fails on the new case: a battery discharging at 10W on AC at 100% reads Battery 100% · Fully charged · 53Wh. With the fix in place it passes. A separate probe of six AC-at-100% states shows that only a real draw changes the line, including a negatively signed power_now like Apple Silicon reports. Idle discharging, charging, pending-charge and unknown still read Fully charged. ./test/cli and battery-status-test.sh are green with this branch merged onto current quattro (446361a). The --shell output the power panel reads is unaffected, because it exits before this block.

Second opinion: Codex Medium found no defects, which is agreement, and independence is not guaranteed. muse-spark-1.3-contributor (via pi, thinking high) suggested also treating charging and unknown at 100% with a live draw as not full. That would change behaviour #16272 chose on purpose and this PR leaves alone, so it is left as is. It also noted three things that predate this change: a missing power reading counts as idle, and so still reads Fully charged; the idle-discharge case has no test of its own; and a draw of 0.3W gives a very long time left.

No open pull request competes with this one. #16265 fixes the shell's on-battery detection for a related symptom, and #15710 refactors the same script's parsing, but neither touches this condition.

Waiting on the maintainer.

@chessing234 chessing234 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all good

@omarchybot
omarchybot merged commit f53e0b2 into quattro Oct 31, 2026
2 checks passed
@emirb emirb added this to the 4.5 milestone Nov 5, 2026
berenddeboer pushed a commit to berenddeboer/omarchy that referenced this pull request Nov 6, 2026
A load bigger than the adapter drains the battery while it still reads 100%, and the AC-at-100% fallback then said "Fully charged" and hid the live draw and the time left. The fallback now holds only when the battery is not discharging, or its draw is idle.

Co-authored-by: Omarchybot <317366263+omarchybot@users.noreply.github.com>
Co-authored-by: Codex Medium <noreply@openai.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit f53e0b2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready Good to merge verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants