Repository navigation
Conversation
Automated AI review
Verified: For an ordinary charger, the change does what the description says. Plugging in flips The two points below concern other open PRs and one hardware case, not the ordinary-charger path. Three other open PRs implement the same dismissal; one combination stops the battery service loading#8036, #11415 and #12115 also dismiss the "Time to recharge!" toast, each in its own way. How they combine with this PR:
Impact: If this PR and #11415 both land, nothing flags the problem at merge time. The duplicate method stops Suggested change: Settle on one implementation among #8036, #11415, #12115 and this PR. If more than one lands, merge the helpers into a single function rather than keeping two definitions. "Not on battery" does not mean the battery stopped drainingThe dismissal is keyed on Impact: On such a charger or dock, the only low-battery toast disappears exactly when the user believes the laptop is charging. Two open PRs aimed at related hardware cases (#11161 for this dock case, #9883 for AC-online flapping) make it worse when combined with this one (based on source reading of the combined code):
#8036, #11415 and #12115 rest on the same Suggested change: Dismiss only when the battery is actually no longer discharging, for example when the display device state is Charging, FullyCharged or PendingCharge, not on Optional test improvement: Not covered: toast restored after a shell restart. If the charger was connected while the shell was not running, a toast restored when the shell starts again is not dismissed. That case produces no Review informationTest scope: Mostly source review of the pinned head (51ae2cf) and current AI process: Opus 5.5 Medium coordination and synthesis, Opus 5.5 Xhigh technical review and final fact check, GPT 6 Sol Xhigh search for related issues, Opus 5.5 Medium editorial check. Opt out: To stop receiving these reviews, reply to this comment saying so. |
|
Closing in favour of #16562, which fixes the low battery warning staying up on the new notification engine (#15932). Thank you for working on this. Your change pointed at the right moment to take the warning down, and #16562 credits it. #16562 matches the warning on its sender and icon rather than the English title, so it also works in other languages. It also covers the warning restored after a restart and one held behind an open notification deck. |
Dismiss the low-battery notification when a charger is connected, since the warning is no longer needed once external power is available.