Skip to content

feat(app): add standalone pwrdisk-tui (port of tobi/disktree#62) - #41

Open
Harold Hunt (huntharo) wants to merge 28 commits into
mainfrom
feat/tui-command
Open

Harold Hunt (huntharo) wants to merge 28 commits into
mainfrom
feat/tui-command

Conversation

@huntharo

@huntharo Harold Hunt (huntharo) commented Oct 31, 2026 •

Copy link
Copy Markdown

PwrDisk previously required a GPUI window for interactive exploration and review. This ports Jeremy Dixon’s terminal interface from tobi/disktree#62 as the standalone pwrdisk-tui executable, backed by the shared scanning core without GPUI dependencies:

pwrdisk-tui ~/src
pwrdisk-tui --apparent-size ~/src
pwrdisk-tui --disk ~/src

The terminal offers the upstream mosaic, inspector, findings, free-space bar, keyboard navigation, scrolling list, search, marking, review and prompt export. The list includes empty directories that have no treemap area. It adapts from a 120-column mosaic and inspector to an 80-column map and a 45-column list.

The first two commits retain Jeremy Dixon’s authorship and cherry-pick provenance: d738be0 introduces the interface; bad1769 adds the empty-match navigation regression. The core half of the latter is already on main through #34. PwrDisk adaptations and verification follow in separate commits.

make build-tui and make install-tui build and install only the terminal. Normal installation includes both executables. Linux release packaging supplies a static-musl terminal, including a terminal-only tarball; macOS bundles carry a separately signed terminal binary, and Windows packages include pwrdisk-tui.exe. CI builds static Linux x64 and ARM64 terminals without installing desktop libraries and uploads them as artifacts.

PwrDisk adaptations require an explicit root, use current path/category and clone accounting, and share the desktop’s persisted removal-capacity setting. Local removal retains guarded review, confirmation and worker remeasurement. Windows file targets query capacity through their containing directory. SSH terminal sessions permit inspection, marking and export. A native link fixture uses the existing deterministic theme initializer so filesystem callbacks cannot wake the test scheduler from another thread.

The TUI owns its scan and marks in memory; neither interface currently saves or loads a complete scan. It does not host MCP or connect to the desktop session. #39 remains responsible for desktop-owned MCP and explicit standalone MCP. Starting a terminal session on macOS does not delegate its scan to the permissioned desktop.

The shared node remains 104 bytes. Hidden and Disk/Apparent changes rescan while retaining resolvable paths and marks; Size/Files/Age changes reuse the tree.

Verification at 49bfb05 Result
macOS 27.0.1 arm64 Lint, full workspace tests, an isolated terminal release build, signed app bundle, and both temporary installation paths pass
Ubuntu 24.04.5 x86_64, Sandboxer sb_wygssy8d54 Lint, full workspace tests, portable desktop plus static terminal build, and packaged installer pass
Actual PTY on macOS and Linux With DISPLAY/WAYLAND_DISPLAY absent: renders a completed contrived scan, quits with q, restores the terminal, and leaves the fixture intact
Linux terminal linkage Stripped 1.9 MB static PIE with no dynamic loader; no GPUI dependency in the terminal Cargo tree
Workflow files actionlint passes
Windows and packaged universal builds Fresh CI and the packaging preview provide native platform checks; pending

The empty-match GPUI regression covers the real benefit established during investigation: a drawn positive-size ancestor of an empty matching directory retains its “holds matches” styling and readable label. MCP search uses a separate query implementation and already finds empty matches. An all-empty filtered treemap still has zero tiles.

Before this PR there is no terminal UI to capture. The following captures come from the actual Ratatui TestBackend renderer over a synthetic /Fixtures tree, with an invented volume, capacity, free space and timing; the exported cell buffers were rasterized to PNG. They contain no real scan or volume data.

120 columns:

120-column terminal mosaic and inspector

80 columns:

80-column terminal mosaic

45 columns:

45-column scrolling terminal list

jeremydixon22 and others added 7 commits October 31, 2026 14:46
The TUI removal tests exposed GetDiskFreeSpaceExW rejecting file paths during the capacity preflight. Use the containing directory for Windows file targets and cover both preview and worker preflight with a real file.

Make terminal fixtures use a Windows-legal filename and canonical temporary roots, matching the command entry point instead of comparing an 8.3 alias with its expanded path.
Restore the upstream terminal package as its own binary without a GPUI dependency. Keep explicit roots, shared removal settings, guarded local confirmation, and independent terminal session ownership.

Build and install the terminal without a desktop, package a static Linux executable and terminal-only download, include the separate executable in macOS and Windows packages, and verify standalone builds in CI.
@huntharo Harold Hunt (huntharo) changed the title feat(app): add pwrdisk tui (port of tobi/disktree#62) feat(app): add standalone pwrdisk-tui (port of tobi/disktree#62) Oct 31, 2026
@huntharo Harold Hunt (huntharo) added the build-preview Build unsigned DMG and Windows installers for this PR label Oct 31, 2026
Register terminal in the explicit job inventory so the classifier regression exercises its failure, cancellation, and documentation-only skip conditions alongside the other code-impacting jobs.
Keep main’s wording for the shared Windows file-capacity check and retain both the preview and worker preflight regressions.
Keep the core INSIGHT_LIMIT import alongside main’s new Undo shortcut constant while incorporating the current main branch.
Preserve the standalone terminal commands and test coverage alongside main’s updated headless and desktop testing instructions.
Use debug executables for the Windows icon and terminal checks, and apply main’s cache save and toolchain-pruning policy to the standalone terminal job.
Retain the standalone terminal on the indexed Tree and Node cursor API, regenerate its lockfile and notices on main’s dependency graph, and use the shared Rust setup action for terminal CI.
Keep the search-highlighting helper from main alongside the core insight limit used by the desktop and terminal interfaces.
Keep the standalone terminal guidance alongside the new read-only APFS path-set planning instructions, using the pwrdisk-tui executable name.
Use main’s rule-aware desktop filter while retaining the shared insight limit for the desktop and terminal interfaces.
Regenerate notices for the merged workspace and update the standalone terminal lockfile entry to the workspace release version.
Regenerate notices for the merged workspace and update the standalone terminal lockfile entry to the workspace release version.
Keep the desktop policy and its confirmation settings from main, including the default agent cap when the window limit is off, while preserving terminal core enforcement.
Preserve terminal removal limits through the new worker API. Extend the palette and legend for VM detections, use a structured Rust build fixture, and retain terminal notes alongside the new artifact guidance.
Regenerate notices for the merged workspace and update the standalone terminal lockfile entry to the workspace release version.
Keep the cache-cleanup and terminal guidance, and handle the shared cleanup event in the standalone terminal's raw-removal loop.
Regenerate notices for the merged workspace and align the standalone terminal lockfile entry with the workspace release.
Regenerate notices for the merged workspace and align the standalone terminal lockfile entry with the workspace release.
Retain the new temporary, diagnostic-log, and trash categories in terminal palettes and labels. Regenerate workspace notices and align the terminal lockfile version with the merged release.
Keep classification-sensitive fixtures in the canonical workspace on every platform. Compare scanned classification with a host-independent tree oracle; reproduce the previous failure with TMPDIR=/tmp.
Regenerate notices for the merged workspace and align the standalone terminal lockfile entry with the workspace release.
Give the Intel job 50 minutes for its existing lifecycle, compilation and test deadlines plus setup. Check every valid phase combination in the deadline model so the outer job cannot cut those allowances short.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-preview Build unsigned DMG and Windows installers for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants