fix(ui): show available space instead of total capacity in size info … - #220
Conversation
…widget The capacity bar label in the disk/partition detail view was showing total capacity. Per product decision, change it to show available space with the label 'Available:' instead of the partition path + 'Capacity:'. Log: Update capacity bar legend to display available space Bug: https://pms.uniontech.com/bug-view-376505.html
Reviewer's GuideThe size information widget now derives and displays available space in its capacity-bar legend, including partition, logical-volume, and decrypted LUKS cases, while preserving placeholders for unavailable values and supporting both light and dark themes. Flow diagram for available-space capacity legendflowchart LR
A["Partition, LV, or device data"] --> B["setData()"]
B --> C["Format unused space"]
C --> D["m_availableSize"]
D --> E["paintEvent()"]
E --> F["Available: <value>"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: GongHeng2017, lzwind 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 |
deepin pr auto reviewAI 代码审查报告
总体评分
漏洞对比统计:新增漏洞 0 个,减少漏洞 0 个,持平 0 个 提交概述标题: fix(ui): show available space instead of total capacity in size info widget 描述: 磁盘/分区详情视图中的容量条标签之前显示的是总容量。根据产品决策,将其改为显示可用空间,标签从分区路径 + "Capacity:" 改为 "Available:"。 Bug: https://pms.uniontech.com/bug-view-376505.html 修改文件:
四维度分析1. 语法逻辑 ✓ (22/25)
问题列表:
2. 代码质量 ✓ (21/25)
问题列表:
3. 代码性能 ✓ (20/20)
本次变更仅涉及字符串赋值和显示逻辑调整,无性能问题。 4. 代码安全 ✓ (30/30)
本次变更不涉及用户输入处理、网络通信、文件操作等安全敏感场景。新增的 OCR 审查结果OpenCodeReview 共审查 2 个文件,发现 3 个问题(均为代码逻辑/质量问题,非安全漏洞):
审查结论本次 PR 的目的是将磁盘/分区详情视图中的容量条标签从"总容量"改为"可用空间"。代码实现与 commit message 描述的需求一致,主要变更包括:
代码整体质量良好,正确实现了需求。存在 3 个轻微的代码质量问题(paintEvent 副作用、LUKS 未解密处理不一致),建议修复但不影响合并。 评分: 93/100 (优秀) |
|
/merge |
…widget
The capacity bar label in the disk/partition detail view was showing total capacity. Per product decision, change it to show available space with the label 'Available:' instead of the
partition path + 'Capacity:'.
Log: Update capacity bar legend to display available space
Bug: https://pms.uniontech.com/bug-view-376505.html
Summary by Sourcery
Show available space with an “Available:” label in the size information widget.
Bug Fixes:
Enhancements:
Chores: