feat(daily-prep): trigger planning from inside the prep-log window with an empty-state hint

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
mika kuns
2026-06-04 10:01:27 +02:00
parent 26758b6e8a
commit 7d743f17c6
9 changed files with 55 additions and 36 deletions

View File

@@ -346,6 +346,8 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
RecomputeCanMergeAll();
ReviewCombinedDiffCommand.NotifyCanExecuteChanged();
};
PrepLog.CollectionChanged += (_, _) => OnPropertyChanged(nameof(ShowPrepEmptyState));
}
private void OnTaskMessage(string taskId, string line)
@@ -381,6 +383,18 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
AppendClaudeText(formatted, target, buf);
}
[RelayCommand]
private async Task PlanDayAsync()
{
if (_worker is null) return;
try { await _worker.RunDailyPrepNowAsync(); }
catch { /* worker offline; PrepStarted/PrepLine will reconcile */ }
}
public bool ShowPrepEmptyState => !IsPrepRunning && PrepLog.Count == 0;
partial void OnIsPrepRunningChanged(bool value) => OnPropertyChanged(nameof(ShowPrepEmptyState));
private void OnPrepStarted()
{
PrepLog.Clear();