Conversation
- Introduce `server_manager/src/core/paths.rs` to centralize file path logic and prioritize `/opt/server_manager`. - Fix `HardwareInfo::detect` to correctly update disk usage statistics by calling `refresh_disks()`. - Refactor `web.rs`, `config.rs`, `users.rs`, and `secrets.rs` to use the new `paths` module. - Fix blocking I/O in `web.rs` handlers (`add_user`, `delete_user`) by using `tokio::fs::metadata`. - Optimize string allocations in `build_compose_structure` loop. - Bump version to 1.0.8 in `Cargo.toml` and `README.md`.
|
👋 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. |
This PR addresses the "Check. Fix. Optimize." request.
Key Changes:
server_manager/src/core/paths.rsto handle configuration, secrets, and user file paths consistently. It now prioritizes/opt/server_managerif it exists, falling back to the current working directory. This fixes potential inconsistencies during migration or mixed-environment usage.HardwareInfo::detectwhererefresh_disks()was missing, which is required bysysinfoto update disk usage stats (used/free space) in addition to the disk list.server_manager/src/interface/web.rs, replaced blockingstd::fs::metadatacalls withtokio::fs::metadatainside async handlers to prevent stalling the runtime.web.rsand consolidated path resolution across core modules (config,users,secrets).build_compose_structureloop inlib.rs.1.0.8inCargo.tomlandREADME.mdto reflect these improvements.Verification:
/opt, fallback to local).PR created automatically by Jules for task 11546044812435267089 started by @Cylae