Skip to content

fix: drop legacy quick-trays plugin directory from scan list - #524

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
Ivy233:fix/dde-shell-warning-batch3
Oct 12, 2026
Merged

deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
Ivy233:fix/dde-shell-warning-batch3

Conversation

@Ivy233

@Ivy233 Ivy233 commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

trayplugingroups.cpp still scanned /usr/lib/dde-dock/plugins/quick-trays/, a legacy directory of the old dde-shell widget tray plugins that no package has provided since they were removed in dde-shell 9fcba120 (2024-07). On any modern install the directory never exists, so every dde-tray-loader instance (4 --check-group + 3 --group processes per dock start) printed one "The plugin directory does not exist" warning each time. Remove the entry from pluginDirs(); grouping is by plugin file name and path-agnostic, so no other code is affected.

修复:从扫描列表删除遗留的 quick-trays 插件目录

trayplugingroups.cpp 仍扫描 /usr/lib/dde-dock/plugins/quick-trays/,该目录 属于旧 dde-shell widget 托盘插件,自 dde-shell 9fcba120(2024-07)删除后 无任何包提供,现代系统上恒不存在,导致每次 dock 启动的 4 个
--check-group 与 3 个 --group 进程各打印一条 "The plugin directory does not exist" 告警。从 pluginDirs() 移除该条目;分组按插件文件名匹配、 与路径无关,无其他代码受影响。

PMS: TASK-394335

Summary by Sourcery

Bug Fixes:

  • Reduce log noise from missing plugin directories by lowering the absent-directory message from warning to debug level.

@sourcery-ai

sourcery-ai Bot commented Oct 5, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The loader’s plugin scan list no longer includes the legacy quick-trays directory, preventing repeated nonexistent-directory warnings while preserving scans of the main and system-trays directories.

Flow diagram for the updated tray plugin scan list

flowchart TD
    A[dde-tray-loader starts] --> B["pluginDirs()"]
    B --> C[/usr/lib/dde-dock/plugins/]
    B --> D[/usr/lib/dde-dock/plugins/system-trays/]
    B -. legacy directory removed .-> E[/usr/lib/dde-dock/plugins/quick-trays/]
    C --> F[Scan plugin files]
    D --> F
Loading

File-Level Changes

Change Details Files
Stops scanning the obsolete legacy quick-trays plugin directory to eliminate startup warnings on modern installations.
  • Removes the quick-trays path from the static plugin directory list.
  • Updates the directory-list comment to document the legacy directory’s intentional exclusion and removal context.
src/loader/trayplugingroups.cpp

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 reviewed your changes and they look great!


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

@Ivy233
Ivy233 force-pushed the fix/dde-shell-warning-batch3 branch from 805cff3 to abc4de3 Compare October 10, 2026 03:22

@BLumia BLumia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

allPluginPaths() scans a fixed list of tray plugin directories while
resolving plugin groups. A missing directory is not an error: entries
such as quick-trays/ (legacy dde-shell widget tray plugin directory, no
package has installed there since those plugins were removed in dde-shell
9fcba120, 2024-07) and custom TRAY_DEBUG_PLUGIN_PATH locations can
legitimately not exist. On every dock start, each dde-tray-loader
instance printed one qCWarning per missing directory, adding
non-actionable noise to the journal.

Demote the message to qCDebug. Under the session default logging rules
(*.debug=false) it stays silent, and it remains observable for diagnosis
with QT_LOGGING_RULES='*.debug=false;org.deepin.dde.tray-loader.debug=true'.

Per review discussion, the quick-trays/ entry is kept in the scan list;
the problem is the log level, not the directory list.

修复:缺失的托盘插件目录日志降为 qCDebug

allPluginPaths() 解析插件分组时会扫描固定的托盘插件目录列表。目录缺失
并非错误:例如 quick-trays/(旧 dde-shell widget 托盘插件目录,自
dde-shell 9fcba120,2024-07 起无包提供)以及 TRAY_DEBUG_PLUGIN_PATH
自定义路径都可能合法地不存在。此前每次 dock 启动,每个 dde-tray-loader
实例都会为每个缺失目录打印一条 qCWarning,给 journal 带来无法行动的
噪音。将日志降为 qCDebug:会话默认规则(*.debug=false)下保持静默,
排查时仍可通过
QT_LOGGING_RULES='*.debug=false;org.deepin.dde.tray-loader.debug=true'
观察。按评审讨论,quick-trays/ 扫描条目保留:问题在日志级别而不在
目录列表。

PMS: TASK-394335
@Ivy233
Ivy233 force-pushed the fix/dde-shell-warning-batch3 branch from abc4de3 to 9e6b4dc Compare October 10, 2026 05:25
@Ivy233

Ivy233 commented Oct 10, 2026

Copy link
Copy Markdown
Contributor Author

https://github.com/linuxdeepin/dde-network-core/blob/f9f852ed85ab5372b5f861ce83d1bd3bb5d8d0ea/dock-hotspot-plugin/CMakeLists.txt#L62

需要确保我们自己没在用

降级得了.jpg
那个插件也是20上的东西,但是也怕出现第三方插件往里面写东西

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: BLumia, Ivy233

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

@Ivy233

Ivy233 commented Oct 10, 2026

Copy link
Copy Markdown
Contributor Author

/retest

2 similar comments
@Ivy233

Ivy233 commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

/retest

@Ivy233

Ivy233 commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

/retest

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

🤖 AI 代码审查报告

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

Pass


📊 总体评价

项目 结果
审查结论 代码审查通过
评分详情 总体评分 100 分,大于 70 分通过阈值,代码质量符合要求。本次变更为日志级别调整,将插件目录不存在时的日志从 qCWarning 降级为 qCDebug,符合 commit 目的(减少遗留目录的冗余警告),无安全漏洞。

🔍 详细分析

1. 语法逻辑 ✅

评价: 优秀 ✅ 通过

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

建议: 无需修改,语法正确,逻辑清晰。qCDebug 与 qCWarning 均为 Qt 标准日志宏,调用方式一致,语法完全正确。


2. 代码质量 ✅

评价: 优秀 ✅ 通过

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

建议: 变更简洁明确,符合 commit message 中减少遗留目录冗余警告的目的。建议保持当前代码风格。


3. 代码性能 ✅

评价: 优秀 ✅ 通过

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

建议: 将日志级别从 Warning 降级为 Debug,在生产环境中 Debug 日志通常被禁用,可减少不必要的 I/O 开销,对性能有轻微正面影响。


4. 代码安全 🔒

评价: 优秀 ✅ 通过

🔐 发现 0 个安全漏洞

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

建议: 无安全风险。日志内容仅为插件目录路径,不含敏感信息。降低日志级别减少了信息暴露面。


💡 改进建议代码示例

// 当前变更已足够,无需额外修改
// src/loader/trayplugingroups.cpp - allPluginPaths() 函数
// 将 qCWarning 改为 qCDebug 是合理的变更:
// 遗留的 quick-trays 插件目录不存在是预期行为,
// 不应产生 Warning 级别日志干扰用户。

qCDebug(loaderLog) << "The plugin directory does not exist:" << pluginDir;

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

@Ivy233

Ivy233 commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

/forcemerge

@deepin-bot

deepin-bot Bot commented Oct 12, 2026

Copy link
Copy Markdown

This pr force merged! (status: blocked)

@deepin-bot
deepin-bot Bot merged commit dda0389 into linuxdeepin:master Oct 12, 2026
7 of 9 checks passed
@Ivy233
Ivy233 deleted the fix/dde-shell-warning-batch3 branch October 12, 2026 03:14
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