fix: prevent duplicate power-off countdown notifications#1168
Conversation
Add silent replacement hint to power-off countdown notifications to avoid stacking duplicate alerts when the system triggers multiple shutdown countdown sequences in quick succession. Log: Fixed duplicate power-off countdown notifications by adding silent replacement hint Influence: 1. Trigger power-off countdown and verify no duplicate notification appears 2. Test rapid consecutive shutdown commands and verify only one notification is shown 3. Verify notification replacement works silently without visual stacking 4. Test notification behavior across system resume from suspend/lock 5. Verify other non-power-off notifications remain unaffected fix: 防止电源关闭倒计时重复通知 在电源关闭倒计时通知中添加静默替换提示,避免系统在短时间内触发多次关闭倒 计时序列时出现重复通知堆积的问题。 Log: 修复电源关闭倒计时重复通知问题,添加静默替换提示 Influence: 1. 触发电源关闭倒计时,验证不会显示重复通知 2. 测试快速连续执行关机命令,验证只显示一条通知 3. 验证通知静默替换功能正常工作,无视觉堆积 4. 测试系统从挂起/锁定状态恢复后的通知行为 5. 验证其他非电源关闭倒计时通知不受影响 PMS: BUG-367205
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 52cyb The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @52cyb. Thanks for your PR. I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds a silent replacement hint to power-off shutdown countdown notifications so that repeated shutdown sequences reuse a single notification instead of stacking duplicates. Sequence diagram for power-off countdown silent notification replacementsequenceDiagram
actor User
participant Manager
participant NotificationServer
User->>Manager: shutdownCountdownNotify
Manager->>NotificationServer: [send poweroff countdown notification]
Note over Manager,NotificationServer: hints include x-deepin-SilentReplace=true
User->>Manager: shutdownCountdownNotify
alt [existing notification present]
Manager->>NotificationServer: [send notification with x-deepin-SilentReplace]
NotificationServer-->>Manager: [existing notification silently replaced]
else [no existing notification]
Manager->>NotificationServer: [send new notification]
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Consider defining "x-deepin-SilentReplace" as a shared constant (similar to any other notification hint keys you might have) to avoid typos and make future refactors easier.
- It may be worth confirming whether
SilentReplaceis the desired behavior whenplaySoundis true; if sound is part of the user feedback, you might want replacement without silencing or make the behavior explicit in the logic or comments.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider defining "x-deepin-SilentReplace" as a shared constant (similar to any other notification hint keys you might have) to avoid typos and make future refactors easier.
- It may be worth confirming whether `SilentReplace` is the desired behavior when `playSound` is true; if sound is part of the user feedback, you might want replacement without silencing or make the behavior explicit in the logic or comments.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
TAG Bot New tag: 6.1.100 |
Add silent replacement hint to power-off countdown notifications to avoid stacking duplicate alerts when the system triggers multiple shutdown countdown sequences in quick succession.
Log: Fixed duplicate power-off countdown notifications by adding silent replacement hint
Influence:
fix: 防止电源关闭倒计时重复通知
在电源关闭倒计时通知中添加静默替换提示,避免系统在短时间内触发多次关闭倒
计时序列时出现重复通知堆积的问题。
Log: 修复电源关闭倒计时重复通知问题,添加静默替换提示
Influence:
PMS: BUG-367205
Summary by Sourcery
Bug Fixes: