File: packages/gui/src-tauri/src/lib.rs:184
Severity: Low
Description:
If cwd is deep in filesystem (e.g., /home/user/projects/a/b/c/d/e/f), traverses dozens of directories checking each for codepanion-rust/target/*/; slow startup on slow disks or network mounts.
Code:
let mut dir = env::current_dir().ok();
while let Some(current) = dir {
// check for daemon binary
dir = current.parent().map(Path::to_path_buf);
}
Failure Scenario:
- GUI launched from deeply nested project directory
- Searches parent → grandparent → ... → filesystem root
- On Windows with network drives or slow HDD: 5-10 second startup delay
- User experiences 'Starting CodePanion...' freeze
Suggested Fix:
Limit traversal to 10 levels or check for git root as boundary.
File: packages/gui/src-tauri/src/lib.rs:184
Severity: Low
Description:
If cwd is deep in filesystem (e.g., /home/user/projects/a/b/c/d/e/f), traverses dozens of directories checking each for codepanion-rust/target/*/; slow startup on slow disks or network mounts.
Code:
Failure Scenario:
Suggested Fix:
Limit traversal to 10 levels or check for git root as boundary.