mirror of
https://github.com/Dasemu/Grove.git
synced 2026-11-26 15:26:09 +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
@@ -86,6 +86,8 @@ pub struct Shared {
|
||||
pub repos: BTreeMap<PathBuf, RepoStatus>,
|
||||
/// Plain clones in configured groups: ignored until migrated with `grove add`.
|
||||
pub not_migrated: Vec<PathBuf>,
|
||||
/// Repos left alone because an interrupted `grove add`/clone left a marker behind.
|
||||
pub stalled: Vec<PathBuf>,
|
||||
}
|
||||
|
||||
pub enum Msg {
|
||||
@@ -365,6 +367,7 @@ fn rescan(
|
||||
{
|
||||
let mut shared = ctx.shared.lock().unwrap();
|
||||
shared.not_migrated = d.not_migrated;
|
||||
shared.stalled = d.stalled.clone();
|
||||
shared.repos.retain(|p, _| {
|
||||
let keep = found.contains(p);
|
||||
if !keep {
|
||||
|
||||
@@ -169,7 +169,8 @@ fn handle(req: &Request, ctx: &Ctx) -> Value {
|
||||
.collect();
|
||||
ok(
|
||||
json!({"machine": ctx.machine, "paused": s.paused, "now": now_secs(), "repos": repos,
|
||||
"not_migrated": s.not_migrated.iter().map(|p| p.display().to_string()).collect::<Vec<_>>()}),
|
||||
"not_migrated": s.not_migrated.iter().map(|p| p.display().to_string()).collect::<Vec<_>>(),
|
||||
"stalled": s.stalled.iter().map(|p| p.display().to_string()).collect::<Vec<_>>()}),
|
||||
)
|
||||
}
|
||||
"pause" | "resume" => {
|
||||
|
||||
Reference in new issue
Block a user