Dylan Joss
3c761865f8
Uses slices for equality comparison
2026-01-21 11:46:50 -08:00
Dylan Joss
046843a012
Add more tests
2026-01-21 11:29:37 -08:00
Dylan Joss
3148971506
test: add unit tests for RingBuffer in cmd/status
...
Add comprehensive test coverage for the RingBuffer circular buffer
data structure used in network history tracking.
Test cases:
- Constructor initialization (NewRingBuffer)
- Empty buffer returns nil slice
- Adding elements within capacity
- Exact capacity boundary
- Wrap-around behavior with chronological ordering
- Multiple wrap-arounds stress test
- Single-element buffer edge case
- Slice returns independent copy (not reference)
2026-01-21 00:15:35 -08:00
Tw93
6817f93075
Merge branch 'main' of github.com:tw93/Mole
2026-01-20 15:10:05 +08:00
Tw93
3f85c8238f
Use gray color for warning icons to reduce visual noise
2026-01-20 15:07:37 +08:00
Tw93
58522b4f90
Fix undefined ICON_INFO variable
2026-01-20 15:03:08 +08:00
Tw93
a96e53d988
chore: auto format code
2026-01-20 06:46:06 +00:00
Tw93
acdf40dd2c
Unify output format for multiple versions check
2026-01-20 14:44:11 +08:00
Tw93
b4b9b0c474
Add cleanup for orphaned system services
...
Detect and remove leftover LaunchDaemons, LaunchAgents, and
PrivilegedHelperTools from uninstalled apps like Sogou Input,
ClashX, ClashMac, and Nektony App Cleaner.
2026-01-20 14:25:32 +08:00
Tw93
d044b2876e
Fix unable to uninstall data-protected apps like Clash Party
...
Previously, apps matching DATA_PROTECTED_BUNDLES patterns (VPNs, dev tools, etc.)
could not be uninstalled because should_protect_path blocked their deletion.
Now use MOLE_UNINSTALL_MODE to distinguish between cleanup and explicit uninstall,
allowing users to remove these apps when they choose to while still protecting
their data during normal cleanup operations.
Also allow deletion of installer receipts in /private/var/db/receipts/.
2026-01-20 11:54:17 +08:00
Tw93
6d041a22e1
Merge pull request #336 from tw93/dependabot/github_actions/actions/cache-5.0.2
...
chore(deps): bump actions/cache from 5.0.1 to 5.0.2
2026-01-20 10:26:48 +08:00
Tw93
e2b31b10d9
Merge pull request #337 from tw93/dependabot/github_actions/actions/setup-go-6.2.0
...
chore(deps): bump actions/setup-go from 6.1.0 to 6.2.0
2026-01-20 10:26:34 +08:00
Tw93
127e589291
Fix test error case
2026-01-20 10:26:13 +08:00
dependabot[bot]
802adfc4c7
chore(deps): bump actions/setup-go from 6.1.0 to 6.2.0
...
Bumps [actions/setup-go](https://github.com/actions/setup-go ) from 6.1.0 to 6.2.0.
- [Release notes](https://github.com/actions/setup-go/releases )
- [Commits](4dc6199c7b...7a3fe6cf4c )
---
updated-dependencies:
- dependency-name: actions/setup-go
dependency-version: 6.2.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-01-19 19:57:37 +00:00
dependabot[bot]
ace682e041
chore(deps): bump actions/cache from 5.0.1 to 5.0.2
...
Bumps [actions/cache](https://github.com/actions/cache ) from 5.0.1 to 5.0.2.
- [Release notes](https://github.com/actions/cache/releases )
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md )
- [Commits](9255dc7a25...8b402f58fb )
---
updated-dependencies:
- dependency-name: actions/cache
dependency-version: 5.0.2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-01-19 19:57:31 +00:00
Tw93
4d16db926d
Merge branch 'main' of github.com:tw93/Mole
2026-01-19 17:08:54 +08:00
Tw93
2d5ccf5d71
fix: exclude Flutter/CocoaPods/Pub caches from cleanup ( #334 )
...
Prevent forced re-downloads and re-installations by not cleaning:
- ~/Library/Caches/CocoaPods (spec repo cache)
- ~/.cache/flutter (engine/artifacts cache)
- ~/.pub-cache (Dart package cache)
Also standardize redirection syntax to '> /dev/null' for consistency.
Fixes #334
2026-01-19 17:08:35 +08:00
Tw93
cec385efc7
chore: auto format code
2026-01-19 08:54:45 +00:00
Tw93
d25c9f7637
refactor(uninstall): remove search and optimize scan performance
...
- Remove complex search/filter feature from menu (simplify UX)
- Optimize Homebrew cask detection (only check Caskroom symlinks)
- Cache whoami outside loop, use bash parameter expansion
- Fix spinner overlap with error messages
- Add trap for Ctrl+C cleanup
- Use ICON_ERROR for failure messages
2026-01-19 16:53:51 +08:00
Tw93
213dcf587d
Improve and ignore documents
2026-01-19 16:12:53 +08:00
Tw93
9b738488ec
Delete AGENTS.md
2026-01-19 12:23:22 +08:00
Tw93
7a5bdac385
feat: add uptime display to status header ( #329 )
...
Show system uptime in the header row with a concise format (e.g., "up 1d 5h").
Simplify title from "Mole Status" to "Status" for better fit.
2026-01-18 16:52:44 +08:00
Tw93
72f42a363e
chore: remove redundant sensors card and bump version to 1.22.1
...
- Disable sensors data collection (CPU temp already shown in CPU card)
- Remove unused sensor-related functions (collectSensors, prettifyLabel, hasSensorData, renderSensorsCard)
- Remove unused gopsutil/sensors import
- Fix inline spinner disown call with explicit PID
- Update version from 1.22.0 to 1.22.1
- Update SECURITY_AUDIT.md to match new version and date
V1.22.1
2026-01-17 10:46:11 +08:00
Tw93
d39d787c83
update test
2026-01-17 10:25:00 +08:00
Tw93
3672000779
update test
2026-01-17 10:20:58 +08:00
Tw93
ceddbe889f
Merge branch 'main' of github.com:tw93/Mole
2026-01-17 10:14:43 +08:00
Tw93
f05441344a
publish 1.22.0
2026-01-17 10:14:39 +08:00
Tw93
46472bc86e
chore: auto format code
2026-01-17 02:13:54 +00:00
Tw93
e6fc0613d5
perf: improve cleanup UI responsiveness and reduce visual flicker
...
- Speed up spinner animation from 100ms to 50ms for smoother visuals
- Fix spinner flicker by deferring stop until output is ready
- Remove unnecessary 'Preparing...' spinner at section start
- Hide whitelist-protected items from output (Trash, Finder metadata)
- Add spinner feedback for system diagnostic log cleanup
- Remove redundant stop_section_spinner calls in cleanup modules
The cleanup process now feels significantly faster and more polished,
with continuous visual feedback and no jarring gaps between operations.
2026-01-17 10:12:23 +08:00
Tw93
b9072c2389
chore: auto format code
2026-01-17 01:59:47 +00:00
Tw93
234dad5531
Merge branch 'main' of github.com:tw93/Mole
2026-01-17 09:58:13 +08:00
Tw93
bacc782e41
ShellCheck SC2001 Warning
2026-01-17 09:58:08 +08:00
Tw93
fe296de814
chore: auto format code
2026-01-17 01:53:40 +00:00
github-actions[bot]
1534018974
chore: update contributors [skip ci]
2026-01-17 01:50:08 +00:00
Tw93
060c48c48d
refactor: enhance uninstall safety and fix dock removal
...
- Add symlink/bundle_id/BOM validation to prevent injection attacks
- Fix Dock removal for /Applications symlink (use pwd not pwd -P)
- Fix brew uninstall test hanging (skip sudo in non-interactive mode)
- Remove unused SENSITIVE_DATA_REGEX
2026-01-17 09:49:42 +08:00
Tw93
12cacaa6cc
refactor: enhance pattern detection and symlink safety
...
- Expand sensitive data patterns (credentials, cloud configs, media folders)
- Add symlink target validation in path deletion checks
- Remove shared Gradle cache from Android Studio cleanup
2026-01-17 09:09:11 +08:00
Tw93
51abd890bc
fix: improve Dock cleanup path handling
...
- Add control character validation
- Use canonical paths (pwd -P) for better resolution
- Strengthen fallback logic for deleted applications
- Add empty path guards
2026-01-17 09:09:02 +08:00
Tw93
7a46aa04db
security: harden BOM processing and LaunchAgents detection
...
- Add path traversal protection in BOM receipt parsing
- Remove invalid ~/Library/LaunchDaemons path references
- Strengthen LaunchAgents matching (min 5 chars, exclude com.apple.*)
- Add 300s timeout to brew cask uninstall to prevent hangs
Addresses security review findings from V1.21.0 audit.
2026-01-17 09:08:41 +08:00
Tw93
4fb754e927
Merge pull request #326 from bikraj2/fix/unchecked_history_addition
...
fix(history): prevent adding multiple history entries with same path when scanning
2026-01-17 08:24:36 +08:00
Tw93
a8a9b2f4f6
Merge branch 'main' into dev
2026-01-17 08:22:02 +08:00
github-actions[bot]
871b1d7eda
chore: update contributors [skip ci]
2026-01-17 00:21:39 +00:00
Tw93
6f2c8b7f78
Merge pull request #327 from alexandear-org/chore/update-gopsutil-v4
...
chore(deps): bump shirou/gopsutil from v3 to v4
2026-01-17 08:21:19 +08:00
github-actions[bot]
c95f2986f4
chore: update contributors [skip ci]
2026-01-17 00:18:28 +00:00
Tw93
34cfe962d7
Merge pull request #328 from alexandear-org/chore/format-code
...
chore: format code; fix lint issues
2026-01-17 08:18:11 +08:00
Oleksandr Redko
9b16601117
chore: format code; fix lint issues
2026-01-16 17:39:05 +02:00
Oleksandr Redko
a589b9f2e1
chore(deps): bump shirou/gopsutil from v3 to v4
2026-01-16 17:23:00 +02:00
bikraj2
c99535c2d7
fix(history): prevent adding multiple history entries with same path when scanning
2026-01-16 19:28:32 +05:30
Tw93
a7ea5d94a0
chore: auto format code
2026-01-16 07:28:58 +00:00
Tw93
d8217235bd
chore: clean up dev comments and remove AI-style formatting from README
2026-01-16 15:26:15 +08:00
Tw93
8cc39585ea
feat: improve network status graph with sparklines and responsive width
2026-01-16 14:50:10 +08:00