Repository navigation
Filter the mosaic by kind of data and by file size - #97
Open
armada45-pixel wants to merge 1 commit into
Open
armada45-pixel wants to merge 1 commit into
armada45-pixel wants to merge 1 commit into
Conversation
armada45-pixel
force-pushed
the
filter-kind-size
branch
from
November 29, 2026 21:06
cda181b to
6b2ed19
Compare
The only way to narrow the mosaic was a name typed after `/`, which cannot ask for "the caches" or "files over a gigabyte". Beside the scan totals there are now two buttons. Name opens the field `/` opens. Filter opens a menu: tick any number of kinds, and type a Min and a Max file size, each with its own unit up to the terabyte and a cross that empties it. The menu's choices travel to the search as words in the same needle the name does (`kind:cache`, `>bytes`, `<bytes`), so the two combine and the filtered layout needs nothing new. They are held apart from the typed name, so the field shows only what was typed and Esc there drops the name alone. A size is asked of files only: a directory is as large as everything in it, so every directory above a large file would match. The find state machine carries the menu's words beside the typed query: `Choose` searches again with new words and applies, `ClearQuery` drops the name alone, and `Clear` drops both. When only the menu's words were searched and nothing matched, the field stays shut and everything stays shown, since there is nothing typed to edit. The menu is a focus scope that opens with the keyboard in the Min field: Tab walks it, Space ticks, Enter applies, Esc closes. A bad size is said under the fields and Apply puts the keyboard in the one that is wrong. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
armada45-pixel
force-pushed
the
filter-kind-size
branch
from
November 29, 2026 22:01
6b2ed19 to
a86c95f
Compare
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.
One of a set of small PRs that replace #87 and #88, one feature each. Rebased onto 1.5.0 (73bdbb3); they touch neighbouring lines in
state.rs,views.rsandtests.rs, so whichever merges later will need another rebase; I'll do those as they come up.The only way to narrow the mosaic is a name typed after
/, which cannot ask for "the caches" or "files over a gigabyte". This adds two buttons beside the scan totals./already opens.How it works. The menu's choices travel to the search as words in the same needle as the name (
kind:cache,>bytes,<bytes), parsed by a newfilter::Query, so Name and Filter combine and the filtered layout is unchanged. A word that only looks like a kind or a size stays in the name. A size is asked of files only; a kind takes the topmost directory of that kind whole. Esc in the Name field drops the name alone.Accessibility. The menu is laid out to the POUR principles: nothing smaller than body text; a state is never colour alone; every control is a tab stop at least 32 px tall. It is a focus scope that opens with the keyboard in the Min field: Tab and Shift+Tab walk it, Space ticks, Enter applies, Esc closes. The controls are the toolkit's own checkbox, select, input and button, so each carries a role and a name.
This is the largest of the set (about 1,450 lines, of which 560 are tests).
Verified.
cargo xtask lintis green on Windows and all 104 disktree-app tests pass. 9 tests in disktree-cli, disktree-core and disktree-scanner (btrfs, hardlink and cache tests) fail on Windows on an unchanged 1.5.0 too, so the fullcargo xtask testrun is red there for reasons outside this PR. The core filter tests pass too.Since 1.5.0. The menu's choices live in the new
find_machinebeside the typed name: ticking a kind or changing a size searches again, and Esc in the name field drops only the name.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. No screen reader was tried.
🤖 Generated with Claude Code