[Notifications] Clear all button silences future notifications
Summary
When a user clicks the 'Clear All Notifications' button in the navbar, notifications are cleared as intended, but future notifications are silenced.
It appears that the dismissAllNotifications() method in the Notifications API does not clear activeNotification. When _notify() is next called, activeNotification is defined, so the new notification is not instantly rendered. Instead, the 'else if' statement is entered, openmct tries to time out the currently active notification, but the array of notifications is empty, so nothing is ever timed out, and the new notification is never shown.
Expected vs Current Behavior
Expected: Clearing all notifications clears current notifications, but does not prevent future notifications from appearing.
Current: Clearing all notifications clears current notifications and prevents future notifications from appearing.
Steps to Reproduce
- Find a repeatable source of notifications
- Produce some notifications from the source
- Click 'Clear all' in navbar
- Produce another notification from the source, see that it is not displayed
Environment
System:
- OS: Linux 5.15 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
- CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
- Memory: 11.73 GB / 31.07 GB
- Container: Yes
- Shell: 5.1.16 - /bin/bash
Binaries:
- Node: 22.18.0
- Yarn: 1.22.22
- npm: 10.9.3
Browsers:
- Chromium: 152.0.7977.64
- Firefox: 155.0.1
- Firefox Developer Edition: 155.0.1
- Open MCT Version: 4.1.0
- Deployment Type: npm dev
- OS: Ubuntu
- Browser: Firefox
Impact Check List
- Data loss or misrepresented data?
- Regression? Did this used to work or has it always been broken?
- Is there a workaround available?
- Does this impact a critical component?
- Is this just a visual bug with no functional impact?
- Does this block the execution of e2e tests? (My personal e2e tests assert that notifications do/do not show up, and this bug breaks those expectations)
- Does this have an impact on Performance?
Additional Information
I think the solution is just to set activeNotification to undefined in dismissAllNotifications()
Source: nasa/openmct