Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion desktop/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"unreleased": [],
"unreleased": [
"Fixed the floating bar staying visible after notifications when \"Show floating bar\" is turned off"
],
"releases": [
{
"version": "0.11.459",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,10 @@ class FloatingControlBarWindow: NSPanel, NSWindowDelegate {
FloatingControlBarManager.shared.flushQueuedNotificationsIfPossible()

// If the user has the bar disabled, hide it completely after closing the
// AI conversation instead of leaving the compact pill visible.
if !FloatingControlBarManager.shared.isEnabled {
// AI conversation instead of leaving the compact pill visible — unless a
// queued notification was just flushed; hiding now would swallow it, and
// its dismissal re-hides the bar anyway.
if !FloatingControlBarManager.shared.isEnabled && self?.state.currentNotification == nil {
self?.orderOut(nil)
}
}
Expand Down Expand Up @@ -1447,11 +1449,19 @@ class FloatingControlBarManager {
private func presentNotification(_ notification: FloatingBarNotification, in window: FloatingControlBarWindow) {
persistNotificationMessageIfNeeded(notification)

if !window.isVisible {
// The flag must survive the whole notification chain: when a queued
// notification is presented the window is already visible from the
// temp-show, so resetting it here would skip the re-hide in
// dismissNotificationAndAdvanceQueue and leave the bar on screen
// forever with "Show floating bar" off (#6972). The bar can also be
// visible while disabled (e.g. a notification flushed right as an AI
// conversation closes), so any presentation with the bar disabled
// must arm the re-hide; dismissNotificationAndAdvanceQueue owns the reset.
if !window.isVisible || !isEnabled {
notificationWasTemporarilyShown = true
window.orderFrontRegardless()
} else {
notificationWasTemporarilyShown = false
if !window.isVisible {
window.orderFrontRegardless()
}
}
Comment thread
eulicesl marked this conversation as resolved.

window.showNotification(notification)
Expand Down
Loading