Skip to content

feat(disk-clean): rewrite plugin as 2.0.0 - #2

Open
rkrkrkk wants to merge 31 commits into
mainfrom
worktree-diskclean-rewrite
Open

feat(disk-clean): rewrite plugin as 2.0.0#2
rkrkrkk wants to merge 31 commits into
mainfrom
worktree-diskclean-rewrite

Conversation

@rkrkrkk

@rkrkrkk rkrkrkk commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • Rewrite DiskClean as plugin 2.0.0 with getattrlistbulk sizing, bounded worker pool, and verified-plan deletion (freeze → trash/permanent).
  • Add Full Disk Access guidance, developer-artifact purge roots, leftover installer scanning, and safer default-to-Trash cleanup.
  • Cover new UI/state machine with adjacent tests and full 11-language localization; update README and plugin changelog fragment.

Test plan

  • make build (worktree)
  • DiskClean XCTest suite: 35 classes / 475 passed
  • PluginLocalizationCatalogAuditTests passed
  • make run visual check: FDA card, developer-artifacts section, leftover installers section
  • Real scan → trash cleanup on a small safe selection
  • Optional: permanent-delete confirmation path

ggbond268 and others added 19 commits July 27, 2026 01:40
Resolve conflicts:
- README.md: combine the ⌘K unified search palette description with
  main's ⌃⌘↑/⌃⌘↓ plugin subpage navigation and installed-plugin search
  scope wording.
- SettingsNavigationCoordinator.swift: keep both the unified search
  presentation types (UnifiedSearchPresentationOrigin) and the plugin
  subpage move types/helpers (PluginSubpageMoveDirection,
  FeatureSettingsPane.settingsSidebarOrder).
- SettingsView.swift: merge FeatureSettingsView/FeatureSettingsSidebar
  so the sidebar keeps main's keyboard-navigable, ScrollViewReader-based
  list (onMoveCommand, focus ring, orderedPanes-driven sidebarRow) while
  retaining the ⌘K search launcher button and onSearch callback added
  for unified search.

Co-authored-by: ggbond268 <ggbond268@users.noreply.github.com>
Move SettingsSidebarMaterialBackground onto the outer VStack so the
⌘K search launcher area matches the PR225 sidebar chrome, while keeping
main's keyboard-navigable ScrollViewReader list intact.

Co-authored-by: ggbond268 <ggbond268@users.noreply.github.com>
@rkrkrkk

rkrkrkk commented Jul 30, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

rkrkrkk added 6 commits July 30, 2026 12:20
Rebuild DiskClean with getattrlistbulk sizing, verified-plan deletion, Full Disk Access guidance, developer-artifact and leftover-installer scans, and full localization coverage.
Keep the plugin implementation and changelog; leave internal design notes out of the origin PR.
Convert DiskClean source and test comments, MARK sections, and developer diagnostic messages to English. Keep Chinese user-facing localization defaults and UI expectation strings.
Preserve logical paths for whitelist matching, gate cleanup until startup reconciliation finishes on a shared journal, keep cleaning phase active until the current removal returns, fall back to SlowWalker on pure walkError, and treat installer enumeration errors as unavailable/denied.
… actives

Keep the cleaning operation ID until the current removal finishes so Stop can return to scanned. Merge every logical alias for the same physical path into ownership so whitelist rules on any alias still apply. Add journal releaseActive for rollbackBlocked and reopen journals in reconciliation tests to simulate a new process.
Match timeout, missing-git, and non-zero exit expectations to the production Chinese reason strings so CI no longer fails on localization contract drift.
@rkrkrkk
rkrkrkk force-pushed the worktree-diskclean-rewrite branch from 2820106 to e8d9027 Compare July 30, 2026 04:20
ggbond268 and others added 2 commits July 31, 2026 10:21
Block Home, top-level personal folders, and system locations as
developer-artifact scan roots so depth-limited discovery cannot cover
the whole machine by mistake. Surface a short rejection message, keep
project subfolders allowed, and drop any previously persisted denylisted
roots before scanning.

Co-authored-by: ggbond268 <ggbond268@users.noreply.github.com>
cursoragent and others added 4 commits July 31, 2026 02:32
Resolve README conflicts by keeping App Volume from main and the
Disk Cleanup 2.0 description from this branch.

Co-authored-by: ggbond268 <ggbond268@users.noreply.github.com>
store.add uses realpath, so the valid-root fixture must exist on disk.

Co-authored-by: ggbond268 <ggbond268@users.noreply.github.com>
Co-authored-by: ggbond268 <ggbond268@users.noreply.github.com>
isTooBroad only blocked `/Users/<name>` itself, not its well-known
top-level folders (e.g. /Users/alice/Documents), even though the
current user's own Documents/Desktop/etc. were already denylisted.
Generalize the check so other accounts get the same protection.

Also drop a redundant persistence write in add(): it was calling
sanitizePersistedRoots() (which persists) and then replaceAll()
(which persists again) for the same call.

Co-authored-by: ggbond268 <ggbond268@users.noreply.github.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.

5 participants