Skip to content

Add a page of disks, settings, an accessible Filter menu, and read-only scans over SSH - #88

Closed
armada45-pixel wants to merge 14 commits into
tobi:mainfrom
armada45-pixel:home-settings-filters
Closed

armada45-pixel wants to merge 14 commits into
tobi:mainfrom
armada45-pixel:home-settings-filters

Conversation

@armada45-pixel

@armada45-pixel armada45-pixel commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Builds on #87 — its commits are at the bottom of this branch, so this is best read after that one merges (or reviewed from "Add a page of disks…" onwards). I can rebase once #87 lands.

What it adds

  • A page of disks (home button, and the disk label at a root): every volume as a card with its label, mount point, size and free room, like a file manager's first page. On Windows the label comes from GetVolumeInformationW; elsewhere the device is shown on its own line.
  • A settings page: the theme choice moves here; allow up to 10 levels at once (6 stays the default); GiB or GB for every size; Start-menu and desktop shortcut buttons on Windows; version and build number.
  • Filter, apart from Name. Filter is a menu: tick any number of kinds, and give a Min and a Max file size, each with its own unit from a dropdown (up to TiB/TB) and a cross to empty it. Name is the / field. They combine through one needle (kind:cache >500m <4g), parsed in filter.rs.
  • The Filter menu is laid out to the POUR accessibility principles: nothing smaller than body text; a state is never colour alone (ticks, weight, an icon and a sentence for errors); every control is a tab stop at least 32 px tall and the menu is a focus scope (Tab / Shift+Tab, Space, Enter, Esc); each field is labelled above, an empty one reads "No limit", the filter is read back as a sentence, and a bad size is answered beside its field. The controls are the toolkit's own checkbox, select, input and button, so each carries a role and a name.
  • Scanning another machine over SSH, read-only: user@host:/path in the path field or on the page of disks runs GNU find -printf there through the user's own ssh (BatchMode=yes, so no prompts) and builds the tree from the listing. While Disktree::remote is set nothing marks, removes, reveals or probes a path — the same path may exist on this machine. AGENTS.md gains that rule.
  • Side panel: a scrollbar, and "Show more" under Worth a look. Help closes by button and by a press outside. Key hints are framed as buttons.

Verification

cargo xtask lint and cargo xtask test are green on Windows (92 app tests, 167 core). New window-harness tests cover the pages opening and closing, deep levels, the filter menu by mouse and by keyboard, the unit dropdown and clear cross, per-side units, error messages, and the remote scan refusing to mark or remove. Core tests cover the needle parser, the listing parser and decimal sizes.

A review pass over the branch found and fixed seven things (last code commit): a dropped SSH connection passing for a whole tree, a symlinked remote start listing nothing, Esc in the name field wiping the menu's choices, a typed size being rounded on reopening, a no-match filter still reading as applied, the build script rerunning in worktrees, and one raw spacing value.

Not verified:

  • SSH against one host only — scanned a Linux machine (GNU find 4.10) from Windows through the system OpenSSH, typing the address into the path field: a home directory of 820,923 files and 106,027 directories in 3.6 s, with the size, file and directory totals matching find run on the host itself; a symlinked start (/bin); a host typed in the wrong case; and a host that does not exist, which shows ssh's own message. ssh was confirmed to exit 255 for a session dropped from the far end and for an unknown host key, which is what the truncated-listing check relies on. The last two commits fix what that run showed. Not tried: a non-GNU find (macOS, BSD), or scanning from Linux or macOS.
  • Shortcut buttons — the PowerShell script was run against a scratch folder, not through the button.
  • Linux and macOS — nothing here was run there; CI will be the first run.
  • A screen reader on the new menu. The light theme and the open unit dropdown were looked at in the running app.

🤖 Generated with Claude Code

armada45-pixel and others added 14 commits October 13, 2026 07:10
Getting somewhere without the keyboard, and staying how you left it:

* The empty space beside the trail, or ctrl-l, turns the trail into a
  text field holding the path on screen, as a file manager's address bar
  does: copy it, or type or paste another. Inside the tree that is a step
  within it, above the root it widens the scan, elsewhere it scans anew.
* The volume picker lists volumes by name, and the disk's name in the
  panel opens it, as does the trail's crumb when the scan is of a whole
  volume and there is nothing above to widen to.
* Every hint in the bottom bar, and in the review footer, is a button for
  the key it names.
* The theme can be the system's, light or dark, from a button in the top
  bar or T; a second button goes to the repository.
* The theme, depth, Size/Files/Age, hidden files, apparent size and the
  panel are kept in `disktree/settings` between launches. A flag on the
  command line still overrules what was saved.

Refs tobi#38

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* A disk button beside the name opens a page of every disk, as a file
  manager's first page shows them: label and letter, a bar of what is
  used, and the room left. The volume picker's rows carry the same name
  and size. Windows volume labels are read with the volume's information.
