chore: add wake-up auth debounce timer comment - #83
Merged
Merged
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds an explanatory comment to the existing 300 ms wake-up authentication timer setup in LockWorker; no executable logic, timing, or signal-handling behavior is changed. 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 found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="src/dde-lock/lockworker.cpp" line_range="59-61" />
<code_context>
m_resetSessionTimer->setInterval(15000);
+ // On standby resume, ActiveChanged and PrepareForSleep are reported back to back;
+ // the 300ms single-shot timer guarantees authentication is created only once,
+ // no matter which signal triggers first.
m_wakeUpAuthTimer->setSingleShot(true);
m_wakeUpAuthTimer->setInterval(300);
</code_context>
<issue_to_address>
**nitpick:** The comment overstates the debounce guarantee: a single-shot timer coalesces starts only when ActiveChanged and PrepareForSleep arrive within the 300ms interval; if the second signal arrives after the timer fires, its handler starts the timer again and createAuthentication runs twice.
**Triggers:** When the two wake-up signals are separated by more than 300ms.
**Suggested fix:** Describe the timer as coalescing signal-triggered authentication requests that occur within 300ms rather than guaranteeing authentication is created only once.
```suggestion
// On standby resume, ActiveChanged and PrepareForSleep are reported back to back;
// the 300ms single-shot timer coalesces signal-triggered authentication requests
// that occur within 300ms.
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
In the LockWorker constructor, add a descriptive comment to the wake-up authentication timer setup. The comment explains the purpose of the 300ms single-shot timer: on standby resume, the ActiveChanged and PrepareForSleep signals are emitted back-to-back, so the timer guarantees authentication is created only once regardless of which signal triggers first. This is a documentation-only change with no functional modifications to the code. chore: 添加唤醒认证防抖定时器注释 在 LockWorker 构造函数中,为唤醒认证定时器设置添加了描述性注释。注 释说明了 300ms 单次触发定时器的用途:在待机恢复时,ActiveChanged 和 PrepareForSleep 信号会连续发出,因此该定时器确保无论哪个信号先触发,认证 只会创建一次。 这是一次纯文档变更,不涉及代码功能的任何修改。 Influence: 1. No functional changes; verify normal system wake-up and lock functionality remains unaffected 2. Confirm no timing or race condition issues introduced during standby resume PMS: BUG-373405
deepin-ci-robot
added a commit
to linuxdeepin/dde-session-shell-snipe
that referenced
this pull request
Sep 1, 2026
Synchronize source files from linuxdeepin/dde-session-shell. Source-pull-request: linuxdeepin/dde-session-shell#83
yixinshark
approved these changes
Sep 1, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 52cyb, yixinshark 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 |
Contributor
Author
|
/forcemerge |
Contributor
|
This pr force merged! (status: unstable) |
52cyb
pushed a commit
to linuxdeepin/dde-session-shell-snipe
that referenced
this pull request
Sep 1, 2026
Synchronize source files from linuxdeepin/dde-session-shell. Source-pull-request: linuxdeepin/dde-session-shell#83
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In the LockWorker constructor, add a descriptive comment to the wake-up authentication timer setup. The comment explains the purpose of the 300ms single-shot timer: on standby resume, the ActiveChanged and PrepareForSleep signals are emitted back-to-back, so the timer guarantees authentication is created only once regardless of which signal triggers first.
This is a documentation-only change with no functional modifications to the code.
chore: 添加唤醒认证防抖定时器注释
在 LockWorker 构造函数中,为唤醒认证定时器设置添加了描述性注释。注
释说明了 300ms 单次触发定时器的用途:在待机恢复时,ActiveChanged 和
PrepareForSleep 信号会连续发出,因此该定时器确保无论哪个信号先触发,认证
只会创建一次。
这是一次纯文档变更,不涉及代码功能的任何修改。
Influence:
PMS: BUG-373405
Summary by Sourcery
Enhancements: