Skip to content

feat(sidebar): group devices by drive - #2075

Merged
l0gicgate merged 1 commit into
mainfrom
feat/2071-group-devices-by-drive
Nov 7, 2026
Merged

l0gicgate merged 1 commit into
mainfrom
feat/2071-group-devices-by-drive

Conversation

@l0gicgate

Copy link
Copy Markdown
Contributor

Description

The Devices section listed volumes in the order the volume monitor reported them, so partitions from different disks were mixed together. On a machine with several multi-partition disks, you couldn't tell which volume belonged to which disk.

Rows are now grouped by physical drive:

  • Drive order: uses the drive's system sort key (g_drive_get_sort_key). udisks ranks fixed disks ahead of removable and hot-plugged ones, for example 00coldplug/00fixed/nvme0 before 00coldplug/12removable/sd____b.
  • Within a drive: natural name order, with the device path as a tie-break so same-named volumes such as "129 GB Volume" don't swap places between rebuilds.
  • After the drives: rows with no drive, then network shares.
  • Divider: a thin themed line between groups, because every drive uses the same icon and adjacency alone wouldn't show the boundaries. Dividers aren't counted in the collapsed section's badge.

Sorting uses the system device name, not a label set in Strata. Labels update rows in place without a rebuild, so sorting by them would make rows jump at some later, unrelated refresh.

Visual evidence

N/A. Devices now appear in drive order with a thin divider between drives, in both the full sidebar and the rail.

How to test

  1. Use a machine with at least two drives, ideally one with several partitions, plus a USB drive.
  2. Open Strata and look at Devices in the sidebar.
  3. Plug in or remove the USB drive, then collapse the section and read its badge.

Expected result: each drive's volumes sit together, sorted by name, with a divider between drives. Fixed disks come before removable ones, and network shares come last. The badge counts devices only, not dividers.

Checked against real drives on one machine with one volume per drive, which confirmed drive order, dividers and the rail. Gathering several partitions under one drive is covered by unit tests only, so it's worth trying on a multi-partition disk.

Related issue

Closes #2071

The Devices section listed volumes in whatever order the volume monitor
reported them, which scatters a multi-partition disk's rows among those of
other disks.

Order rows by their drive's system sort key, which ranks fixed disks ahead
of removable and hot-plugged ones, and by name within a drive. Rows with no
drive follow, then network shares. A thin divider marks each boundary, since
every drive shares one icon.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Devices should be displayed in the order of their hard-drive types

1 participant