Skip to content

fix(segment): render detected empty batteries - #7783

Closed
jin-li wants to merge 1 commit into
JanDeDobbeleer:mainfrom
jin-li:fix/battery-zero-percent
Closed

fix(segment): render detected empty batteries#7783
jin-li wants to merge 1 commit into
JanDeDobbeleer:mainfrom
jin-li:fix/battery-zero-percent

Conversation

@jin-li

@jin-li jin-li commented Aug 8, 2026

Copy link
Copy Markdown

Prerequisites

  • I have read and understood the contributing guide.
  • The commit message follows the conventional commits guidelines.
  • Tests for the changes have been added (for bug fixes / features).
  • Docs have been added/updated (for bug fixes / features).

Description

A valid battery at 0% is currently disabled before the battery segment can render.

Remove the percentage-based no-battery check so a successfully retrieved empty battery renders as 0%. NoBatteryError continues to handle computers without a battery.

Adds a regression test for a NotCharging battery at 0%.

Fixes #7782

@JanDeDobbeleer

Copy link
Copy Markdown
Owner

@all-contributors please add @jin-li for code

This is pure magic 🪄! @holopin-bot @jin-li wizard

@holopin-bot

holopin-bot Bot commented Aug 8, 2026

Copy link
Copy Markdown

Congratulations @jin-li, the maintainer of this repository has issued you a badge! Here it is: https://holopin.io/claim/cmskiypbi0001jq045xwtsg1y

This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account.
Or if you're new to Holopin, you can simply sign up with GitHub, which will do the trick!

@allcontributors

Copy link
Copy Markdown
Contributor

@JanDeDobbeleer

I've put up a pull request to add @jin-li! 🎉

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.

Battery segment is disabled for a detected battery at 0%

2 participants