1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 20:54:50 +00:00
Commit Graph

126 Commits

Author SHA1 Message Date
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
Andrei Murariu
205f3adbd2 imp: mo status network graph 2026-01-15 14:53:34 +02:00
Tw93
00a712711e chore: auto format code 2026-01-14 03:59:21 +00:00
Tw93
facaf5b34c fix: precision issue in battery metrics and adaptive purge UI
- cmd/status: use ParseUint to handle negative battery power values correctly
- bin/purge: make path truncation adaptive to terminal width
2026-01-14 11:57:10 +08:00
Tw93
9b3220bfe4 fix: handle uint64 overflow in battery power metrics
- Fix display of invalid large values like 18446744073709544W
- macOS ioreg returns negative values as uint64 (two's complement)
- Detect overflow pattern (value > 2^63) and convert to signed
- Validate reasonable power range (-200W to 200W) for battery
- Add range validation for SystemPower (0 to 1000W)

Root cause: During charging, battery power is negative but ioreg
formats it as unsigned uint64, causing overflow. This fix properly
converts these values back to signed integers.
2026-01-14 11:26:37 +08:00
Tw93
5afd602027 refactor: optimize CPU temp feature with tests and performance fix
- Restore performance test threshold to 200ms (from 500ms)
  User caching is highly effective (~8ms for 100 calls)
- Add unit tests for colorizeTemp() covering thresholds and edge cases
2026-01-14 10:31:01 +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
3bae4f356a Merge branch 'dev' into pr-300 2026-01-12 14:20:24 +08:00
Jack Phallen
47ce1cb75b fix(analyze): Fix race condition in currentPath 2026-01-11 23:44:55 -05:00
Jack Phallen
1e2cf97b47 fix(analyze): Additional improvements to limit sem blocking 2026-01-11 23:28:44 -05:00
Tw93
df2f00c92f Merge branch 'pr-296' into dev 2026-01-12 11:52:19 +08:00
Tw93
f21fc833b5 Merge pull request #295 from JackPhallen/fix/cap-scanner-buffer-size
fix: cap entryChan buffer to prevent memory spikes
2026-01-12 11:46:00 +08:00
Tw93
8aee56b7fa fix: enhance overview scan UI and invalidate cache on refresh
- Invalidate disk cache for overview entries on refresh to ensure fresh data.

- Show dynamic status messages (e.g., 'Scanning Applications...') instead of static text in Overview.

- Adjust spinner animation speed to 100ms for smoother visual experience.
2026-01-12 11:42:07 +08:00
frozturk
08c577d24a fix: refresh not working in overview mode 2026-01-11 19:38:56 +01:00
Jack Phallen
8870141923 Cap entryChan buffer to prevent memory spikes
Cap buffer at 4096. All entries still process normally—producers just briefly block if
the buffer fills, which is negligible since the collector drains it quickly.
2026-01-11 11:06:00 -05:00
Jack Phallen
b8ab9511fd Create separate limiter for du subprocesses
Introduce duSem to cap concurrent du subprocess spawns while keeping
the existing sem to limit overall scan fan-out (dir recursion/task concurrency).
This prevents du from monopolizing scan concurrency and reduces resource
spikes during folded-dir sizing.
2026-01-11 10:58:45 -05:00
Jack Phallen
cf4690191e Fix semaphore acquisition order
Acquire semaphore before spawning goroutine in calculateDirSizeFast to prevent goroutine
explosion. Previously, all subdirectory goroutines were spawned immediately and blocked on
the semaphore—now the spawning itself is throttled.
2026-01-11 10:58:45 -05:00
Oleksandr Redko
14b8fa688e refactor: simplify with slices.Clone 2026-01-10 20:41:05 +02:00
Tw93
7d43e669a8 fix(analyze): improve deletion safety and UI clarity
- Update UI status to 'Moving to Trash...' for clarity
- Use os.Lstat instead of os.Stat to correctly handle broken symlinks during deletion checks
2026-01-10 08:51:14 +08:00
Tw93
ebb4f7a1e9 feat(analyze): safer deletion with Trash and two-key confirm
- Change delete confirmation from double-delete to Delete→Enter
- Move files to macOS Trash instead of permanent deletion
- Allow file recovery from Trash if accidentally deleted
- Update UI prompts to show 'Press Enter to confirm'
- Skip Finder-dependent tests in CI environments
- Update SECURITY_AUDIT.md with new safety mechanisms

Closes #288
2026-01-10 07:24:58 +08:00
Tw93
2b5dd3f44c feat: show scanning progress as percentage in disk analyzer
- Implemented progress percentage display (e.g., `(45%)`) in `cmd/analyze` to show scanning status based on cached total files.
- Kept the UI clean by avoiding a full progress bar.
- fix: formatting improvements in `bin/touchid.sh`.
2026-01-09 14:16:29 +08:00
Tw93
180037c22b feat(status): persist cat visibility preference
- Add loadCatHidden/saveCatHidden functions
- Save preference to ~/.config/mole/status_prefs
- Load preference on startup
2026-01-08 15:58:50 +08:00
Tw93
79a19ffbfe Go code formatting optimization 2026-01-08 15:26:35 +08:00
Tw93
64a580b3a7 feat: cat hide toggle and critical fixes (#272)
- Add 'k' key to hide/show cat in mo status
- Hand-crafted mirror frames for better left-walking animation
- Fix extra blank lines bug (strings.Lines → strings.Split)
- Fix battery power overflow (ParseInt for negative values)
- Optimize README Tips section (8 → 5 items)
2026-01-08 11:27:47 +08:00
Tw93
0d15177735 refactor: remove trimName and renderGPUCard functions 2026-01-06 21:07:51 +08:00
Tw93
c2c589ac81 Merge pull request #264 from alexandear-org/refactor/do-not-use-deprecated-funcs
refactor: replace deprecated `Start` with `Run`
2026-01-06 21:05:10 +08:00
Tw93
f69f53a607 refactor: complete Go modernization with strings.Lines() 2026-01-06 21:03:46 +08:00
Oleksandr Redko
158af1e1ba refactor: modernize Go code 2026-01-06 12:04:27 +02:00
Oleksandr Redko
80757ec074 refactor: replace deprecated Start with Run 2026-01-06 11:46:59 +02:00
Tw93
8cb1bc6fbe Merge pull request #236 from jimmystridh/fix/preserve-sort-state-after-uninstall
fix(ui): preserve sort state after uninstall
2026-01-03 13:57:28 +08:00
Tw93
da7bb2cde2 feat: add screen refresh rate display in status view 2026-01-03 13:33:49 +08:00
Tw93
87963f9e68 chore: auto format code 2026-01-02 11:59:49 +00:00
Tw93
57024f6417 Merge branch 'main' of github.com:tw93/Mole 2026-01-02 19:59:13 +08:00
Tw93
cc0cbef8d9 feat: display macOS battery capacity and cached memory, and refine status view presentation 2026-01-02 19:59:07 +08:00
Tw93
ecbe43fa35 chore: auto format code 2026-01-02 11:27:06 +00:00
Tw93
6c8c87bef6 refactor: remove Christmas seasonal feature 2026-01-02 19:26:22 +08:00
Tw93
1e8ff30fa1 chore: auto format code 2025-12-31 08:24:02 +00:00
Tw93
9aa569cbb6 feat: Enhance clean, optimize, analyze, and status commands, and update security audit documentation. 2025-12-31 16:23:31 +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
44685d3999 feat: Improve CJK character width calculation, enhance SQLite vacuum test robustness, and update security audit documentation for core cleaning and optimization logic. 2025-12-28 21:29:10 +08:00
Hensell
23479c61bd feat: add .dart_tool to project purge targets and disk analyzer (#179) 2025-12-28 20:12:22 +08:00
Tw93
66ad3b34ee chore: auto format code 2025-12-28 11:39:34 +00:00
Tw93
e238c84917 Add comprehensive tests for analyze format utilities 2025-12-28 19:38:55 +08:00
Tw93
fe3f99e520 chore: auto format code 2025-12-22 11:31:14 +00:00
Tw93
f410f356df feat: Display system, adapter, and battery power metrics in status view 2025-12-22 19:30:35 +08:00
Tw93
bebb2706b0 Merge branch 'main' of github.com:tw93/Mole 2025-12-22 16:30:28 +08:00
Tw93
87fdd26272 feat: Add git hooks to enforce universal binary builds and improve CPU metric calculation. 2025-12-22 16:30:22 +08:00