Repository navigation
fix: restore sessions before showing the greeter - #123
Merged
Merged
Conversation
1. Buffer UserLoggedIn and ShowGreeter in the same SocketWriter. 2. Deliver existing session state before displaying the greeter. 3. Let Treeland use Unlock for existing sessions after a reconnect. Log: Fix incorrect login requests while restoring sessions on reconnect. Influence: 1. Reconnect with existing sessions and check that UserLoggedIn arrives first. 2. Re-enter the password for an existing session and check that it unlocks. 3. Start the greeter without existing sessions and check that it appears. fix: 显示登录界面前先恢复已有会话 1. 使用同一个 SocketWriter 缓冲 UserLoggedIn 和 ShowGreeter。 2. 先同步已有会话状态,再显示登录界面。 3. Treeland 重连后可对已有会话发送 Unlock 请求。 Log: 修复重连恢复会话期间可能误发登录请求的问题。 Influence: 1. 保留已有会话并重连 greeter,确认先收到 UserLoggedIn。 2. 为已有会话重新输入密码,确认可以解锁。 3. 在没有已有会话时启动 greeter,确认登录界面正常显示。 PMS: BUG-383137
Reviewer's GuideImplementationReuse the existing SocketWriter for ShowGreeter so it is buffered with UserLoggedIn and delivered afterward.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 语法正确,逻辑清晰 ✅ 通过 潜在问题: 建议: [] 2. 代码质量 ✅评价: 代码结构清晰,注释完整 ✅ 通过 潜在问题: 建议: [] 3. 代码性能 ✅评价: 性能良好,资源使用合理 ✅ 通过 潜在问题: 建议: [] 4. 代码安全 🔒评价: 存在0个安全漏洞 ✅ 通过
安全漏洞详情: 建议: [] 💡 改进建议代码示例当前代码已为最佳实现,无需额外修复示例。复用已有 writer 对象发送 ShowGreeter 消息是正确的做法: ```cpp writer << quint32(DaemonMessages::ShowGreeter); ```本报告由 AI 代码审查工具自动生成 |
zccrs
approved these changes
Nov 12, 2026
zccrs
approved these changes
Nov 12, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: gugullll, zccrs 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 |
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.
根因:
Treeland 单独重启后,DDM 和原用户会话仍可能存活。重连时,旧代码会先发 ShowGreeter,再发 UserLoggedIn。如果用户在这个窗口提交密码,Treeland 会因 loggedIn 尚未恢复而误发 Login。DDM 发现已有认证会话后直接返回,界面就会一直等待。
现在 DDM 先发送所有 UserLoggedIn,再发送 ShowGreeter,让 Treeland 在正常重连显示界面前恢复会话状态,避免这条路径误发 Login。
Log: Fix incorrect login requests while restoring sessions on reconnect.
Influence:
fix: 显示登录界面前先恢复已有会话
Log: 修复重连恢复会话期间可能误发登录请求的问题。
Influence:
PMS: BUG-383137
Summary by Sourcery
Restore existing sessions before showing the greeter during reconnects.
Bug Fixes: