Commit 247be7d
committed
feat: Add comprehensive TUI enhancements with status bar, scanning animation, and version display
Implement three major TUI improvements to enhance user experience:
1. **Unified Status Bar Across All States**
- Dynamic left/center/right layout with auto-width adjustment
- State-specific information display (scanning progress, selected items, time tracking)
- Real-time updates showing session duration and operation time
- Consistent styling with primary purple color scheme
2. **Animated Scanning Progress**
- StateScanning phase with package-manager-style loading animation
- Category-by-category scanning display (✓ Complete, ⠋ Scanning..., ○ Pending)
- 600ms interval progression through Xcode, Android, Node.js, Flutter
- Smooth transition to StateSelecting after completion
3. **Version Display in Title**
- Show application version in TUI title bar
- Format: "🧹 Mac Dev Cleaner v{version}"
- Pass version as parameter to avoid import cycles
- Maintain [DRY-RUN] indicator when applicable
**Technical Implementation:**
- Added Model fields: startTime, deleteStart, scanningCategories, scanComplete, currentScanning, version
- Created renderStatusBar() method handling 5 different states
- Implemented tickScanning() for timed scanning progression
- Fixed import cycle by passing version as parameter through tui.Run()
- Updated both scan.go and clean.go to pass Version parameter
**Status Bar Sections:**
- Left: State indicator (🔍 Scanning, 📋 Select items, 1 parent 9212e04 commit 247be7d
3 files changed
+319
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
0 commit comments