Skip to content

Use ⌘+ and ⌘− for detail instead of zoom buttons - #38

Open
horus-leonardo wants to merge 10 commits into
phalladar:mainfrom
horus-leonardo:pr/08-detail-shortcuts
Open

horus-leonardo wants to merge 10 commits into
phalladar:mainfrom
horus-leonardo:pr/08-detail-shortcuts

Conversation

@horus-leonardo

Copy link
Copy Markdown
Contributor

Part 8 of 10 of the split of #30: ⌘+ and ⌘− for detail. This is the zoom-buttons and shortcut decision.

For the user: the detail level is what you change most with framed folders, so it gets the easy keys.

  • More and Less Detail take ⌘+ and ⌘− (⌘= also means More). Main has no shortcut on these keys today; its zoom only has toolbar buttons.
  • The zoom buttons leave the toolbar. Scroll, pinch and middle-drag zoom stay, and ⌘0 still resets the zoom.

Drop this PR to keep the zoom buttons; nothing after it depends on it.

Needs: #37. Stacked: GitHub also shows the commits of the PRs below it. Review only this PR's own commits (listed at the end).

🤖 Generated with Claude Code

horus-leonardo and others added 10 commits November 30, 2026 13:45
The row keeps a running sum, min and max, so each candidate costs O(1)
instead of a pass over the row. The layout is the same; a test checks
the invariants on random inputs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Folders are frames with a title strip and open by detail level (1 to 8,
default 3) when they have room; deeper folders stay closed. Children too
small to see gather into one "N smaller items" block. The shown folder
isn't drawn, since the breadcrumb names it. Children are sorted and
summed in one pass, with zero sizes left out.

View > More Detail and Less Detail change the level. The drawing keeps
main's colors and borders; it only adds the title strip and the
smaller-items label. A smaller-items block has no Move to Trash, since
its node is the folder that holds it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Categories use system colors on the window background, so they follow
light, dark and Increase Contrast. Folders are graphite frames, or a
block with a tab when too small for a title, and a closed folder shows
a thin bar of what it holds by category. Each item is one fill with
rounded, pixel-snapped edges and 1 pt gaps, instead of a fill plus a
stroke. Nested frames shade 5% darker per level in light mode and 3%
lighter in dark mode, instead of 8% darker. Smaller-items blocks are
striped, and Increase Contrast outlines everything.

View > Color by Folder gives each child of the shown folder its own
color, shared by everything inside it. It helps when most of a disk is
"Other". Color by Type stays the default. A folder is not colored by
its main category, because a folder of 51% video and 49% code would
show as video.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Like SpaceSniffer, a single click opens a closed folder where it is and
selects it, when it has room and something inside. The ▾ in an open
folder's title closes it. A folder opened or closed by hand keeps that
state until a new scan or View > Collapse All. A click acts at once
instead of waiting to rule out a double click, and a double click
drills into what the first click hit. An empty folder offers no drill
down.

Opening, closing and navigating animate for 250 ms: items move, grow
or shrink to their new place. Main already wraps navigation in
withAnimation, but a Canvas draws each frame from scratch, so nothing
moved. Resizes and setting changes stay instant, as does everything
under Reduce Motion, and nothing runs while idle.

Since a click now opens folders, the sidebar moves only on navigation:
drill down, breadcrumb, Back, and picks from the sidebar or the
skipped-folders list. Main revealed every selection, which would mean
on every click.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main's selection dim stays, restyled to match the rounded shapes: the
0.55 black scrim and white stroke become a lighter scrim cut to the
item's shape, an accent ring and a shadow. Only a selected folder dims
the rest; a file, a smaller-items block, or an ancestor standing in
for a folder inside a closed one dims nothing. When the selection
moves within one layout, the ring travels to the new item (about 60
lines, easy to drop), and the dim stays on while a folder opens.

A card beside the cursor shows the hovered item's size, file count and
path from the shown folder, and for a folder up to four category rows.
A smaller-items card says what a double click opens. With nothing
hovered, the status bar shows the volume: "Macintosh HD · 782 GB used ·
81.9 GB free", read again after every scan, rescan or trash.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Some people will prefer main's flat look. With View > Show Folders off,
folders become undrawn groups, as the layout engine already emits them,
so selection and the dim work without a special path. Only files and
smaller-items blocks are drawn, 1 pt apart, down to depth 32. The detail
controls are disabled, and folders opened by hand keep their state for
when folders come back. Laying out / takes about 44 ms for 16,143
items.

The incomplete-scan banner's "Show Folders" button becomes "List
Skipped Folders…", so it doesn't clash with the new switch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With drill down, navigation and view controls are separate jobs, so
they sit on separate sides of the toolbar: Back, Scan Drive and Rescan
on the left; detail, color, Show Folders, size, zoom and the inspector
on the right.

- Back is always in the toolbar, disabled at the root, so the toolbar
  doesn't lay out again on every drill. It still returns from the
  welcome screen.
- The View menu gets Actual Size (⌘0), Back (⌘[), Rescan (⌘R) and the
  inspector (⌥⌘I). The inspector still toggles without animation,
  through AppState.toggleInspector().
- Every control has a tooltip. The breadcrumb becomes pills, and the
  treemap controls are disabled until there's a scan.
- The size picker is a menu, and no longer leaves the welcome screen as
  a side effect; the Back button does that.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The button scans a drive or a folder, and its menu has Open Folder…,
so "New Scan" says what it does. Drop this commit to keep the old name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After drilling into a folder and changing it in Finder, Rescan (⌘R)
now rescans only that folder, which is much faster than the whole
scan. At the root it rescans everything, as before. Rescan Everything
(⇧⌘R), or Option-click on Rescan, still rescans the whole scan. Drop
this commit to keep Rescan as a full rescan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With framed folders, the detail level is what you change most, so More
and Less Detail take ⌘+ and ⌘− (⌘= also means More). Main has no
shortcut on these keys today. The zoom buttons go from the toolbar;
scroll, pinch and middle-drag zoom stay, and ⌘0 still resets the zoom.
Drop this PR to keep the zoom buttons.

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