refactor(ui): test planning detail pane via real ViewModel and restore merge-all IsEnabled binding

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
mika kuns
2026-04-24 16:31:54 +02:00
parent 9d04d1d9f6
commit 1aead9dad0
5 changed files with 162 additions and 65 deletions

View File

@@ -16,7 +16,7 @@ namespace ClaudeDo.Ui.ViewModels.Islands;
public sealed partial class DetailsIslandViewModel : ViewModelBase
{
private readonly IDbContextFactory<ClaudeDoDbContext> _dbFactory;
private readonly WorkerClient _worker;
private readonly IWorkerClient _worker;
private readonly IServiceProvider _services;
// Current task row (set by IslandsShellViewModel via Bind)
@@ -151,7 +151,7 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
// Set by the view so DeleteTaskCommand can show an error message
public Func<string, System.Threading.Tasks.Task>? ShowErrorAsync { get; set; }
public DetailsIslandViewModel(IDbContextFactory<ClaudeDoDbContext> dbFactory, WorkerClient worker, IServiceProvider services)
public DetailsIslandViewModel(IDbContextFactory<ClaudeDoDbContext> dbFactory, IWorkerClient worker, IServiceProvider services)
{
_dbFactory = dbFactory;
_worker = worker;
@@ -545,7 +545,7 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
catch { /* best-effort */ }
}
private void RecomputeCanMergeAll()
internal void RecomputeCanMergeAll()
{
var notDone = Subtasks.Count(c => c.Status != ClaudeDo.Data.Models.TaskStatus.Done);
if (notDone > 0)