Skip to content

Add MacTree, a WizTree-style disk space analyzer for macOS - #1

Merged
aodjo merged 2 commits into
mainfrom
feature/mactree
Sep 12, 2026
Merged

aodjo merged 2 commits into
mainfrom
feature/mactree

Conversation

@aodjo

@aodjo aodjo commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Native macOS 15+ app (Swift / AppKit) that shows what is using disk space, in the style of WizTree.

What's in it

  • Scanner: parallel getattrlistbulk(2) on 16 threads. On an M-series Mac it scanned about 6.7 M items (the whole boot disk) in about 25 s, and 1.2 M items (/Applications) in about 3 s. Totals match du to within 0.1 %. It counts APFS firmlinks once, stays inside the root's APFS container, skips other disks, network and autofs mounts, and never downloads iCloud "dataless" files.
  • Tree View: WizTree's columns (% of Parent bar, Size, Allocated, Items, Files, Folders, Modified).
  • File View: every file sorted by size. Search takes substrings or wildcards, and ; or | combine terms.
  • File types: per-extension totals, coloured like the treemap. Select a type to highlight it, or double-click to list its files.
  • Treemap: cushion shading and continuous zoom around the pointer (wheel or pinch, up to 10,000×). Drag pans; double-click opens a folder on its own.
  • Deletion:
    • Delete marks the selection with a red border in every pane.
    • Toolbar Delete Permanently, left of the search field, removes the marked items after one confirmation. Cancel is the default button.
    • Move to Trash (⌘⌫) stays available.
  • Other: Size / Allocated toggle (allocated by default), Quick Look, Rescan This Folder, and CSV export (also headless: MacTree --export / out.csv).
  • Full Disk Access: a sheet at launch explains the permission and has a draggable app icon. It detects the grant from a fresh child process and offers a relaunch. System Settings' "Quit & Reopen" works while the sheet is open.
  • English / Korean UI.

Build

./scripts/build-app.sh produces build/MacTree.app. The script generates the icon and signs with the first "Apple Development" identity if one is present, otherwise ad-hoc. SIGN_IDENTITY overrides the choice.

CI

.github/workflows/build.yml:

  • On pull requests and pushes to main, builds on macos-15 with the latest stable Xcode.
  • Runs a scan as a smoke test, verifies the code signature, and uploads MacTree.zip.
  • On v* tags, also publishes a GitHub release with the zip.

Notes

  • Every function, method and constant has an English JSDoc-style doc comment.
  • Some UI tests were done headlessly (window snapshots, simulated zoom steps, marking and deleting in a scratch folder). Real mouse, trackpad and drag interaction was not exercised.

https://claude.ai/code/session_0115d7b3mfRT6Gs8mgqtAt1x

- Parallel getattrlistbulk scanner that counts the boot volume once: it
  follows APFS firmlinks once, stays within the container, and never
  downloads iCloud placeholders.
- Tree View, File View with wildcard search, and per-extension totals.
- Cushion treemap with continuous zoom around the pointer and drag to pan.
- Size / allocated-size toggle, Quick Look, Move to Trash, rescan of a
  single folder, and CSV export (also headless via --export).
- Delete marks items with red borders; Delete Permanently removes them
  after one confirmation.
- Full Disk Access guidance sheet with fresh-process detection and relaunch.
- English / Korean UI; build script with icon generation and signing; CI
  workflow that builds on macOS and publishes releases for v* tags.

Claude-Session: https://claude.ai/code/session_0115d7b3mfRT6Gs8mgqtAt1x
Copilot AI lite review requested due to automatic review settings September 12, 2026 09:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@aodjo
aodjo merged commit 65acf57 into main Sep 12, 2026
2 checks passed
@aodjo
aodjo deleted the feature/mactree branch September 12, 2026 10:13
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.

2 participants