Repository navigation
Conversation
[Medium impact] The PR appears safe to merge. SummaryKeeps charging visible when UPower reports a long time-to-full estimate.
No new actionable issues found. The previously reported icon-test weakness is fixed. Reviews (3) · Last reviewed commit: "Merge quattro into fix/power-long-charge..." · Reviewed by Greptile |
chessing234
left a comment
There was a problem hiding this comment.
everything seems fine, ready to merge.
|
Thanks for the recorded samples. They make the misclassification easy to see. One thing to consider: the 8-hour ETA rule was presumably there for machines that report Also, #8663 and #10196 both edit |
|
Thanks @jandrusk — good point about machines that report a small positive rate while held at a charge limit. I agree that this is worth considering alongside #10196 and #8663. Happy to follow the maintainers’ preferred merge order and rebase this PR or resolve conflicts as needed once that order is decided. |
|
Reviewed at ac70989 by Claude Opus 5.5 and run on a disposable Omarchy VM. Codex Medium, the configured second opinion, did not run: its daily review budget was spent. Nothing in the diff needed changing. The fix works. Your It matches the CLI. The other pull requests that edit
This is waiting on a second opinion, which runs when the review budget resets, and then on the maintainer. Nothing is needed from you. |
quattro's omacom#19046 added a rateFresh guard just above the line this branch changes in chargeThresholdActive(), and its own assertions where this branch adds the slow-charge ones in power-test.sh. Model.js merged cleanly; the test conflict keeps both sets of assertions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This had stopped merging cleanly. #19046 landed on Checked at 6f3cb21, on a disposable Omarchy VM, by Claude Opus 5.5:
Second opinion: the October review ran without one. This time Codex Medium and muse-wonder via pi (thinking high) both reviewed the merge and found no defect in the change or in the conflict resolution. That is agreement with my reading, and its independence is not guaranteed. Both describe the cost the same way @jandrusk did. A machine held at a charge limit that still reports Charging above 0.2 W, with an estimate of eight hours or more, will now show Charging. #10076 no longer touches the eight-hour rule since its rebase, so nothing here competes with this fix. #8663, #10196 and #17616 also edit This now waits on the maintainer, including the trade-off above. Nothing is needed from you. |


Fixes #9668.
A battery can be actively charging while UPower estimates more than eight hours to full. The power panel currently treats that estimate as a charge-limit hold, showing a plain battery icon and
Thresholduntil the estimate falls below eight hours.Remove the time-to-full condition from
chargeThresholdActive(). The existing pending-charge, fully-charged and low-rate hold detection remains in place. This changes the charging icon, status label and panel flow state together through their shared predicate.Reproduction
Recorded UPower history on an HP ZHAN 66 Pro A 14 inch G5, Omarchy 4.0.4-1, UPower 1.91.3-1:
Earlier charging samples at 1.79–2.122 W and estimates of 12.5–14.9 hours showed the same misclassification for several minutes. Replaying the recorded values through the current model reproduces the hidden charging indicator.
Validation
bash test/shell.d/power-test.sh: all 26 assertions pass, including the recorded 34% sample, its charging label/icon, and the eight-hour boundary. The new recorded-sample regression fails against the original model.git diff --check: passes../test/all: attempted; 11 of 294 shell test files fail locally. Each failing file was rerun against an unmodified checkout of the same base commit and also fails there. Failures involve companion package checkout requirements, migrations and graphical fixtures. The CLI suite also fails its VS Code current-theme-path assertion on both checkouts.Threshold/Holdingwith a plain battery; the patch renders the charging icon, time to full and charge rate. Desktop configuration was restored afterward.Before / after screenshots
Controlled replay of the recorded 2026-10-03 18:22:31 UPower sample in the real desktop power component, captured with
grim. These are cropped desktop screenshots, not live readings from a second physical plug-in event. The same fixture and layout are used in both captures; onlyModel.jschanges. Captures include the bar battery icon and power panel.A second recorded occurrence on 2026-10-04 at 07:47:47 confirms the same predicate failure near empty: UPower reported
Charging, 0% (rounded), 1.977 W and 66,990 s (18.6 h). Model replay yieldsThresholdbefore andChargingafter. At 07:48:03, the rate increased to 46.964 W and the estimate fell to 2,812 s, allowing the original model to show charging again.Related: #8663 addresses initial zero-rate readings; this change addresses a positive measured charge rate with a long estimate.