Conversation
This commit includes several key improvements: 1. **Optimization**: Refactored `server_manager/src/core/config.rs` and `server_manager/src/core/users.rs` to use thread-safe static caching with a 500ms throttle for filesystem metadata checks. This reduces unnecessary I/O operations in high-traffic paths like the dashboard. 2. **Concurrency Fix**: Implemented atomic async modification methods (`enable_service_async`, `disable_service_async`, `add_user_async`, `delete_user_async`) that acquire write locks on the global cache, perform modifications, save to disk, and update the cache in-place. This prevents race conditions and stale data issues observed in the previous architecture. 3. **Refactor**: Simplified `server_manager/src/interface/web.rs` by removing redundant local caching logic and delegating state management to the optimized core modules. 4. **Bug Fix**: Enhanced `HardwareInfo::detect_user` in `server_manager/src/core/hardware.rs` to robustly detect the sudo user by falling back to `SUDO_UID` lookup if `SUDO_USER` is missing or invalid. 5. **Documentation**: Updated `README.md` and `Cargo.toml` to version 1.0.8, reflecting the latest changes. Verified with `cargo check` and `cargo test`.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Implemented optimizations for configuration and user loading using static caching with throttling. Fixed race conditions in user and service management by introducing atomic async modification methods. Improved hardware detection robustness. Updated documentation and bumped version to 1.0.8.
PR created automatically by Jules for task 18055563984735961684 started by @Cylae