Skip to content

Add a page of every disk, opened from the title bar - #100

Open
armada45-pixel wants to merge 2 commits into
tobi:mainfrom
armada45-pixel:disks-page
Open

armada45-pixel wants to merge 2 commits into
tobi:mainfrom
armada45-pixel:disks-page

Conversation

@armada45-pixel

Copy link
Copy Markdown
Contributor

One of a set of small PRs that replace #87 and #88, one feature each. They touch neighbouring lines in state.rs, views.rs and tests.rs, so whichever merges later will need a rebase; I'll do those as they come up.

Builds on #89 (it reuses that PR's modal and page_header), so that PR's commit is the first one here. Review the last commit; I'll rebase once #89 merges.

Scanning another disk meant knowing the v key, and the picker it opens names a disk by its mount point alone and leaves out the one already on screen.

A disk button beside the name in the title bar now opens a page over the window with every disk as a card, like a file manager's first page:

  • the volume's label and mount point (Data (D:)), or the mount point alone where there is no label;
  • how much is free of the total, and a meter that turns to the danger colour at 90% full;
  • the device on a line of its own where the system keeps no label (Linux);
  • a "scanned" chip on the disk holding the current root.

Clicking a card scans that disk; up, down and Enter work too. Escape, the Close button or a press outside leaves the page with the scan where it was.

On Windows the label comes from GetVolumeInformationW; space::Volume gains label: Option<String>, None on other systems.

Verified. cargo xtask lint and cargo xtask test are green on Windows (71 app tests, 157 core). Two window-harness tests: one opens the page from the button, checks that keys stay with the page, and clicks a card to scan that disk; the other closes it by Escape, by a press outside (and not by a press on the card), and by Close. On the combined branch (#88) the page was looked at in the running app on Windows with real disks and labels.

Not verified. Nothing was run on Linux or macOS. On this branch the feature was exercised through the window-harness tests only; the app was not launched from it. The device line and the no-label path are exercised only through fixed Volume values in the tests.

🤖 Generated with Claude Code

armada45-pixel and others added 2 commits October 13, 2026 12:04
The list `?` opens could only be closed from the keyboard, so a hand on
the mouse had to go back to it. Its heading now ends in a Close button,
and a press outside the card closes it as Escape does. A press on the
card is the card's own, and neither reaches the screen behind.

The dimmed page and its heading are `modal` and `page_header`, which
take the function that closes them, so another page can be built on
them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Scanning another disk meant knowing the v key, and the picker it opens
names a disk by its mount point alone and leaves out the one on screen.
A disk button beside the name now opens a page of cards, as a file
manager's first page has them: the label and mount point, the room left
of the total, a meter that turns to the danger colour when nearly full,
and the device on a line of its own where the system keeps no label.
The scanned disk is among them and says so. A click scans a disk; up,
down and Enter work too; Escape, Close or a press outside leaves.

On Windows the label is read with GetVolumeInformationW. The picker's
loader is shared, told whether to keep the scanned volume.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant