1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 16:49:41 +00:00
Commit Graph

42 Commits

Author SHA1 Message Date
tw93
e12a40f6bf fix: use \033[2K to fully clear spinner lines and prevent text remnants
Fixes text remnants and extra blank lines when spinner messages change.

Issues fixed:
1. Text remnants when switching from longer to shorter messages (e.g., 'Cleaning...ems...')
2. Extra blank lines appearing after section headers

Root causes:
- \033[K only clears from cursor to end of line, leaving remnants when new messages are shorter
- stop_section_spinner was clearing lines even when no spinner was running

Changes:
- lib/core/base.sh:
  - Changed stop_section_spinner(), safe_clear_line(), safe_clear_lines() to use \033[2K
  - Added guard in stop_section_spinner to only clear when spinner is actually running
- lib/core/ui.sh:
  - Clear line once when starting spinner (before loop) to ensure clean start
  - Normal spinner rotation uses \r without clearing (performance optimization)

Performance: Line clearing happens only once per spinner start, not on every loop iteration.

Fixes #390
2026-01-31 10:09:02 +08:00
tw93
d06cf6a69e fix: correct blue color definition in base.sh 2026-01-30 11:13:29 +08:00
tw93
e966838c82 style: standardize punctuation across codebase
- Replace parentheses with commas for supplementary info
- Use commas instead of em-dashes for separators
- Update bullet points from - to * in some contexts
- Improve version extraction regex with fallback logic
2026-01-26 14:36:06 +08:00
Tw93
be2e9ddeca change reminder icon to be more comfortable 2026-01-23 09:33:12 +08:00
Tw93
cde39aaeb2 feat(clean): add large file review and unify warnings 2026-01-22 20:15:13 +08:00
Copper-Eye
fae1c88fa2 add cpu temp display and optimize user check 2026-01-13 17:21:03 -04:00
Tw93
93dee7b94d Implemented safer temp cleanup and error reporting while fixing folded-directory size fallback to prevent double counting and aligning Homebrew cleanup traps with safe removal. 2026-01-12 15:45:31 +08:00
Tw93
5d5056fc9e fix: address mo update hanging and imporve temporary file reliability 2026-01-12 14:55:42 +08:00
Tw93
7d6d5eb8b0 Fix the issue with the IDE GoLang cache #269 2026-01-08 10:20:04 +08:00
Tw93
3906c020fe fix: improve cleanup by exiting alt screen and refine whitelisting for directory paths and R renv cache. 2026-01-04 17:41:14 +08:00
Jack Phallen
70e1544490 fix: Respect whitelisted subdirectories 2026-01-04 00:00:28 -08:00
Tw93
6dfd675417 refactor: standardize epoch time retrieval with get_epoch_seconds and ensure locale-independent string transformations. 2026-01-03 18:07:47 +08:00
Tw93
6c8c87bef6 refactor: remove Christmas seasonal feature 2026-01-02 19:26:22 +08:00
Tw93
f53d440bb8 feat: Add Chrome old versions cleanup and whitelist Poetry virtualenvs from cleaning. 2026-01-01 10:26:59 +08:00
Tw93
2bede99e94 fix: enhance local snapshot warning and improve disk space calculation for macOS 2026-01-01 10:12:43 +08:00
Tw93
bb49ec3170 fix: Improve shell script robustness by adding variable validation and safer du output parsing. 2025-12-30 18:07:48 +08:00
Tw93
f0c9683048 feat: Add new system optimizations, refine existing tasks with safety checks, and update whitelisting options. 2025-12-30 15:44:52 +08:00
Tw93
44e91be007 feat: add new system optimization tasks and implement orphaned startup item cleanup 2025-12-29 19:06:04 +08:00
Tw93
ae3889eb34 Simplify the content deleted by the system 2025-12-29 15:34:35 +08:00
Tw93
694c55f73b fix: implement layered error tolerance and accurate cleanup reporting (#175 #176 #180)
- Fix safe_remove set -e trap in command substitution
  - Fix has_full_disk_access false positives and unknown state handling
  - Use set +e in perform_cleanup for graceful degradation
  - Track removal failures and only count actually deleted items (#180)
  - Add "Skipped X items (permission denied or in use)" notification
  - Improve spinner reliability with cooperative stop mechanism (#175)
2025-12-29 14:27:47 +08:00
Tw93
b67204f959 feat: remove SQLite vacuum optimization, enhance CJK/emoji width calculation, and improve system cleanup and UI feedback. 2025-12-29 00:29:42 +08:00
Tw93
6beca2f5fa fix: improve robustness of UI output commands by adding || true 2025-12-28 21:51:38 +08:00
Tw93
50e47a3cd9 chore: bump version to 1.15.3 and update the security audit report following core protection and file operation refinements. 2025-12-28 21:30:39 +08:00
Tw93
f2160b7cab chore: auto format code 2025-12-27 02:19:22 +00:00
Tw93
b086278d26 Implement spinner stack management and ANSI terminal capability checks 2025-12-27 10:17:49 +08:00
Tw93
257a15d381 chore: auto format code 2025-12-26 12:35:48 +00:00
Tw93
a7c989588e improve code quality and fix signal handling 2025-12-26 20:34:38 +08:00
Tw93
cb538b5355 feat: optimize user file handling with early exit for chown, improve Darwin version detection fallback, and add comprehensive tests for user file and Darwin utilities 2025-12-26 15:01:12 +08:00
Luke Bullimore
785032635a feat: harden user file handling and gate LaunchServices rebuild (#159)
- add ensure_user_dir/ensure_user_file helpers in lib/core/base.sh, including
  sudo-aware ownership correction under the invoking user’s home
- use the helpers across clean/optimize/purge/uninstall/whitelist to create
  cache and export files safely (no naked mkdir/touch), including log files and
  dry-run exports
- ensure purge stats/count files and update message caches are pre-created with
  safe permissions
- add Darwin version helpers and skip LaunchServices/dyld rebuild on macOS 15+,
  keeping the existing corruption protection for earlier versions
- guard brew cache timestamp writes and TCC permission flags with safe file
  creation to avoid root-owned artifacts
2025-12-26 10:54:56 +08:00
Tw93
79e40b9c91 docs: Improve clarity and conciseness of comments and documentation 2025-12-18 17:35:54 +08:00
Tw93
af03452f6d feat: Enhance clean and optimize operations with new configuration constants 2025-12-18 17:02:04 +08:00
Tw93
3053e05ce4 chore: auto format code 2025-12-17 02:37:33 +00:00
Tw93
be1027f9c3 refine sudo requirement checks for uninstallation. 2025-12-17 10:37:03 +08:00
Tw93
a77638da8d feat: Add com.apple.finder cache to cleaning, protect specific apps from critical cleaning, implement login item whitelist checks 2025-12-15 15:32:49 +08:00
Tw93
67a8e83511 chore: Exclude JetBrains caches from cleaning 2025-12-12 16:04:38 +08:00
github-actions[bot]
5b73e4ffad chore: auto format code 2025-12-10 03:53:17 +00:00
Tw93
def494b282 Christmas eggs 2025-12-10 10:27:45 +08:00
Tw93
4ff8c3afa3 Fix support for BSD and GNU mktemp 2025-12-10 10:02:27 +08:00
Tw93
88c5f92ac4 format 2025-12-08 18:59:52 +08:00
Tw93
03385c98bc Safety reinforcement 2025-12-08 17:50:46 +08:00
Tw93
51decd1091 Optimize supports setting whitelist 2025-12-08 16:51:25 +08:00
Tw93
80e3be710b Restructure common split content 2025-12-08 15:33:52 +08:00