Fix: Dismiss "update available" notifications after package installation #2324
+38
−1
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.
Context
Notifications persist after package updates complete. When auto-updates are enabled, users see "Update available" notifications for packages that were already updated, with no way to act on them except manual dismissal.
Approach
Send resolved notifications on package installation using the same
correlationIdas triggered notifications. The notification service matches bycorrelationIdand dismisses the triggered notification when receiving a resolved one.Changes:
sendPackageInstallResolvedNotification()that sendsStatus.resolvednotifications for non-core packages after successful installationpackageInstall()flow aftersendCoreInstalledResolvedNotification()correlationId: "dappmanager-update-pkg"to pair with update-available notifications fromsendUpdateNotification.tsPattern:
Core packages excluded (handled separately by
sendCoreInstalledResolvedNotification). Error handling prevents notification failures from breaking installations.Test instructions
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
binaries.soliditylang.org/usr/local/bin/node /usr/local/bin/node ./build/cli.bundled.js obtain --solc=0.5.16 /home/REDACTED/.cache/node-gyp/20.19.6/deps/zlib -I /home/REDACTED/.cache/node-gyp/20.19.6/deps/v8/include -I ../deps/cpu_features/include -I ../deps/cpu_features/include/internal --64(dns block)ethereum.github.io/usr/local/bin/node /usr/local/bin/node ./build/cli.bundled.js obtain --solc=0.5.16 /home/REDACTED/.cache/node-gyp/20.19.6/deps/zlib -I /home/REDACTED/.cache/node-gyp/20.19.6/deps/v8/include -I ../deps/cpu_features/include -I ../deps/cpu_features/include/internal --64(dns block)relay.trufflesuite.com/usr/local/bin/node /usr/local/bin/node ./build/cli.bundled.js obtain --solc=0.5.16 /home/REDACTED/.cache/node-gyp/20.19.6/deps/zlib -I /home/REDACTED/.cache/node-gyp/20.19.6/deps/v8/include -I ../deps/cpu_features/include -I ../deps/cpu_features/include/internal --64(dns block)solc-bin.ethereum.org/usr/local/bin/node /usr/local/bin/node ./build/cli.bundled.js obtain --solc=0.5.16 /home/REDACTED/.cache/node-gyp/20.19.6/deps/zlib -I /home/REDACTED/.cache/node-gyp/20.19.6/deps/v8/include -I ../deps/cpu_features/include -I ../deps/cpu_features/include/internal --64(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.