Skip to content

Battery notification says Fully charged and leaves out readings it doesn't have - #16272

Merged
dhh merged 2 commits into
quattrofrom
worktree-battery-full-notification
Oct 22, 2026
Merged

dhh merged 2 commits into
quattrofrom
worktree-battery-full-notification

Conversation

@dhh

@dhh dhh commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

A full battery showed Battery 100% · left · ↓0W / 53Wh: the time-left branch ran with no time to count, and the 0W idle draw was printed anyway.

  • A full battery (UPower fully-charged, or on AC at 100%) now reads Battery 100% · Fully charged · 53Wh
  • The time part shows only when there's an estimate; the arrow and watts only for a live draw; the Wh only when UPower reports a capacity
  • battery.fullyCharged added to every cli.json, reusing each language's existing power.fullyCharged wording from the panel
  • --shell output for the power panel is unchanged

Tests: battery-status-test.sh covers the full battery and a battery missing its time and capacity readings.

🤖 Generated with Claude Code

@greptile-apps

greptile-apps Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; the signed discharge display issue is fixed.

Summary

Battery notifications now say “Fully charged” and leave out unavailable time and capacity readings.

  • Battery status lines now show only readings that fit the battery’s state.

The previous finding is fixed. No new actionable issues were found in the changes since the last review. Tests were inspected but not run.

Reviews (2) · Last reviewed commit: "Treat a negative power reading as a live..." · Reviewed by Greptile

Comment thread bin/omarchy-battery-status Resolved
@omarchybot omarchybot added the bug Something isn't working label Oct 22, 2026
@dhh
dhh merged commit eb0c515 into quattro Oct 22, 2026
2 checks passed
@dhh
dhh deleted the worktree-battery-full-notification branch October 22, 2026 12:58
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 6efbfa8, after this had merged. On a worker built from the Omarchy ISO, battery-status-test.sh reproduces the original problem on the base script (Battery 100% · left · 0W / 53Wh), passes on this head, and fails again with the signed-draw fix from 6efbfa8 reverted. ./test/cli passes; i18n-test.sh fails only on da/menu.json carrying system.reboot-boot-menu, which is also on quattro and not touched here. Every battery.fullyCharged string matches the language's existing power.fullyCharged.

Second opinion from Codex Medium and muse-spark-1.3-contributor (thinking high) found one defect: the AC-at-100% fallback (bin/omarchy-battery-status:174) also caught a battery draining while plugged in, under a load bigger than the adapter, so the notification said Fully charged and hid the live draw and time left. That is fixed, with a test, in #16278 against quattro; a worker confirms quattro fails the new case and the fix passes it, and both reviewers found nothing further in it. Their other notes (a pending-charge battery reading as "left", an empty percentage) predate this change.

#16278 waits on the maintainer.

omarchybot added a commit to anandude/omarchy that referenced this pull request Oct 22, 2026
quattro's omacom#16272 added full-battery and sparse-reading tests at the same spot in battery-status-test.sh; both blocks are kept, quattro's first, since the sysfs-failure block builds its own fixtures in fail_dir.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
omarchybot added a commit to pcakounes/omarchy that referenced this pull request Oct 22, 2026
omacom#16272 added full and sparse status-line cases at the same spot in battery-status-test.sh. The unreadable-attribute case runs first and then removes the directories it put in place of power_now and current_now, since the cases after it write power_now as a file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@emirb emirb added this to the 4.5 milestone Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants