Skip to content

Some storage info cleanup in system view - #547

Open
vjr wants to merge 17 commits into
mainfrom
vishal/disk-size
Open

vjr wants to merge 17 commits into
mainfrom
vishal/disk-size

Conversation

@vjr

@vjr vjr commented Sep 14, 2026 •

Copy link
Copy Markdown
Member
  • Exclude IEC_UNITS flag for storage capacity info; show "4.0 TB" instead of "3.8 TiB" for a 4 TB drive.
  • Update storage bar and info based on used and available mounted space.

BEFORE:
monitor-storage-before
AFTER:
monitor-storage-updated

vjr added 3 commits September 14, 2026 17:48
Because storage devices typically advertise their capacities in "base 1000" rather than "base 1024".
A disk advertised as having 2 TB capacity previously showed as 1.8 TiB in the system view.
With this diff it now shows as 2 TB which is what a user would expect to see.
It usually shows larger usage because free space (which is used to calculate usage) is counted for only mounted volumes and won't work for multiple partitions with only some mounted.
Not really useful info after removal of free/used info?
Also, edge case of it potentially showing "not mounted" if free space really is zero.
@vjr vjr self-assigned this Sep 14, 2026
@vjr
vjr requested review from a team, danirabbit and stsdc September 14, 2026 12:43
@flodavid

Copy link
Copy Markdown

Could you add before-after screenshots please ?

@vjr

vjr commented Sep 14, 2026

Copy link
Copy Markdown
Member Author

Could you add before-after screenshots please ?

BEFORE:

monitor-storage-before

AFTER:

monitor-storage-after

@flodavid

flodavid commented Sep 20, 2026 •

Copy link
Copy Markdown

I find it strange to remove information that can be useful to some. I am not sure most people use partitions, so it may have been pretty accurate for common use cases.
A more involved option would be to also show partitions, but it would require some designing . I am not sure what is the best solution in the meantime (and that is if it gets ever done), but maybe keep the size information if the biggest partition takes like 95% of the total storage space (and is mounted) and hide it otherwise ?

@danirabbit

Copy link
Copy Markdown
Member

Yeah I'm -1 on removing usage info. Why even show disks at all if you're not showing the usage?

@vjr

vjr commented Sep 20, 2026

Copy link
Copy Markdown
Member Author

Yup seems about right, I've reverted those commits to bring back the usage bar, I'll open another PR to collect/show better usage shortly.

@vjr

vjr commented Sep 20, 2026

Copy link
Copy Markdown
Member Author

Actually, I'll just make those changes in this PR itself...

@vjr

vjr commented Sep 20, 2026

Copy link
Copy Markdown
Member Author

This is now what the before-after looks like after commit ec5d71e IMO a little less misleading for both users like me (with many partitions) and most other users who usually either only dual-boot with Windows (so far fewer partitions) or run elementary OS by itself on bare metal or in a VM:

BEFORE:
monitor-storage-before

AFTER:
monitor-storage-mounted-used

@flodavid

flodavid commented Sep 20, 2026 •

Copy link
Copy Markdown

Having a bar filled not in direct relation to the fraction above it is confusing. If I get it, 141.6 is the space used. Try to move it to the left or right of the bar and add the total volumes size, like “141.6 / 300 GB”. Or if you prefer, add a line between the disk name and size, and the bar, like “Used: 141.6 GB / 300 GB”.

@vjr

vjr commented Sep 21, 2026

Copy link
Copy Markdown
Member Author

Having a bar filled not in direct relation to the fraction above it is confusing. If I get it, 141.6 is the space used. Try to move it to the left or right of the bar and add the total volumes size, like “141.6 / 300 GB”. Or if you prefer, add a line between the disk name and size, and the bar, like “Used: 141.6 GB / 300 GB”.

Thank you, yes I think I see what you mean, let me maybe add another line like "used / available" or maybe on the same line (unless it gets too lengthy) to look like /dev/sda 2TB (141 GB used / 300 GB available).

Note the numbers looks off for someone like me with multiple partitions, but for most users who either only dualboot or run elementary OS by itself the numbers will look more reasonable, less misleading.

@vjr

vjr commented Sep 21, 2026

Copy link
Copy Markdown
Member Author

Having a bar filled not in direct relation to the fraction above it is confusing. If I get it, 141.6 is the space used. Try to move it to the left or right of the bar and add the total volumes size, like “141.6 / 300 GB”. Or if you prefer, add a line between the disk name and size, and the bar, like “Used: 141.6 GB / 300 GB”.

Folks, how does it look now after 28d624d ? Hopefully this PR should be nearer to its intent :-)
monitor-storage-updated

@vjr

vjr commented Sep 21, 2026

Copy link
Copy Markdown
Member Author

This is how it looks on my laptop running os9 exclusively, much better, although I'm going to add some size formatting changes to round off the disk size currently "512.1 GB" to "512 GB" (or "4 TB" instead of "4.0 TB" in my previous screenshots) without any decimal places, eventually in a separate PR if not this one itself.

monitor-storage-exclusivve

@flodavid

Copy link
Copy Markdown

I like it that ! Maybe replace “available” by “allocated” ?

