Skip to content

feat: backport remote session management to 2500u3 (#582) - #589

Merged
wjyrich merged 1 commit into
linuxdeepin:develop/2500u3from
wjyrich:backport/582-2500u3
Nov 27, 2026
Merged

wjyrich merged 1 commit into
linuxdeepin:develop/2500u3from
wjyrich:backport/582-2500u3

Conversation

@wjyrich

@wjyrich wjyrich commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

将 master 上的远程会话管理改动回移到 develop/2500u3,补齐远程登录识别、会话冲突处理、远程锁屏用户切换适配及相关界面和测试。

仅 cherry-pick #582 的一条提交,保留原作者并记录来源:
#582

来源提交:cb14180d33a6e2e7afda75489336c2bb110bbe3c。

验证:移植无冲突,补丁与来源一致,git diff --check 通过。按要求跳过编译和运行时测试。

Summary by Sourcery

完善 2500u3 的远程会话管理,支持远程登录识别、会话冲突处理、人数限制和锁屏用户切换适配。

New Features:

  • 识别并展示用户的远程图形会话状态。
  • 支持远程会话冲突检测、现有会话强制注销后继续登录,以及远程登录人数上限提示。
  • 为远程锁屏场景适配用户切换,并新增会话冲突确认、加载和限制提示界面。

Bug Fixes:

  • 避免远程会话与本地会话切换时错误地直接跳转或进入认证流程。
  • 修正登录会话信息的 D-Bus 数据映射并完善无密码登录及认证取消处理。

Enhancements:

  • 扩展登录会话状态跟踪和锁屏用户切换逻辑。
  • 补充会话冲突、远程登录状态和无效输入的测试覆盖。

Tests:

  • 新增远程登录状态和会话冲突处理的单元测试。

Chores:

  • 补充远程登录图标、界面文案及相关资源和翻译。

@sourcery-ai

sourcery-ai Bot commented Nov 27, 2026

Copy link
Copy Markdown

Sorry @wjyrich, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 3 days and 5 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@deepin-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: MyLeeJiEun, wjyrich

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Synchronize source files from linuxdeepin/dde-session-shell.

Source-pull-request: linuxdeepin/dde-session-shell#118
(cherry picked from commit cb14180)
@wjyrich
wjyrich force-pushed the backport/582-2500u3 branch from 62d7b64 to 7db61c4 Compare November 27, 2026 03:33
@sourcery-ai

sourcery-ai Bot commented Nov 27, 2026

Copy link
Copy Markdown

Reviewer's Guide

Data structures

Update the logind session D-Bus data structure and serialization to carry the fields used by remote-session detection.

  • src/global_util/dbus/dbusvariant.cpp L1-116 (4 small edits)
  • src/global_util/dbus/dbusvariant.h L1, L59-62, L90 (removed lines)

Add remote-login state to User so session detection can be reflected in the user model and copied with it.

  • src/session-widgets/userinfo.cpp L132-140 (+3 small edits)
  • src/session-widgets/userinfo.h L1-150 (5 small edits)

API

Declare the shared session-conflict and remote-user-count checks used by the login and lock flows.

  • src/global_util/sessionconflict.h L1-19

Uses of the API

Apply session-conflict and remote-user-limit checks to user switching, authentication completion, forced logout, and session startup.

  • src/lightdm-deepin-greeter/greeterworker.cpp L592-619, L1163-1322, L1330-1355 (+12 small edits)
  • src/lightdm-deepin-greeter/greeterworker.h L50-53, L115-118 (+5 small edits)

Prevent direct switching to a logged-in user when an active session conflict is present.

  • src/dde-lock/lockworker.cpp L8, L896

Track remote graphical logind sessions and update the corresponding users’ remote-login state.

  • src/session-widgets/authinterface.cpp L11-14, L21-52, L92-177
  • src/session-widgets/authinterface.h L28-31, L76-79 (+2 small edits)

Wire the warning overlay and force-logout confirmation signals into the greeter startup flow.

  • src/app/lightdm-deepin-greeter.cpp L16-17, L148, L154-163

Implementation

Implement logind queries for current-session locality, conflicting graphical sessions, and active remote-user counts.

  • src/global_util/sessionconflict.cpp L1-166

UI

Add confirmation, loading, and remote-user-limit overlays for the active-session login flow.

  • src/widgets/activesessionwidgets.cpp L1-150
  • src/widgets/activesessionwidgets.h L1-63
  • src/widgets/statebutton.cpp L1-164
  • src/widgets/statebutton.h L1-55
  • src/widgets/warningcontent.cpp L46-51, L429-484 (+3 small edits)
  • src/widgets/warningcontent.h L34-43 (+3 small edits)

Show a distinct icon for users with remote sessions and suppress user switching on remote lock screens.

  • misc/images/remote_login.svg L1-8
  • src/session-widgets/lockcontent.cpp L31, L37-53, L908-910
  • src/session-widgets/user_widget.cpp L233-242 (+3 small edits)
  • src/session-widgets/user_widget.h L1, L58
  • translations/dde-session-shell.ts L4-26
  • translations/dde-session-shell_bo.ts L2-20
  • translations/dde-session-shell_en.ts L4-22
  • translations/dde-session-shell_ug.ts L2-20
  • translations/dde-session-shell_zh_CN.ts L2-20
  • translations/dde-session-shell_zh_HK.ts L2-20
  • translations/dde-session-shell_zh_TW.ts L2-20

Configuration

Register the remote-login icon resource and ignore the newly introduced generated or local artifact.

  • .gitignore L36-38
  • resources.qrc L11

Correct the compile-definition target used by the greeter test build configuration.

  • tests/lightdm-deepin-greeter/CMakeLists.txt L50-52

Tests

Test remote-login state updates, signal emission, copying, and invalid-input behavior of session-conflict helpers.

  • tests/dde-lock/ut_interface.cpp L1, L8-9, L76-92
  • tests/dde-lock/ut_sessionconflict.cpp L1-25

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@wjyrich
wjyrich merged commit 071fc2d into linuxdeepin:develop/2500u3 Nov 27, 2026
15 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants