feat(gui): stalled repos, runtime not-migrated rows, safer import cleanup

- daemon status reports stalled repos; GUI shows them with the backup hint
- activity: repo_stalled is a warning; repo_added/removed shown
- migrate rows keep their result only until the next status refresh
- import removes a failed clone's directory only if it created it

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
dasemuandClaude Sonnet 5.5 committed 2026-11-16 18:47:38 +01:00
1 parent 01c4974c07
commit b875a41b4d
8 files changed
+63 -6

No files matched your search

+6 -2
View File
@@ -412,9 +412,13 @@ pub fn import(cfg: &Config, group_name: &str, wanted: &[String]) -> Result<()> {
let res = (|| -> Result<()> {
let url = r.git_url(forge.protocol)?.to_string();
let dir = gdir.join(&r.name);
let existed = dir.exists();
if let Err(e) = clone_bare_layout(&url, &dir, &forge.git_env) {
// Leave no empty directory behind (it only goes away when nothing was cloned).
let _ = fs::remove_dir(&dir);
// The busy marker is released by now. Remove only a directory this import
// created, and only while it is empty (`remove_dir` refuses anything else).
if !existed {
let _ = fs::remove_dir(&dir);
}
return Err(e.into());
}
println!("imported {} -> {}", r.name, dir.display());