@flodavid

Copy link
Copy Markdown

Here is how it looks on my system.
Screenshot from 2026-09-21 20 49 43

Would it be possible enable wrap to the label ? Here the result for example:
Screenshot from 2026-09-21 21 23 31@1x
An alternative with end ellipsize:
Screenshot from 2026-09-21 21 27 41@1x

@vjr

vjr commented Sep 22, 2026

Copy link
Copy Markdown
Member Author

@flodavid i prefer not to wrap any text , wondering what @elementary/ux think?

btw, in your screenshot the third disk storage card how did the disk name get wrapped? (kingston...) did you modify code with that screenshot?

reason why im against wrapping is i dont think people will usually more than 1 or 2 disks? if they do have more, some other layout (of the while cards themselves) fixes could be made in a separate PR.

@vjr

vjr commented Sep 22, 2026

Copy link
Copy Markdown
Member Author

@flodavid also the word "allocated" seems to me to mean the same thing as "used" so maybe the existing word "available" is ok? or change it to "mounted"? like "Used 10 GB of 20 GB mounted"? though i prefer "available" :-)

@stsdc

stsdc commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

Well, something is not right with the storage calculation.
image

I like it that ! Maybe replace “available” by “allocated” ?

Why allocated is better then available?

@vjr, please add ellipsis to the drive name and a tooltip to the label. So it will be possible to see the full name on hover.

@flodavid

Copy link
Copy Markdown

I did not edit the CSS or properties on the title, that’s why I think the line should also be responsive.

Since every disk volumes are not necessarily formatted and mounted, the system may not have access to the whole disk. And if you have some non allocated or unmounted space, describing the rest as “available” seems unclear to me. That said, an unmounted volume is not “unallocated” so, my logic does not really make sense.
Maybe “accessible” is better ? Or maybe I am being too nit-picky. A tooltip might give more details and be more obvious.

@vjr

vjr commented Sep 23, 2026 •

Copy link
Copy Markdown
Member Author

Well, something is not right with the storage calculation.

lol - let me try to find/fix the issue - if you can, would you tell something about that 128gb drive (is it a pen drive?) layout of partition types and what's been mounted?

i can make UI changes like ellipses and what not, but would like some definitive guidance from @elementary/ux mainly @danirabbit when they can chime in here :-)

@vjr

vjr commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

Well, something is not right with the storage calculation.

ah i see it's something to do with encrypted partition(s) - working on it...

@vjr

vjr commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

@stsdc the size issue (encrypted volumes) exists on main also, so will open a different PR for that issue. for the ellipsize part i am unable to figure out how to do that with granite headerlabel (no max_width_chars option) or gtk box, so can we do that in a later PR maybe someone/you can try that?

Accumulate mounted size but avoid counting the same volume multiple times.
@vjr

vjr commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

@stsdc please see if d8539c9 fixes the storage usage info anomaly for your device?

@flodavid

Copy link
Copy Markdown

Why do you prefer ellipsize to the current wrapping ?

@danirabbit

Copy link
Copy Markdown
Member

This branch

Screenshot from 2026-09-23 09 56 15

I'm not sure what this "Mounted" is about but this seems to give a false impression of disk usage.

Main

Screenshot from 2026-09-23 09 54 00

Also seems to not give useful usage information :p

Installer

Screenshot from 2026-09-23 10 00 43

Perhaps it would be nice to list these partitions in this way? But we still don't get a clear picture of usage

Files

We get some usage information here, but it's per partition

Screenshot from 2026-09-23 09 44 38

We'd at least save some localisation here if we used the same string construction as Files "%s free out of %s":

GNOME Disks

Screenshot from 2026-09-23 09 57 17

Seems the best representation of actually used space

@vjr

vjr commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

I'm not sure what this "Mounted" is about but this seems to give a false impression of disk usage.

Should I reword it back to "available" instead of "mounted" ?

To get a really more accurate storage usage picture you'd need to temporarily mount all unmounted partitions then unmount them again, not sure if that's a good idea?

This PR is not intended to be perfect, just "less misleading" is the intent :-)

@danirabbit

danirabbit commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Should I reword it back to "available" instead of "mounted" ?

I think it would be best to match the existing string from Files: "%s free out of %s"

To get a really more accurate storage usage picture you'd need to temporarily mount all unmounted partitions then unmount them again, not sure if that's a good idea?

No idea either! But I wonder shouldn't this information probably be available from something like Udisks or some other API? This feels like a solved problem and it seems odd for us not to be relying on a library and/or DBus API

This PR is not intended to be perfect, just "less misleading" is the intent :-)

I'm not sure you've achieved that goal here since my usage is far more than 20 MB (almost 90 GB according to GNOME Disks). At least the old way was accurate in reported how much of the disk has been partitioned

@vjr

vjr commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

@danirabbit I'll reword it to match Files. About the gnome-disks thing, did you mount additional partitions after starting Monitor but before starting gnome-disks? Monitor does not refresh, when I tried gnome-disks it does not show unmounted storage usage info either for me, it also just says "unmounted" - not sure what's going on or if I'm missing something.

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.

4 participants