feat: implement accurate application sizes and byte-accurate progress metrics (Fixes #531)#533
Open
prem22k wants to merge 6 commits intopop-os:masterfrom
Open
feat: implement accurate application sizes and byte-accurate progress metrics (Fixes #531)#533prem22k wants to merge 6 commits intopop-os:masterfrom
prem22k wants to merge 6 commits intopop-os:masterfrom
Conversation
- Introduces `download_size` and `installed_size` fields. - Parses size metadata from AppStream XML releases. AI Disclosure: Parts of this code were generated with the assistance of an AI coding assistant. The logic has been fully reviewed and understood by the author. Fixes pop-os#531 Signed-off-by: prem22k <premsai224k@gmail.com>
- Extracts `installed_size` using `libflatpak`'s `InstalledRefExt`. - Accumulates dependency sizes in the `system_packages` (Flatpak Runtimes) virtual package. AI Disclosure: Parts of this code were generated with the assistance of an AI coding assistant. The logic has been fully reviewed and understood by the author. Fixes pop-os#531 Signed-off-by: prem22k <premsai224k@gmail.com>
- Expands `TransactionDetails` to include `size`. - Extracts `size` dynamically from the D-Bus `Details` signal. AI Disclosure: Parts of this code were generated with the assistance of an AI coding assistant. The logic has been fully reviewed and understood by the author. Fixes pop-os#531 Signed-off-by: prem22k <premsai224k@gmail.com>
- Implements a responsive `size_widget`. - Displays `download_size` and `installed_size` accurately formatted in MB. - Integrates visually alongside the existing downloads widget in grid layouts. AI Disclosure: Parts of this code were generated with the assistance of an AI coding assistant. The logic has been fully reviewed and understood by the author. Fixes pop-os#531 Signed-off-by: prem22k <premsai224k@gmail.com>
- Appends `size = Size` across all 71 localization files to support the new size widget. AI Disclosure: Parts of this code were generated with the assistance of an AI coding assistant. The logic has been fully reviewed and understood by the author. Fixes pop-os#531 Signed-off-by: prem22k <premsai224k@gmail.com>
This commit unifies application size reporting and installation progress across the COSMIC Store. Key changes: - Unified Size Logic: Displays a single, contextual size (download or installed) in the app detail view using decimal (base-1000) units. - Byte-Accurate Progress: Upgraded the progress reporting system from simple percentages to a struct carrying byte metrics, enabling accurate progress bars and download statistics in the footer and operations drawer. - Backend Reliability: Improved AppStream metadata parsing to be more robust against malformed XML and ensured metadata persistence when switching between application sources. - Prioritized Backend Data: Actual installed/download sizes from Flatpak/PackageKit backends are now prioritized over AppStream estimates. AI Disclosure: This contribution was developed with AI assistance. All changes have been thoroughly reviewed, verified for correctness, and tested in a local environment. Co-authored-by: AI assistant (code reviewed and verified by author)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #531, #398
This pull request implements comprehensive application size reporting and high-fidelity installation progress tracking across the COSMIC Store. It transitions the store from simple percentage-based reporting to a byte-accurate system that provides users with transparent download and installation metrics.
Key Changes across Commits:
1. Model & Data Structures (
1cc5336)download_sizeandinstalled_sizemetrics to the coreAppInfostruct.2. Backend Integration (
810b4f1,fa228ef)libflatpak'sInstalledRefExtto extract byte-accurate installation sizes.GetDetailssignal.3. UI & Localization (
8e115e1,5c0ce0b)src/view.rsto display app sizes.sizekey and fallback strings to support the new UI across all localizations.4. Advanced Metrics & Reliability (
36fca34)f32percentages to aProgressstruct. This enables the UI to show real-time transfer stats (e.g.,58 MB / 180 MB) in the footer and operations drawer.update_appsto ensure byte-accurate metrics persist even when switching between different application sources or backends.Technical Notes:
Progressbar now uses byte-weighted calculations for accurate multi-app progress.AI Disclosure:
This contribution was developed with the assistance of an AI coding assistant. All changes—especially the
Progressstruct refactor and metadata merging logic—have been thoroughly reviewed, verified for correctness, and tested in a local environment.Visual Changes