Skip to content

feat(clean): add Zed, Warp, and Ghostty cache cleanup#694

Merged
tw93 merged 1 commit intotw93:mainfrom
sebastianbreguel:feat/clean-zed-warp-ghostty
Apr 8, 2026
Merged

feat(clean): add Zed, Warp, and Ghostty cache cleanup#694
tw93 merged 1 commit intotw93:mainfrom
sebastianbreguel:feat/clean-zed-warp-ghostty

Conversation

@sebastianbreguel
Copy link
Copy Markdown
Contributor

@sebastianbreguel sebastianbreguel commented Apr 7, 2026

Summary

Adds cache and log cleanup for three popular modern dev tools, following the existing path-only pattern (Stremio #643, Helium, Sublime Text):

  • Zed — editor logs and cache
  • Warp — terminal cache, log file, and Sentry crash reports
  • Ghostty — terminal cache (includes Sentry crash dir)

Visual preview

Verified on a real macOS system with all three apps installed:

  → Zed logs                    2 items, 6KB dry
  → Warp cache                  2 items, 0B dry
  → Warp Sentry crash reports   2 items, 4KB dry
  → Ghostty cache                        4KB dry

When the apps are not installed, the lines are silently skipped.

What changed

File Change
lib/clean/app_caches.sh 2 new safe_clean lines in clean_code_editors (Zed); 4 new lines in clean_shell_utils (Warp + Ghostty)
tests/clean_app_caches.bats 2 new tests mirroring the existing Stremio test

Safety Review

  • Does this change affect cleanup, uninstall, optimize, installer, remove, analyze delete, update, or install behavior?
    • Yes — mo clean now removes 6 additional cache/log paths owned by Zed, Warp, and Ghostty. All are pure cache or Sentry crash directories.
  • Does this change affect path validation, protected directories, symlink handling, sudo boundaries, or release/install integrity?
    • No — uses existing safe_clean. No new paths under user-owned data dirs.
  • New boundary or risk change:
    • None. Excludes everything that holds user state:
      • ~/Library/Application Support/Zed/db/ (workspace state, conversation history)
      • ~/Library/Group Containers/2BBY89MBSN.dev.warp/ (Warp AI history, sqlite)
      • ~/Library/Application Support/com.mitchellh.ghostty/ (config)
      • ~/.config/zed/, ~/.config/ghostty/, ~/.warp/ (configs)

Test plan

  • bats tests/clean_app_caches.bats — 17/17 pass (2 new + 15 existing)
  • Installed Zed, Warp, and Ghostty via Homebrew on a real Mac
  • Verified each path exists on disk after launching the apps
  • Ran ./mo clean --dry-run and confirmed all 4 lines appear with non-zero entries (output above)
  • Apps uninstalled after verification — no leftover state

Safety-related changes

  • None. Only adds path entries to existing cleanup functions.

Extends clean_code_editors with Zed cache and logs, and clean_shell_utils
with Warp and Ghostty caches/logs. Path-only, mirrors the Stremio/Helium
pattern. Excludes user state (Zed db, Warp Application Support, configs).

Verified against installed apps on macOS:
  Zed logs                  2 items, 6KB
  Warp cache                2 items, 0B
  Warp Sentry crash reports 2 items, 4KB
  Ghostty cache                       4KB
@sebastianbreguel sebastianbreguel requested a review from tw93 as a code owner April 7, 2026 17:25
@tw93
Copy link
Copy Markdown
Owner

tw93 commented Apr 8, 2026

@sebastianbreguel thanks, the paths look safe and the test pattern is right. merging now.

@tw93 tw93 merged commit 1681b37 into tw93:main Apr 8, 2026
9 checks passed
@sebastianbreguel sebastianbreguel deleted the feat/clean-zed-warp-ghostty branch April 8, 2026 02:19
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