Skip to content

Fix agent notification getting stuck when thread view is dropped#44939

Merged
nathansobo merged 1 commit intomainfrom
fix-agent-notification-dismiss
Dec 16, 2025
Merged

Fix agent notification getting stuck when thread view is dropped#44939
nathansobo merged 1 commit intomainfrom
fix-agent-notification-dismiss

Conversation

@nathansobo
Copy link
Contributor

Closes #32951

Summary

When an agent notification was shown and the AcpThreadView was dropped (e.g., by closing the project window or navigating to a new thread), the notification would become orphaned and undismissable because the subscriptions handling dismiss events were dropped along with the thread view.

Fix

Added an on_release callback that closes all notification windows when the thread view is dropped. This ensures notifications are always cleaned up properly.

Testing

Added test_notification_closed_when_thread_view_dropped to verify notifications are closed when the thread view is dropped.

Release Notes:

  • Fixed agent notification getting stuck and becoming undismissable when the project window is closed or when navigating to a new thread

When an agent notification was shown and the AcpThreadView was dropped
(e.g., by navigating to a new thread), the notification would become
orphaned and undismissable because the subscriptions handling dismiss
events were dropped along with the thread view.

Fix this by adding an on_release callback that closes all notification
windows when the thread view is dropped. This ensures notifications
are always cleaned up properly.

Added test to verify notifications are closed when the thread view
is dropped.
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Dec 16, 2025
@nathansobo nathansobo merged commit be1f824 into main Dec 16, 2025
24 checks passed
@nathansobo nathansobo deleted the fix-agent-notification-dismiss branch December 16, 2025 18:38
HactarCE pushed a commit that referenced this pull request Dec 17, 2025
)

Closes #32951

## Summary

When an agent notification was shown and the `AcpThreadView` was dropped
(e.g., by closing the project window or navigating to a new thread), the
notification would become orphaned and undismissable because the
subscriptions handling dismiss events were dropped along with the thread
view.

## Fix

Added an `on_release` callback that closes all notification windows when
the thread view is dropped. This ensures notifications are always
cleaned up properly.

## Testing

Added `test_notification_closed_when_thread_view_dropped` to verify
notifications are closed when the thread view is dropped.

Release Notes:

- Fixed agent notification getting stuck and becoming undismissable when
the project window is closed or when navigating to a new thread
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
…-industries#44939)

Closes zed-industries#32951

## Summary

When an agent notification was shown and the `AcpThreadView` was dropped
(e.g., by closing the project window or navigating to a new thread), the
notification would become orphaned and undismissable because the
subscriptions handling dismiss events were dropped along with the thread
view.

## Fix

Added an `on_release` callback that closes all notification windows when
the thread view is dropped. This ensures notifications are always
cleaned up properly.

## Testing

Added `test_notification_closed_when_thread_view_dropped` to verify
notifications are closed when the thread view is dropped.

Release Notes:

- Fixed agent notification getting stuck and becoming undismissable when
the project window is closed or when navigating to a new thread
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
…-industries#44939)

Closes zed-industries#32951

## Summary

When an agent notification was shown and the `AcpThreadView` was dropped
(e.g., by closing the project window or navigating to a new thread), the
notification would become orphaned and undismissable because the
subscriptions handling dismiss events were dropped along with the thread
view.

## Fix

Added an `on_release` callback that closes all notification windows when
the thread view is dropped. This ensures notifications are always
cleaned up properly.

## Testing

Added `test_notification_closed_when_thread_view_dropped` to verify
notifications are closed when the thread view is dropped.

Release Notes:

- Fixed agent notification getting stuck and becoming undismissable when
the project window is closed or when navigating to a new thread
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Feb 15, 2026
…-industries#44939)

Closes zed-industries#32951

## Summary

When an agent notification was shown and the `AcpThreadView` was dropped
(e.g., by closing the project window or navigating to a new thread), the
notification would become orphaned and undismissable because the
subscriptions handling dismiss events were dropped along with the thread
view.

## Fix

Added an `on_release` callback that closes all notification windows when
the thread view is dropped. This ensures notifications are always
cleaned up properly.

## Testing

Added `test_notification_closed_when_thread_view_dropped` to verify
notifications are closed when the thread view is dropped.

Release Notes:

- Fixed agent notification getting stuck and becoming undismissable when
the project window is closed or when navigating to a new thread
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Closing project window with active notification prevents dismissing notification

1 participant