Repository navigation
feat: "Reclaim space" container action (container clean) - #75
Merged
Merged
Conversation
Wraps Apple container 1.4's `container clean`, which fstrims a running container's writable rootfs and block mounts to hand freed space in its sparse disk images back to macOS. Non-destructive; running containers only. Available from the container row, the detail pane, and the bulk action bar. Older CLIs get a clear "requires 1.4 or later" error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Adds a Reclaim space action that wraps Apple container 1.4's new
container clean.What
cleandoes (traced in apple/container 1.4.1:ContainersService.clean→RuntimeService.clean): it runs an fstrim on the container's writable root filesystem and every writable block mount. That returns the space freed inside the sparse ext4 disk images to macOS. No data is removed, and the CLI only allows it on running containers.runtime::clean_containers(&[id])runscontainer clean <ids…>with the long timeout, exposed as the Tauri commandclean_containers. An old CLI without the subcommand fails withPlugin 'container-clean' not found(exit 64); that becomes "container cleanrequires Apple container 1.4 or later". Other errors, such as "container is not running", pass through unchanged.toastimport inmodals.tsx. The Doctor-fix failure path already calledtoast()without importing it.Verification
cleanon a running container: exit 0, 0.3s.cargo fmt --check,clippy -D warnings,cargo test(84 passed),npm test(58 passed),npm run buildall pass.🤖 Generated with Claude Code