Skip to content

restore fashion mail card and real monitor stats#1586

Open
shule1987 wants to merge 1 commit intolinuxdeepin:masterfrom
shule1987:pr/fashion-dock-polish
Open

restore fashion mail card and real monitor stats#1586
shule1987 wants to merge 1 commit intolinuxdeepin:masterfrom
shule1987:pr/fashion-dock-polish

Conversation

@shule1987
Copy link
Copy Markdown

This PR fixes two regressions in the fashion dock left
plugins:

  1. The mail card disappeared completely when no mail account
    was configured.
  2. The monitor card showed stale/incorrect CPU and memory
    usage, and memory could stay at a fake 7% value.

Background

The original requirement for mail was only to avoid frequently
waking the mail service when no account is configured. During
later polish, that behavior was tightened too much and turned
into:

  • hiding the mail card entirely when no account is configured
  • blocking manual click-to-open behavior

For the monitor card, the UI was falling back to
org.deepin.SystemMonitorDaemon values in cases where /proc
data should have been used directly. In practice, the daemon
could return stale placeholder values, and /proc/meminfo
parsing also failed because QFile::atEnd() is unreliable for
procfs pseudo files.

Changes

Mail card

  • Restore the fashion-mode mail card so it remains visible
    even when no mail account is configured
  • Keep the protection that avoids actively waking the mail
    service during background refresh
  • Preserve manual click behavior so users can still open the
    mail client directly
  • Stop forcing the page to be removed/switched away just
    because no account is configured

Monitor stats

  • Prefer direct kernel counters from /proc for CPU and
    memory usage
  • Only fall back to SystemMonitorDaemon when direct reads
    fail
  • Fix /proc/meminfo parsing by reading lines until
    readLine() is empty instead of relying on atEnd()
  • Add a compatibility fallback when MemAvailable is missing
  • Fix CPU usage calculation by excluding guest /
    guest_nice from total time to avoid double counting

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Sorry @shule1987, your pull request is larger than the review limit of 150000 diff characters

@deepin-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: shule1987

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

@github-actions
Copy link
Copy Markdown

TAG Bot

TAG: 2.0.38
EXISTED: yes
DISTRIBUTION: unstable

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 30, 2026

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@shule1987 shule1987 force-pushed the pr/fashion-dock-polish branch from 755908e to dd1f2e2 Compare April 30, 2026 14:12
@shule1987
Copy link
Copy Markdown
Author

recheck cla

@shule1987 shule1987 force-pushed the pr/fashion-dock-polish branch from d456fa5 to 1df5def Compare April 30, 2026 14:52
Keep the fashion mode mail plugin visible without waking the mail client
when no mailbox account is configured, and read CPU and memory usage from
/proc so the monitor plugin reports real values instead of stale fallback
data.

This revision also trims the PR back to dock-focused fashion mode changes
so the GitHub diff stays below the cppcheck action limit, and refreshes the
REUSE/SPDX metadata required by the current CI checks.
@shule1987 shule1987 force-pushed the pr/fashion-dock-polish branch from 1df5def to 14c6d60 Compare April 30, 2026 15:08
@deepin-ci-robot
Copy link
Copy Markdown

deepin pr auto review

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.

2 participants