Skip to content

docs: update ddm documentation to match current code - #118

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
deepin-wm:agent/developer/5a0d75881708
Oct 15, 2026
Merged

deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
deepin-wm:agent/developer/5a0d75881708

Conversation

@deepin-wm

@deepin-wm deepin-wm commented Oct 15, 2026 •

Copy link
Copy Markdown

Update the DDM documentation so that it matches the current code.

  • README.md / README.zh_CN.md: describe ddm as the display manager for
    Treeland, list the real build and runtime dependencies, and explain how ddm
    is started. The Chinese README was an empty TODO: before.
  • INSTALL.md: CMake-based instructions, the actual CMake options, the dde
    greeter user and the C++20 requirement.
  • docs/ARCHITECTURE.md: describe the daemon, the ddm-helper session helper,
    the Treeland greeter, dde-seatd, the login flow and the communication
    channels (greeter socket, treeland_ddm_v1, D-Bus).
  • docs/THEMING.md: the SDDM QtQuick greeter no longer exists in this
    repository; document that the login screen is Treeland's and point at its
    GreeterProxy / SessionModel / UserModel.
  • man pages: drop the removed --test-mode, add the missing [Autologin]
    section, fix stale paths, defaults and the state file location, and remove
    the obsolete General.DisplayServer reference.

The man pages were rendered with rst2man from docutils 0.22.3 to check the
RST.

Multica: WM-618

Summary by Sourcery

Bring all user-facing documentation and man pages into alignment with the current Treeland-based DDM implementation.

Enhancements:

  • Update the project documentation to reflect DDM’s current Treeland-based architecture, login flow, dependencies, runtime services, communication interfaces, and theming model.

Build:

  • Refresh installation and build instructions with the current CMake workflow, options, systemd setup, dependencies, and C++20 requirement.

Documentation:

  • Complete the English and Chinese READMEs, expand the architecture and theming documentation, and synchronize the man pages with current configuration, defaults, paths, and supported options.

@sourcery-ai

sourcery-ai Bot commented Oct 15, 2026

Copy link
Copy Markdown

Reviewer's Guide

The PR brings all user-facing documentation in line with the current Treeland-integrated DDM implementation, replacing obsolete SDDM greeter guidance with accurate build, deployment, architecture, theming, configuration, and man-page information.

Sequence diagram for the DDM login flow

sequenceDiagram
    participant DDM as ddm daemon
    participant TL as Treeland greeter
    participant HELPER as ddm-helper
    participant LOGIND as systemd-logind
    participant SESSION as User session
    DDM->>TL: Start treeland.service
    TL->>DDM: Connect
    DDM-->>TL: ShowGreeter
    TL->>DDM: Login
    DDM->>HELPER: fork()/exec() PAM helper
    HELPER->>HELPER: pam_authenticate()
    HELPER->>HELPER: pam_open_session()
    HELPER-->>DDM: Authentication result
    DDM->>LOGIND: Open user session
    DDM->>SESSION: Start session
    DDM-->>TL: UserLoggedIn
Loading

File-Level Changes

Change Details Files
Reworked the primary and Chinese README files to document DDM’s Treeland-based role, current dependencies, CMake build flow, and systemd startup requirements.
  • Describe Treeland as the greeter/compositor and DDM as the display/login manager.
  • List current build and runtime dependencies, including Qt 6, logind, treeland-protocols, and dde-seatd.
  • Document CMake commands, man-page generation requirements, the dde greeter user, required services, and PAM setup.
README.md
README.zh_CN.md
Updated installation guidance to reflect the current CMake configuration, deployment model, and compiler requirements.
  • Replace manual Make instructions with modern CMake configure, build, and install commands.
  • Document supported CMake options, installation path overrides, Release/Debug defaults, and rst2man requirements.
  • Explain systemd-sysusers/tmpfiles provisioning, ddm.service startup, service dependencies, and the C++20 requirement.
