feat: Add automatic recording cleanup feature#47
Open
bcharleson wants to merge 1 commit intoStarmel:masterfrom
Open
feat: Add automatic recording cleanup feature#47bcharleson wants to merge 1 commit intoStarmel:masterfrom
bcharleson wants to merge 1 commit intoStarmel:masterfrom
Conversation
✨ New Features: - Automatic cleanup based on configurable time periods (1 day to 6 months) - New Storage tab in Settings with usage display and cleanup controls - Manual 'Clean Now' button with confirmation dialogs - Real-time storage usage calculation and cleanup impact preview - Periodic cleanup scheduling (daily at 3 AM) - App lifecycle integration (cleanup on launch/termination) ��️ Safety Features: - Protection for recordings currently in use (playing/transcribing) - File lock detection to prevent deletion of files in use - Comprehensive error handling and user notifications - Confirmation dialogs for destructive operations - Defaults to 'Keep forever' for backward compatibility ⚡ Performance Optimizations: - Batch processing (50 recordings per batch) - Limited concurrent operations (max 5 simultaneous deletions) - Structured concurrency with TaskGroup and AsyncSemaphore - Progress indicators with real-time updates - Memory-efficient processing of large datasets 🧪 Testing: - Comprehensive unit tests for cleanup logic and time intervals - Integration tests for file system operations and app lifecycle - Performance tests for large datasets and concurrent operations - Mock classes for isolated testing 📚 Documentation: - Complete feature documentation with usage guidelines - Updated HOW_TO_RUN.md with launch methods - Troubleshooting guide and future enhancement suggestions Files Added: - OpenSuperWhisper/Services/RecordingCleanupService.swift - OpenSuperWhisper/Services/StorageUsageService.swift - OpenSuperWhisper/Utils/CleanupTimeInterval.swift - OpenSuperWhisperTests/RecordingCleanupServiceTests.swift - OpenSuperWhisperTests/CleanupIntegrationTests.swift - docs/automatic_cleanup_feature.md - HOW_TO_RUN.md Files Modified: - OpenSuperWhisper/Utils/AppPreferences.swift (added cleanup preferences) - OpenSuperWhisper/Settings.swift (added Storage tab with cleanup UI) - OpenSuperWhisper/Models/Recording.swift (added change notifications) - OpenSuperWhisper/OpenSuperWhisperApp.swift (added lifecycle cleanup triggers) This feature helps users manage storage space automatically while maintaining the app's focus on privacy and performance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✨ New Features:
��️ Safety Features:
⚡ Performance Optimizations:
🧪 Testing:
📚 Documentation:
Files Added:
Files Modified:
This feature helps users manage storage space automatically while maintaining the app's focus on privacy and performance.