* A settings page holds the theme, a switch that lets the depth go to 10
  levels instead of 6, and on Windows buttons that put a shortcut on the
  Start menu or the desktop.
* Filter, beside the scan totals, narrows the mosaic by kind of data or
  to files of at least a size. Each choice writes a word the filter field
  also takes (`kind:cache`, `>1g`), so the menu, the field and a name
  combine into one filter.
* The key list, like the two new pages, has a Close button and closes on
  a press outside it.
* The side panel's lists get a scroll bar, and Worth a look a Show more.
* Key hints are framed and padded as the buttons they are, and the path
  field is framed in the accent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uild

* Filter and Name are two buttons. The Filter menu's choices are held
  apart from the name typed after `/`, so the field shows only the name;
  the search still reads them as one needle.
* Kinds are ticked, any number of them, and the menu stays open.
* A file's size is asked as a least and a most, typed, in KiB, MiB or
  GiB; `<4g` joins `>1g` in what the needle understands.
* The settings page's theme is three buttons of our own. The toolkit's
  group kept a selection of its own, which could disagree with `T`.
* The settings page says which version and build this is; the build
  script counts the commits and names the last.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* An address on the page of disks, or in the path field, scans a
  directory on another machine: `user@host:/path`. The other machine
  runs GNU find and the tree is built from its listing, through the
  user's own ssh with BatchMode, so no password is ever asked for. A
  remote scan is read-only: its paths are that machine's and may exist
  here too, so marking, removal, the file manager, git and the
  free-space meter are all refused while it is on screen.
* The settings page chooses whether sizes read in GiB (1024s) or GB
  (1000s); the Filter menu's units follow.
* The Filter menu's two sizes are named Min and Max, each with a unit of
  its own, and what is in force is said in the menu and beside the
  button.
* A disk's device is shown on the page of disks, which is what tells two
  apart where volumes have no label.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Beside the room it pushed the total out of the card.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Perceivable: nothing in the menu is smaller than body text, and a state
is never colour alone. A ticked kind has a tick and weight, the unit in
force a tick and weight, an error an icon and a sentence, and the Filter
button counts what is on while the menu is shut.

Operable: the kinds are the toolkit's tick boxes and the units its
buttons, each a tab stop at least 32 px tall. The menu is a focus scope
and opens with the keyboard in the Min field, so Tab and Shift+Tab walk
it, Space ticks, Enter applies and Escape closes.

Understandable: each size is labelled above its field, an empty field
says "No limit", the filter is read back as a sentence, and a bad size
is answered beside its field with the way out. Clear all is there only
when there is something to clear; Apply is never greyed out.

Robust: the toolkit's controls carry a role, a name and a state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The size range reads left to right as it is said. Each side's unit is
the toolkit's select instead of three buttons, rebuilt when the menu
opens so it lists the units the GiB/GB setting asks for, and a cross
inside a filled field empties it and lifts that limit at once. An open
dropdown takes Escape before the menu does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A remote listing that ssh did not finish is an error, not half a tree
with totals to believe; and the start path is given to find with a
slash, so one that is a link to a directory is entered.

Escape in the name field drops the name and leaves the Filter menu's
kinds and sizes. A size stays as it was typed when the menu is opened
again, where it was written back rounded and the next Apply moved the
limit. A filter that matches nothing says that everything is shown.

The build script asks git where the HEAD log is and names it only when
it exists, so a worktree or a source archive is not rebuilt every time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Found by scanning a real Linux host from Windows. Its paths were shown
joined with this machine's separator and its trail drawn with it; the
selection offered Mark for removal, which could only refuse; and what
that host would not let be read was put down to Windows, with an offer
to restart as an administrator.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A host is found in the SSH config whatever case it is typed in: ssh
matches a Host line by case, so `mybox` missed the entry for `MyBox`
and failed as a name nobody knows.

A scan that failed says so. With no scan running and no tree the panel
went on spinning under "Reading"; it now reads "Could not read", names
the machine with the path, and the side panel stops waiting.

Nothing about marking is advertised for another machine: not the key
hints, the tooltip, or the Marked section. Apply puts the keyboard in
the size field that is wrong. Text on the highlight is chosen by which
end of the theme stands further from it, so the main button can be read
in the light theme.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The long list is thirty rows, and the button at its foot was a scroll
away from whoever wanted the short one back. It sits below what
scrolls now, and says how many findings the long list holds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@armada45-pixel

Copy link
Copy Markdown
Contributor Author

Closing this in favour of one PR per feature, so each can be reviewed and merged on its own:

Not opened yet, because they need #89, #91 and #92 first: the settings page, and its three settings (up to 10 levels, GiB or GB, Start-menu and desktop shortcuts on Windows). They will follow as small PRs once those are in.

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