Fix floating bar notification collapse state#5736
Merged
Conversation
Contributor
Greptile SummaryThis PR fixes a UI bug where the compact floating bar would incorrectly remain in its expanded state after a notification was dismissed, caused by the hover-detection logic checking the entire window frame (including the now-gone notification area) rather than the actual control bar. Key changes:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant barChrome as barChrome (.onHover)
participant State as FloatingControlBarState
participant Window as FloatingControlBarWindow
Note over User, Window: Notification is showing (window is tall)
User->>barChrome: cursor enters bar area
barChrome->>State: isHoveringBar = true
barChrome->>Window: resizeForHover(expanded: true)
User->>Window: clicks dismiss (xmark button)
Window->>State: currentNotification = nil
Window->>State: read isHoveringBar → true
Window->>Window: targetSize = expandedBarSize
Window->>Window: resizeAnchored(expandedBarSize)
Note over User, Window: Bar stays expanded ✓ (cursor is over bar)
User->>barChrome: cursor leaves bar
barChrome->>State: isHoveringBar = false
barChrome->>Window: resizeForHover(expanded: false)
Window->>Window: resizeAnchored(minBarSize)
Note over User, Window: Bar correctly collapses ✓
Note over User, Window: Bug scenario (BEFORE fix)
User->>Window: cursor was only in notification area
User->>Window: clicks dismiss
Window->>Window: frame.contains(mouseLocation) → true (stale frame)
Window->>Window: targetSize = expandedBarSize ✗ (wrong!)
Note over User, Window: Bar incorrectly stays expanded
Last reviewed commit: e762131 |
Glucksberg
pushed a commit
to Glucksberg/omi-local
that referenced
this pull request
Apr 28, 2026
## Summary - track hover state on the actual floating control bar instead of the full notification container - use that explicit hover state when collapsing after a notification dismisses - prevent the compact floating line from staying expanded because the cursor was inside the old notification frame ## Verification - xcrun swift build -c debug --package-path Desktop
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
Verification