INSTALL.md
Replaced the outdated architecture overview with an implementation-oriented description of DDM’s components, lifecycle, protocols, and configuration.
  • Document the daemon, ddm-helper PAM/session process, Treeland greeter, dde-seatd, and their responsibilities.
  • Describe authentication, login/logout, session-type handling, VT management, and compositor lifecycle.
  • Document greeter-socket messages, treeland_ddm_v1, D-Bus interfaces, and configuration/state locations.
docs/ARCHITECTURE.md
Revised theming documentation to reflect that Treeland owns the login UI rather than DDM.
  • Remove references to the retired SDDM QtQuick greeter, ddm-greeter, and legacy models.
  • Point developers to Treeland’s LockScreen QML, GreeterProxy, SessionModel, and UserModel.
  • Update testing guidance to start treeland.service directly.
docs/THEMING.md
Corrected the generated man-page source documentation to match current options, configuration, defaults, paths, and supported behavior.
  • Remove the obsolete --test-mode and General.DisplayServer references.
  • Add the [Autologin] section and correct stale defaults, paths, and state-file location.
  • Render-check the RST sources with rst2man from docutils 0.22.3.
data/man/ddm-state.conf.rst.in
data/man/ddm.conf.rst.in
data/man/ddm.rst.in

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

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 2 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="docs/ARCHITECTURE.md" line_range="143" />
<code_context>
+## Configuration
+
+Configuration is loaded, from lowest to highest precedence, from the system
+configuration directory (`/usr/lib/ddm/ddm.conf.d` by default),
+`/etc/ddm.conf.d` and `/etc/ddm.conf`. The last user and session are stored in
+`state.conf` in the `dde` user's home directory. See **ddm.conf**(5) and
</code_context>
<issue_to_address>
**Configuration path is wrong**

When DDM is configured without overriding CMAKE_INSTALL_PREFIX, `SYSTEM_CONFIG_DIR` resolves to `/usr/local/lib/ddm/ddm.conf.d` with CMake's default install prefix, so users following the documented `/usr/lib/ddm/ddm.conf.d` path place configuration where a default-prefix installation will not load it.

Describe the path as `${CMAKE_INSTALL_PREFIX}/lib/ddm/ddm.conf.d` (defaulting to `/usr/local/lib/ddm/ddm.conf.d`), or explicitly document the package-specific `/usr` prefix.
</issue_to_address>

### Comment 2
<location path="docs/ARCHITECTURE.md" line_range="95" />
<code_context>
+   - **Wayland**: the daemon stops Treeland and runs the session's compositor
+     through the `Wayland.SessionCommand` script.
+   - **X11**: the daemon stops Treeland, starts the X server, writes an
+     authorization cookie to `/tmp/xauth_XXXXXX` and runs the session through
+     the `X11.SessionCommand` script.
+6. `Logout`, `Lock` and `Unlock` messages are forwarded to systemd-logind
</code_context>
<issue_to_address>
**X authorization path is wrong**

When an X11 session is started and an operator follows the documented cookie path, `XAuth` stores authorization files under `RUNTIME_DIR`, but the documentation directs operators to `/tmp/xauth_XXXXXX`; they look in the wrong location when troubleshooting X11 sessions.

Document the actual runtime-directory path used by `XAuth`.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread docs/ARCHITECTURE.md Outdated
Comment thread docs/ARCHITECTURE.md Outdated
@deepin-wm
deepin-wm force-pushed the agent/developer/5a0d75881708 branch from c564cd6 to 1de78b6 Compare October 15, 2026 06:03
1. Describe ddm as the Deepin Display Manager for Treeland and drop
   the removed QtQuick greeter from README, INSTALL and ARCHITECTURE.
2. Document the ddm-helper session helper, dde-seatd and the
   treeland_ddm_v1 protocol, and the real login flow.
3. Add the missing [Autologin] section and fix stale options,
   paths and the removed --test-mode in the man pages.
4. Replace the obsolete SDDM theming guide with a pointer to
   Treeland's greeter.
5. Fix the ddm.service description, which still said "Simple
   Desktop Display Manager".

Log: ddm documentation (README, INSTALL, ARCHITECTURE, THEMING and man pages) is now consistent with the current code.

