chore(claude-do): [A3] Settings + Update-Check: OperationStatus für Skill-Inst

Vorgaben: `docs/superpowers/plans/2026-08-11-operation-feedback.md`, Gruppe A, Entwurf A3. P0-1 ist gemergt: `src/ClaudeDo.Ui/Services/OperationStatus.cs` + `src/ClaudeDo.Ui/Views/Controls/OperationIndicator.axaml`.

SCOPE-ÄNDERUNG (Nutzer, 2026-08-12): OnlineInbox Sign-In/Sign-Out ist AUS DEM SCOPE GENOMMEN — vorerst unwichtig. `ViewModels/Modals/Settings/OnlineInboxSettingsViewModel.cs` und die

ClaudeDo-Task: 2356806f-f16e-4652-b615-4562e95c3a65
This commit is contained in:
Mika Kuns
2026-08-12 09:55:04 +02:00
parent 5fca459579
commit ec4cbcbaf9
12 changed files with 201 additions and 54 deletions
@@ -25,18 +25,33 @@ public class SessionSkillsSettingsTabViewModelTests
public string? UpdatedSourceUrl;
public string? RemovedSourceUrl;
public Exception? InstallError;
public TaskCompletionSource<List<string>>? InstallGate;
public TaskCompletionSource? UpdateGate;
public override Task<List<SessionSkillDto>> GetSessionSkillsAsync() => Task.FromResult(Installed);
public override Task<List<string>> InstallSessionSkillAsync(string url)
{
if (InstallError is not null) throw InstallError;
if (InstallGate is not null) return AwaitInstallGateAsync(url);
InstallUrlReceived = url;
Installed = Installed.Append(new SessionSkillDto("new-skill", "desc", url, "abc123", DateTimeOffset.UtcNow)).ToList();
return Task.FromResult(new List<string> { "new-skill" });
}
public override Task UpdateSessionSkillAsync(string sourceUrl) { UpdatedSourceUrl = sourceUrl; return Task.CompletedTask; }
private async Task<List<string>> AwaitInstallGateAsync(string url)
{
var installed = await InstallGate!.Task;
InstallUrlReceived = url;
return installed;
}
public override async Task UpdateSessionSkillAsync(string sourceUrl)
{
if (UpdateGate is not null) await UpdateGate.Task;
UpdatedSourceUrl = sourceUrl;
}
public override Task RemoveSessionSkillAsync(string sourceUrl)
{
RemovedSourceUrl = sourceUrl;
@@ -84,6 +99,8 @@ public class SessionSkillsSettingsTabViewModelTests
Assert.Contains("already installed", vm.StatusMessage);
Assert.Empty(vm.Skills);
Assert.False(vm.InstallOp.IsRunning);
Assert.True(vm.InstallCommand.CanExecute(null));
}
[Fact]
@@ -97,6 +114,47 @@ public class SessionSkillsSettingsTabViewModelTests
Assert.Null(w.InstallUrlReceived);
}
[Fact]
public async Task InstallAsync_WhileRunning_IsRunningTrue_AndCommandLocked()
{
var w = new FakeWorker { InstallGate = new TaskCompletionSource<List<string>>() };
var vm = new SessionSkillsSettingsTabViewModel(w) { InstallUrl = "https://example.com/repo.git" };
var execution = vm.InstallCommand.ExecuteAsync(null);
Assert.True(vm.InstallOp.IsRunning);
Assert.False(vm.InstallCommand.CanExecute(null));
w.InstallGate.SetResult(new List<string> { "new-skill" });
await execution;
Assert.False(vm.InstallOp.IsRunning);
Assert.True(vm.InstallCommand.CanExecute(null));
}
[Fact]
public async Task UpdateAsync_WhileRunning_IsRunningTrue_AndCommandLocked()
{
var w = new FakeWorker
{
Installed = new() { new SessionSkillDto("a", "", "url-a", "ref-a", DateTimeOffset.UtcNow) },
UpdateGate = new TaskCompletionSource(),
};
var vm = new SessionSkillsSettingsTabViewModel(w);
await vm.LoadAsync();
var execution = vm.UpdateCommand.ExecuteAsync("url-a");
Assert.True(vm.UpdateOp.IsRunning);
Assert.False(vm.UpdateCommand.CanExecute("url-a"));
w.UpdateGate.SetResult();
await execution;
Assert.False(vm.UpdateOp.IsRunning);
Assert.True(vm.UpdateCommand.CanExecute("url-a"));
}
[Fact]
public async Task RemoveAsync_removes_then_refreshes()
{