Conversation
- **Hardware**: Added `sys.refresh_disks()` in `HardwareInfo::detect` to ensure disk usage statistics are populated immediately.
- **Web UI**:
- Replaced `System::new_all()` with `System::new()` in `start_server` to reduce startup time.
- Initialized `last_system_refresh` to `UNIX_EPOCH` to trigger immediate data collection on the first dashboard request.
- Added `sys.refresh_disks_list()` to the dashboard refresh logic to detect new mounts.
- Refactored `add_user_handler` and `delete_user_handler` to use `tokio::task::spawn_blocking`, offloading heavy operations (password hashing, user creation) from the async runtime.
- **Documentation**: Updated `README.md` (English and French) with a new "Optimizations & Performance" section detailing the architectural improvements.
|
👋 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. |
Performed a comprehensive check, fix, and optimization pass on the
server_managercodebase.sys.refresh_all()call during server startup. The system stats are now lazily loaded upon the first request to the dashboard.add_user,delete_user) were refactored to usespawn_blocking. This prevents blocking the main Tokio executor threads with CPU-intensive (bcrypt) or blocking I/O (useradd/userdel) operations.sys.refresh_disks()to the hardware detection logic, ensuring that disk usage percentages are available immediately for profile evaluation. Also addedsys.refresh_disks_list()to the dashboard to support dynamic mounting.Verified with
cargo check,cargo clippy, andcargo test.PR created automatically by Jules for task 10559388972842302567 started by @Cylae