Influence:
1. Build the man pages with cmake -DBUILD_MAN_PAGES=ON and check ddm(1), ddm.conf(5) and ddm-state.conf(5).
2. Follow the README and INSTALL build instructions on a deepin system.
3. Compare the architecture description with the ddm to Treeland login flow.

docs: 根据当前代码更新 ddm 文档

1. 将 ddm 描述为面向 Treeland 的 Deepin Display Manager,并在 README、
   INSTALL 和 ARCHITECTURE 中移除已删除的 QtQuick greeter。
2. 补充 ddm-helper 会话助手、dde-seatd 与 treeland_ddm_v1 协议,
   以及真实的登录流程。
3. 在 man 手册中补充缺失的 [Autologin] 段,修正过时选项、路径
   和已删除的 --test-mode。
4. 用指向 Treeland greeter 的说明替换过时的 SDDM 主题文档。
5. 修正 ddm.service 中仍为 "Simple Desktop Display Manager" 的描述。

Log: ddm 文档(README、INSTALL、ARCHITECTURE、THEMING 和 man 手册)已与当前代码保持一致。

Influence:
1. 使用 cmake -DBUILD_MAN_PAGES=ON 构建 man 手册,检查 ddm(1)、ddm.conf(5)、ddm-state.conf(5)。
2. 在 deepin 系统上按 README 和 INSTALL 的说明进行构建验证。
3. 对照 ddm 到 Treeland 的登录流程检查架构描述。
@deepin-wm
deepin-wm force-pushed the agent/developer/5a0d75881708 branch from 1de78b6 to a67bdab Compare October 15, 2026 06:07
@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: deepin-wm, wineee

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

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

🤖 AI 代码审查报告

总体评分: 100 分 (通过阈值: 70分)

Pass


📊 总体评价

项目 结果
审查结论 代码审查通过
评分详情 总体评分 100 分,大于 70 分通过阈值,代码质量符合要求。本次提交为纯文档更新,所有修改文件(Markdown、RST 手册页模板、systemd 服务模板)均为文档类文件,无源代码变更,无安全漏洞,文档内容准确且与当前代码实现一致。

🔍 详细分析

1. 语法逻辑 ✅

评价: 优秀 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: 语法正确,逻辑清晰,文档结构合理。所有 Markdown 文件语法正确,RST 手册页模板使用正确的 reStructuredText 语法,systemd 服务文件语法正确。CMake 模板变量(@STATE_DIR@、@CONFIG_FILE@ 等)在 RST 文件中使用正确。[Autologin] 配置节格式与现有配置节一致。


2. 代码质量 ✅

评价: 优秀 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: 代码结构清晰,注释完整,文档内容准确且与代码实现一致。README.zh_CN.md 是 README.md 的完整且准确的中文翻译。ARCHITECTURE.md 提供了详细的组件描述、登录流程和通信通道说明。THEMING.md 正确反映了 DDM 不再拥有自己的 greeter 的事实。手册页更新了准确的配置选项。各文件之间术语使用一致(greeter 用户 dde、Treeland 合成器等)。无重复内容,无残留调试信息。


3. 代码性能 ✅

评价: 优秀 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: 性能良好,资源使用合理。本次提交为纯文档更新,不涉及任何代码性能问题,无算法复杂度问题,无资源使用问题。


4. 代码安全 🔒

评价: 优秀 ✅ 通过

🔐 发现 0 个安全漏洞

安全漏洞详情:
✅ 未发现安全漏洞

建议: 安全合规,无安全风险。文档中无硬编码密钥或敏感信息,无注入风险。services/ddm.service.in 仅更新了 Description 字段(从 Simple Desktop Display Manager 改为 Deepin Display Manager),无安全影响。文档正确描述了安全相关内容(PAM 认证、X 授权文件路径等),这些是对现有行为的文档描述,非新引入的代码。


💡 改进建议代码示例

// 本次提交为纯文档更新,无需代码修复示例

本报告由 AI 代码审查工具自动生成

@wineee

wineee commented Oct 15, 2026

Copy link
Copy Markdown
Member

/merge

@deepin-bot
deepin-bot Bot merged commit 31e8aa1 into linuxdeepin:master Oct 15, 2026
8 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