fix(statusbar): make the connected indicator truthful at the edges - #104
Merged
MegaManSec merged 1 commit intoAug 10, 2026
Merged
Conversation
hotsnow
marked this pull request as draft
August 9, 2026 10:20
Owner
|
I like this idea! Once it's undrafted, I would like to make some changes to the PR, and we can merge. |
Owner
|
See hotsnow#1 |
Author
|
That's great. I also push a bug fix for the icon transparent bug, it's working now. Feel free to close this PR. Thanks. |
Owner
MegaManSec
marked this pull request as ready for review
August 10, 2026 10:05
MegaManSec
force-pushed
the
feat/statusbar-active-indicator
branch
from
August 10, 2026 10:31
6156b59 to
7ec469b
Compare
Review fixes for the connected-state indicator that merged in MegaManSec#105: - peripheralPresence now counts .releasing as still-here (the device stays physically connected through the up-to-5s send preflight, during which the icon previously un-filled and the tooltip claimed nothing was connected), and treats a registered peripheral with no connectionStates entry as unknown rather than away, so a cold launch can't misreport a connected keyboard before the first IOBluetooth snapshot lands. - Re-fetch connection states when CoreBluetooth reaches .poweredOn: the init-time snapshot bails while the radio reads off (login-item launch), and already-connected peripherals fire no new connect event, which left a false "away" standing for minutes. - The icon observer derives presence via combineLatest + removeDuplicates instead of a Void merge, so routine no-op publishes (reconnect probes, peer syncs) no longer force a status-item redraw. - The 3s ping bell flash survives idle refreshes; only a transfer arrow or needs-attention state cuts it short, restoring the original intent now that connection churn triggers refreshes. - Both status-bar icons composite from copies of the named image; the shared NSImage(named:) cache instance is never mutated. - refreshStatusBarIcon computes the tooltip once and reuses it for toolTip and the accessibility label.
MegaManSec
force-pushed
the
feat/statusbar-active-indicator
branch
from
August 10, 2026 10:32
7ec469b to
ec4983f
Compare
Owner
|
🎉 This PR is included in version 2.25.5 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Review fixes for the connected-state menu-bar indicator that merged in #105. The feature itself is unchanged; these close the windows where the indicator lied and trim redundant work.
Fixes
peripheralPresencecounts.releasingas still-here: the device stays physically connected through the up-to-5s ping preflight (during which the icon un-filled and the tooltip claimed nothing was connected), and the transfer arrow takes over once the release actually starts.connectionStatesentry reads as unknown (plain icon), not away (every snapshot writes an entry per registered id, so absence means "no snapshot yet"). The old.poweredOnguard inidlePeripheralPresence()didn't close this race, so the wrapper is gone..poweredOntransition; the store's init-time snapshot bails while the radio reads off (e.g. a login-item launch), and already-connected peripherals fire no new connect event, which left a false "away" standing for minutes.NSImage(named:)mutation — both icons composite from.copy()s of a singlestatusBarGlyph; the shared cache instance is never mutated.$peripherals.combineLatest($connectionStates)to the derived presence withremoveDuplicates(), so no-op publishes (reconnect probes, peer syncs) don't force redraws;refreshStatusBarIcon()computes the tooltip once and reuses it fortoolTipand the accessibility label.