fix: expire stale notifications in all code paths (#8914) - #8999
fix: expire stale notifications in all code paths (#8914)#8999khusantoy wants to merge 7 commits into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request incorrectly commits the local.properties file, which contains local SDK paths specific to the developer's machine and should be ignored. Additionally, the actual implementation changes described in the PR title and description appear to be missing. The reviewer requested removing local.properties from the repository, adding it to .gitignore, and committing the correct files.
| ## This file must *NOT* be checked into Version Control Systems, | ||
| # as it contains information specific to your local configuration. | ||
| # | ||
| # Location of the SDK. This is only used by Gradle. | ||
| # For customization when using a Version Control System, please read the | ||
| # header note. | ||
| #Thu Jun 11 16:57:16 UZT 2026 | ||
| sdk.dir=/Users/xusanboy/Library/Android/sdk |
There was a problem hiding this comment.
[MUST-FIX] The local.properties file contains local SDK paths specific to your machine and should not be committed to version control. Tracking this file can break builds on other developers' machines and CI/CD environments.\n\nPlease remove local.properties from the repository and ensure it is ignored via .gitignore.\n\nAdditionally, it looks like the actual implementation changes for expiring stale notifications (as described in the PR title and description) were not included in this pull request. Please commit the correct files.
References
- Prefix every comment with a severity category such as [MUST-FIX]. (link)
|
I'm not able to test this myself, because I don't see any balloons for hot reload/restart. Before we merge I want to make sure I'll be able to manually test this for an upcoming release. Could you tell me what settings you have for notifications? |
I have both "Display balloon notifications" and "Enable system notifications" enabled. For Flutter-related notification groups (Flutter Messages, Flutter Notifications, flutter-run, flutter-debug, etc.) the popup type is set to "Balloon". |
|
Hmmm... sorry for the delay getting back to you; I wanted to investigate this a little further. In my system, this doesn't seem to work, and gemini suggests it's because these are tool window notifications and the associated balloon in the tool window does not get hidden when
Gemini suggests adding a hide function for the balloons: So does this not happen on your machine? I wonder if you are getting a type of balloon that is different from tool window balloons? |


What this PR changes and why
Every hot reload and hot restart posted a
"Reloading…"notificationvia
showRunNotification(). These entries were never expired before anew one was posted, so they accumulated in the IDE Notifications
timeline and buried important alerts (e.g. "Shortcuts conflicts").
Three code paths are fixed:
showRunNotification()— expires the previous notification beforeposting a new one (guarded by
!isErrorso genuine errornotifications remain visible).
showAnalysisNotification()— same fix for "Reload not performed"/ "Analysis issues found" messages.
clearLastNotification()— now calls.expire()before nullingthe reference, so toolbar/shortcut-triggered reloads also clean up
stale timeline entries.
Relevant issues
Fixes #8914
How to verify
Before: multiple "Reloading…" entries accumulate in the timeline.
After: only the most recent entry is visible; previous ones are expired.
Screenshots
No UI changes — behaviour is in the IDE Notifications timeline.