feat(tui): show per-repository sync progress

- emit start and finish events from the concurrent sync worker pool
- show elapsed time, a progress bar, active repositories, result counts, and the latest result
- retain failures, skips, protected branches, and divergence warnings after the run
- focus the first failed repository and add f to cycle through repositories requiring attention
- add progress and summary tests, document the new controls, and set version 0.3.1
This commit is contained in:
2026-09-06 20:19:05 +01:00
parent bf67f1a005
commit 4f6e9c9991
6 changed files with 374 additions and 35 deletions
+7 -1
View File
@@ -123,10 +123,16 @@ func TestStrictSyncRechecksAndSkipsNewlyDirtyRepository(t *testing.T) {
t.Fatal(err)
}
results := syncAll(root, []repo{planned}, 1, time.Minute, io.Discard, true, true)
var progress []syncProgressEvent
results := syncSelectedWithProgress(root, []repo{planned}, []repo{planned}, 1, time.Minute, io.Discard, true, true, func(event syncProgressEvent) {
progress = append(progress, event)
})
if len(results) != 1 || !results[0].Skipped || results[0].Success {
t.Fatalf("syncAll() = %+v", results)
}
if len(progress) != 1 || progress[0].Started || !progress[0].Result.Skipped {
t.Fatalf("progress events = %+v, want one finished skip", progress)
}
}
func TestScanReportsDirtyEligibleRepository(t *testing.T) {