Description
User preferences (selected package manager, monitoring state) are currently stored only in memory and reset on application restart. This provides a poor user experience.
Current behavior:
- Package manager selection resets to default on app restart
- Monitoring state is not persisted
- Users need to reconfigure preferences every time
Code location:
// In command.rs - only in-memory storage
static PREFERRED_PM: Mutex<String> = Mutex::new(String::new());
static CLIPBOARD_MONITORING: Mutex<bool> = Mutex::new(false);
Proposed solution:
- Add persistent storage using Tauri's storage API or file-based config
- Save preferences automatically when changed
- Load preferences on startup to restore user settings
- Add preferences validation to handle corrupted config files
Implementation suggestions:
- Use
tauri-plugin-store for cross-platform storage
- Create a
UserPreferences struct with serialization
- Add migration logic for future config format changes
- Add default fallbacks for missing or invalid config
Benefits:
- Better user experience with persistent settings
- Reduced friction for daily usage
- Professional application behavior
- Foundation for additional user preferences in the future
Description
User preferences (selected package manager, monitoring state) are currently stored only in memory and reset on application restart. This provides a poor user experience.
Current behavior:
Code location:
Proposed solution:
Implementation suggestions:
tauri-plugin-storefor cross-platform storageUserPreferencesstruct with serializationBenefits: