feat(ui): always-visible Steps section at top of DetailsIsland with add-step input
This commit is contained in:
@@ -110,6 +110,8 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
||||
public ObservableCollection<LogLineViewModel> Log { get; } = new();
|
||||
public ObservableCollection<SubtaskRowViewModel> Subtasks { get; } = new();
|
||||
|
||||
[ObservableProperty] private string _newSubtaskTitle = "";
|
||||
|
||||
// Claude CLI stream-json parser + buffer for partial text deltas
|
||||
private readonly StreamLineFormatter _formatter = new();
|
||||
private readonly StringBuilder _claudeBuf = new();
|
||||
@@ -487,6 +489,30 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
||||
CloseDetail?.Invoke();
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private async System.Threading.Tasks.Task AddSubtaskAsync()
|
||||
{
|
||||
if (Task is null) return;
|
||||
var title = NewSubtaskTitle?.Trim();
|
||||
if (string.IsNullOrEmpty(title)) return;
|
||||
|
||||
var entity = new ClaudeDo.Data.Models.SubtaskEntity
|
||||
{
|
||||
Id = Guid.NewGuid().ToString(),
|
||||
TaskId = Task.Id,
|
||||
Title = title,
|
||||
Completed = false,
|
||||
OrderNum = Subtasks.Count,
|
||||
CreatedAt = DateTime.UtcNow,
|
||||
};
|
||||
|
||||
await using var ctx = _dbFactory.CreateDbContext();
|
||||
await new SubtaskRepository(ctx).AddAsync(entity);
|
||||
|
||||
Subtasks.Add(new SubtaskRowViewModel { Id = entity.Id, Title = entity.Title, Done = entity.Completed });
|
||||
NewSubtaskTitle = "";
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private async System.Threading.Tasks.Task SaveNotesAsync()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user