mirror of
https://github.com/Dasemu/Grove.git
synced 2026-11-26 23:36:11 +00:00
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:
1 parent
01c4974c07
commit
b875a41b4d
8 files changed
+63
-6
No files matched your search
@@ -250,6 +250,27 @@ fn render(ui: &MainWindow) {
|
||||
.collect()
|
||||
})
|
||||
.unwrap_or_default();
|
||||
// A result is shown until the daemon's list moves on, then it goes.
|
||||
let listed: HashSet<&str> = snap
|
||||
.status
|
||||
.as_ref()
|
||||
.and_then(|s| s["not_migrated"].as_array())
|
||||
.map(|a| a.iter().filter_map(Value::as_str).collect())
|
||||
.unwrap_or_default();
|
||||
if !st.migrating {
|
||||
st.mig.retain(|p, _| listed.contains(p.as_str()));
|
||||
}
|
||||
let stalled: Vec<SharedString> = snap
|
||||
.status
|
||||
.as_ref()
|
||||
.and_then(|s| s["stalled"].as_array())
|
||||
.map(|a| {
|
||||
a.iter()
|
||||
.filter_map(|p| p.as_str().map(SharedString::from))
|
||||
.collect()
|
||||
})
|
||||
.unwrap_or_default();
|
||||
ui.set_stalled(ModelRc::from(Rc::new(VecModel::from(stalled))));
|
||||
ui.set_migrating(st.migrating);
|
||||
ui.set_not_migrated(ModelRc::from(Rc::new(VecModel::from(nm))));
|
||||
|
||||
|
||||
Reference in new issue
Block a user