feat(ui): wire redesigned detail island (header + description/steps card + work console)
Replace the long scrolling DetailsIslandView with the new pinned layout: a separated TaskHeaderBar (trash↔skull, gear), a DescriptionStepsCard (text⇄steps toggle, Preview = composed prompt), and a pinned WorkConsole (Output/Actions/ Session tabs). The three components now bind to DetailsIslandViewModel; their scaffolding sample VMs are removed. Drops the old inline sections + AgentStripView. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,133 +0,0 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Collections.Specialized;
|
||||
using System.ComponentModel;
|
||||
using System.Text;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
|
||||
namespace ClaudeDo.Ui.ViewModels.Islands.Detail;
|
||||
|
||||
public partial class SubtaskRowSampleViewModel : ObservableObject
|
||||
{
|
||||
[ObservableProperty] string _title = "";
|
||||
[ObservableProperty] bool _done;
|
||||
[ObservableProperty] bool _isEditing;
|
||||
|
||||
[RelayCommand] void ToggleDone() => Done = !Done;
|
||||
[RelayCommand] void BeginEdit() => IsEditing = true;
|
||||
[RelayCommand] void CommitEdit() => IsEditing = false;
|
||||
}
|
||||
|
||||
public partial class DescriptionStepsCardViewModel : ClaudeDo.Ui.ViewModels.ViewModelBase
|
||||
{
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(IsDescriptionView))]
|
||||
bool _isStepsView;
|
||||
|
||||
public bool IsDescriptionView => !IsStepsView;
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(ComposedPreview))]
|
||||
string _title = "";
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(ComposedPreview))]
|
||||
string _editableDescription = "";
|
||||
|
||||
[ObservableProperty] bool _isEditingDescription;
|
||||
[ObservableProperty] string _newSubtaskTitle = "";
|
||||
|
||||
public ObservableCollection<SubtaskRowSampleViewModel> Subtasks { get; } = new();
|
||||
|
||||
public string ComposedPreview => BuildComposedPreview();
|
||||
|
||||
[RelayCommand] void ToggleCardView() => IsStepsView = !IsStepsView;
|
||||
[RelayCommand] void ToggleEditDescription() => IsEditingDescription = !IsEditingDescription;
|
||||
|
||||
[RelayCommand]
|
||||
void AddSubtask()
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(NewSubtaskTitle)) return;
|
||||
var row = new SubtaskRowSampleViewModel { Title = NewSubtaskTitle.Trim() };
|
||||
row.PropertyChanged += OnRowPropertyChanged;
|
||||
Subtasks.Add(row);
|
||||
NewSubtaskTitle = "";
|
||||
OnPropertyChanged(nameof(ComposedPreview));
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
void ToggleSubtaskDone(SubtaskRowSampleViewModel row)
|
||||
{
|
||||
row.Done = !row.Done;
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
void CommitSubtaskEdit(SubtaskRowSampleViewModel row)
|
||||
{
|
||||
row.IsEditing = false;
|
||||
}
|
||||
|
||||
private void OnRowPropertyChanged(object? sender, PropertyChangedEventArgs e)
|
||||
{
|
||||
if (e.PropertyName is nameof(SubtaskRowSampleViewModel.Done)
|
||||
or nameof(SubtaskRowSampleViewModel.Title))
|
||||
OnPropertyChanged(nameof(ComposedPreview));
|
||||
}
|
||||
|
||||
private void OnSubtasksChanged(object? sender, NotifyCollectionChangedEventArgs e)
|
||||
{
|
||||
if (e.NewItems is not null)
|
||||
foreach (SubtaskRowSampleViewModel row in e.NewItems)
|
||||
row.PropertyChanged += OnRowPropertyChanged;
|
||||
if (e.OldItems is not null)
|
||||
foreach (SubtaskRowSampleViewModel row in e.OldItems)
|
||||
row.PropertyChanged -= OnRowPropertyChanged;
|
||||
OnPropertyChanged(nameof(ComposedPreview));
|
||||
}
|
||||
|
||||
private string BuildComposedPreview()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.AppendLine(Title);
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(EditableDescription))
|
||||
{
|
||||
sb.AppendLine();
|
||||
sb.AppendLine(EditableDescription.TrimEnd());
|
||||
}
|
||||
|
||||
var openSteps = Subtasks.Where(s => !s.Done).ToList();
|
||||
if (openSteps.Count > 0)
|
||||
{
|
||||
sb.AppendLine();
|
||||
sb.AppendLine("## Sub-Tasks");
|
||||
foreach (var step in openSteps)
|
||||
sb.AppendLine($"- [ ] {step.Title}");
|
||||
}
|
||||
|
||||
return sb.ToString().TrimEnd();
|
||||
}
|
||||
|
||||
public DescriptionStepsCardViewModel()
|
||||
{
|
||||
Subtasks.CollectionChanged += OnSubtasksChanged;
|
||||
|
||||
_title = "Refactor diff viewer";
|
||||
_editableDescription =
|
||||
"Split the current monolithic diff renderer into smaller, testable components.\n\n" +
|
||||
"The goal is to improve readability and allow unit testing of each parsing stage independently.";
|
||||
|
||||
var samples = new[]
|
||||
{
|
||||
new SubtaskRowSampleViewModel { Title = "Extract DiffParser into its own class", Done = true },
|
||||
new SubtaskRowSampleViewModel { Title = "Add unit tests for DiffParser", Done = true },
|
||||
new SubtaskRowSampleViewModel { Title = "Wire new parser into DiffViewerViewModel" },
|
||||
new SubtaskRowSampleViewModel { Title = "Update snapshot tests" },
|
||||
};
|
||||
foreach (var row in samples)
|
||||
{
|
||||
row.PropertyChanged += OnRowPropertyChanged;
|
||||
Subtasks.Add(row);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
|
||||
namespace ClaudeDo.Ui.ViewModels.Islands.Detail;
|
||||
|
||||
public record AgentOption(string Name);
|
||||
|
||||
public partial class TaskHeaderBarViewModel : ViewModelBase
|
||||
{
|
||||
[ObservableProperty] private string _taskIdBadge = "#T42";
|
||||
[ObservableProperty] private string _editableTitle = "Refactor diff viewer";
|
||||
|
||||
// Change to true to preview skull icon
|
||||
[ObservableProperty] private bool _isRunning = false;
|
||||
[ObservableProperty] private bool _isAgentSectionEnabled = true;
|
||||
|
||||
[ObservableProperty] private ObservableCollection<string> _taskModelOptions =
|
||||
new() { "claude-opus-4-5", "claude-sonnet-4-5", "claude-haiku-4-5" };
|
||||
[ObservableProperty] private string? _taskModelSelection;
|
||||
[ObservableProperty] private string? _modelBadge = "inherited · Global";
|
||||
[ObservableProperty] private string? _modelInheritedHint = "claude-opus-4-5";
|
||||
|
||||
[ObservableProperty] private decimal? _taskMaxTurns;
|
||||
[ObservableProperty] private string? _turnsBadge = "inherited · List";
|
||||
[ObservableProperty] private string? _turnsInheritedHint = "40";
|
||||
|
||||
[ObservableProperty] private string? _taskSystemPrompt;
|
||||
[ObservableProperty] private string? _effectiveSystemPromptHint = "You are a senior .NET developer…";
|
||||
|
||||
[ObservableProperty] private ObservableCollection<AgentOption> _taskAgentOptions =
|
||||
new() { new("default"), new("code-reviewer"), new("test-writer") };
|
||||
[ObservableProperty] private AgentOption? _taskSelectedAgent;
|
||||
[ObservableProperty] private string? _agentBadge;
|
||||
|
||||
[RelayCommand] private void DeleteTask() { }
|
||||
[RelayCommand] private void KillSession() { }
|
||||
[RelayCommand] private void ResetTaskModel() { }
|
||||
[RelayCommand] private void ResetTaskTurns() { }
|
||||
[RelayCommand] private void ResetTaskAgent() { }
|
||||
}
|
||||
@@ -1,145 +0,0 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using ClaudeDo.Ui.ViewModels.Islands;
|
||||
|
||||
namespace ClaudeDo.Ui.ViewModels.Islands.Detail;
|
||||
|
||||
public sealed class WorkConsoleChildOutcomeRowViewModel
|
||||
{
|
||||
public required string Title { get; init; }
|
||||
public bool HasRoadblock { get; init; }
|
||||
public string RoadblockText { get; init; } = "";
|
||||
public required string StatusLabel { get; init; }
|
||||
}
|
||||
|
||||
public sealed partial class WorkConsoleViewModel : ViewModelBase
|
||||
{
|
||||
// ── Tab selection ──────────────────────────────────────────────
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(IsOutputTab))]
|
||||
[NotifyPropertyChangedFor(nameof(IsActionsTab))]
|
||||
[NotifyPropertyChangedFor(nameof(IsSessionTab))]
|
||||
private string _selectedTab = "output";
|
||||
|
||||
public bool IsOutputTab => SelectedTab == "output";
|
||||
public bool IsActionsTab => SelectedTab == "actions";
|
||||
public bool IsSessionTab => SelectedTab == "session";
|
||||
|
||||
[RelayCommand]
|
||||
private void SelectTab(string tab) => SelectedTab = tab;
|
||||
|
||||
// ── Info header ────────────────────────────────────────────────
|
||||
[ObservableProperty] private string _model = "";
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(TurnsText))]
|
||||
private int _turns;
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(DiffAddText))]
|
||||
private int _diffAdditions;
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(DiffDelText))]
|
||||
private int _diffDeletions;
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(ShowRoadblock))]
|
||||
private bool _isRunning;
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(ShowRoadblock))]
|
||||
private bool _isDone;
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(ShowRoadblock))]
|
||||
private bool _isFailed;
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(ShowRoadblock))]
|
||||
private bool _isCancelled;
|
||||
|
||||
[ObservableProperty] private string _sessionLabel = "";
|
||||
|
||||
public string TurnsText => $"{Turns} turns";
|
||||
public string DiffAddText => $"+{DiffAdditions}";
|
||||
public string DiffDelText => $"-{DiffDeletions}";
|
||||
|
||||
// ── Roadblock ──────────────────────────────────────────────────
|
||||
public bool ShowRoadblock => IsFailed || IsCancelled;
|
||||
|
||||
[ObservableProperty] private string _roadblockMessage = "";
|
||||
[ObservableProperty] private bool _showContinue;
|
||||
[ObservableProperty] private bool _showResetAndRetry;
|
||||
|
||||
[RelayCommand] private void Continue() { }
|
||||
[RelayCommand] private void ResetAndRetry() { }
|
||||
|
||||
// ── Actions tab ────────────────────────────────────────────────
|
||||
public ObservableCollection<string> MergeTargetBranches { get; } = new();
|
||||
|
||||
[ObservableProperty] private string? _selectedMergeTarget;
|
||||
[ObservableProperty] private bool _canMergeAll;
|
||||
[ObservableProperty] private string _mergeAllDisabledReason = "";
|
||||
[ObservableProperty] private string? _mergeAllError;
|
||||
|
||||
[RelayCommand] private void OpenDiff() { }
|
||||
[RelayCommand] private void OpenWorktree() { }
|
||||
[RelayCommand] private void ReviewCombinedDiff() { }
|
||||
[RelayCommand] private void MergeAll() { }
|
||||
|
||||
// ── Session tab ────────────────────────────────────────────────
|
||||
[ObservableProperty] private bool _isWaitingForReview;
|
||||
[ObservableProperty] private string _reviewFeedback = "";
|
||||
|
||||
public ObservableCollection<WorkConsoleChildOutcomeRowViewModel> ChildOutcomes { get; } = new();
|
||||
public bool HasChildOutcomes => ChildOutcomes.Count > 0;
|
||||
|
||||
[RelayCommand] private void ApproveReview() { }
|
||||
[RelayCommand] private void RejectReview() { }
|
||||
[RelayCommand] private void ParkReview() { }
|
||||
[RelayCommand] private void CancelReview() { }
|
||||
|
||||
public ObservableCollection<LogLineViewModel> Log { get; } = new();
|
||||
|
||||
public WorkConsoleViewModel()
|
||||
{
|
||||
ChildOutcomes.CollectionChanged += (_, _) => OnPropertyChanged(nameof(HasChildOutcomes));
|
||||
|
||||
// ── Design-time sample data ────────────────────────────────
|
||||
_model = "sonnet";
|
||||
_turns = 40;
|
||||
_diffAdditions = 84;
|
||||
_diffDeletions = 31;
|
||||
_isRunning = true;
|
||||
_sessionLabel = "feat/work-console";
|
||||
|
||||
MergeTargetBranches.Add("main");
|
||||
MergeTargetBranches.Add("develop");
|
||||
_selectedMergeTarget = "main";
|
||||
_canMergeAll = true;
|
||||
|
||||
Log.Add(new LogLineViewModel { Kind = LogKind.Sys, Text = "Starting claude session…" });
|
||||
Log.Add(new LogLineViewModel { Kind = LogKind.Claude, Text = "Reading DetailsIslandView.axaml to understand existing layout." });
|
||||
Log.Add(new LogLineViewModel { Kind = LogKind.Tool, Text = "Read(src/ClaudeDo.Ui/Views/Islands/DetailsIslandView.axaml)" });
|
||||
Log.Add(new LogLineViewModel { Kind = LogKind.Claude, Text = "Building WorkConsole component with three tabs." });
|
||||
Log.Add(new LogLineViewModel { Kind = LogKind.Stdout, Text = "dotnet build succeeded — 0 error(s)" });
|
||||
|
||||
ChildOutcomes.Add(new WorkConsoleChildOutcomeRowViewModel
|
||||
{
|
||||
Title = "Add WorkConsole XAML",
|
||||
StatusLabel = "Done"
|
||||
});
|
||||
ChildOutcomes.Add(new WorkConsoleChildOutcomeRowViewModel
|
||||
{
|
||||
Title = "Wire ViewModel bindings",
|
||||
HasRoadblock = true,
|
||||
RoadblockText = "Missing token",
|
||||
StatusLabel = "Failed"
|
||||
});
|
||||
|
||||
// To preview roadblock state: _isFailed = true; _roadblockMessage = "Session ended unexpectedly"; _showResetAndRetry = true; _isRunning = false;
|
||||
// To preview review state: _isWaitingForReview = true; _isDone = false; _isRunning = false;
|
||||
}
|
||||
}
|
||||
@@ -74,8 +74,12 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
||||
private TaskRowViewModel? _task;
|
||||
|
||||
// Editable fields
|
||||
[ObservableProperty] private string _editableTitle = "";
|
||||
[ObservableProperty] private string _editableDescription = "";
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(ComposedPreview))]
|
||||
private string _editableTitle = "";
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(ComposedPreview))]
|
||||
private string _editableDescription = "";
|
||||
[ObservableProperty] private bool _isEditingDescription;
|
||||
[ObservableProperty] private bool _isDescriptionExpanded = true;
|
||||
|
||||
@@ -100,6 +104,46 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
||||
[RelayCommand]
|
||||
private void ToggleDescriptionExpanded() => IsDescriptionExpanded = !IsDescriptionExpanded;
|
||||
|
||||
// ── Description/Steps card (redesign) ──────────────────────────────
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(IsDescriptionView))]
|
||||
private bool _isStepsView;
|
||||
|
||||
public bool IsDescriptionView => !IsStepsView;
|
||||
|
||||
[RelayCommand]
|
||||
private void ToggleCardView() => IsStepsView = !IsStepsView;
|
||||
|
||||
// The exact text handed to Claude: title + description + open steps only.
|
||||
public string ComposedPreview =>
|
||||
ClaudeDo.Data.TaskPromptComposer.Compose(
|
||||
EditableTitle, EditableDescription, Subtasks.Select(s => (s.Title, s.Done)));
|
||||
|
||||
// ── Work console (redesign) ────────────────────────────────────────
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(IsOutputTab))]
|
||||
[NotifyPropertyChangedFor(nameof(IsActionsTab))]
|
||||
[NotifyPropertyChangedFor(nameof(IsSessionTab))]
|
||||
private string _selectedTab = "output";
|
||||
|
||||
public bool IsOutputTab => SelectedTab == "output";
|
||||
public bool IsActionsTab => SelectedTab == "actions";
|
||||
public bool IsSessionTab => SelectedTab == "session";
|
||||
|
||||
[RelayCommand]
|
||||
private void SelectTab(string? tab) => SelectedTab = tab ?? "output";
|
||||
|
||||
public string TurnsText => $"{Turns} turns";
|
||||
public string DiffAddText => $"+{DiffAdditions}";
|
||||
public string DiffDelText => $"-{DiffDeletions}";
|
||||
|
||||
public bool ShowRoadblock => IsFailed || IsCancelled;
|
||||
public string RoadblockMessage =>
|
||||
IsFailed ? "The session ended with an error." :
|
||||
IsCancelled ? "The session was cancelled." : "";
|
||||
|
||||
public string SessionLabel => "claude-session";
|
||||
|
||||
// Short task-id badge, e.g. "#T1A"
|
||||
public string TaskIdBadge => Task != null ? $"#T{Task.Id[..Math.Min(3, Task.Id.Length)].ToUpperInvariant()}" : "";
|
||||
|
||||
@@ -142,6 +186,8 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
||||
OnPropertyChanged(nameof(ShowContinue));
|
||||
OnPropertyChanged(nameof(ShowResetAndRetry));
|
||||
OnPropertyChanged(nameof(IsAgentSectionEnabled));
|
||||
OnPropertyChanged(nameof(ShowRoadblock));
|
||||
OnPropertyChanged(nameof(RoadblockMessage));
|
||||
}
|
||||
[ObservableProperty] private string? _model;
|
||||
|
||||
@@ -221,8 +267,9 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
||||
public string ElapsedFormatted => ""; // placeholder — no start-time stored yet
|
||||
|
||||
partial void OnTokensChanged(int value) => OnPropertyChanged(nameof(TokensFormatted));
|
||||
partial void OnDiffAdditionsChanged(int value) => OnPropertyChanged(nameof(DiffMeterRatio));
|
||||
partial void OnDiffDeletionsChanged(int value) => OnPropertyChanged(nameof(DiffMeterRatio));
|
||||
partial void OnTurnsChanged(int value) => OnPropertyChanged(nameof(TurnsText));
|
||||
partial void OnDiffAdditionsChanged(int value) { OnPropertyChanged(nameof(DiffMeterRatio)); OnPropertyChanged(nameof(DiffAddText)); }
|
||||
partial void OnDiffDeletionsChanged(int value) { OnPropertyChanged(nameof(DiffMeterRatio)); OnPropertyChanged(nameof(DiffDelText)); }
|
||||
|
||||
// 0.0–1.0 additions share for the diff meter
|
||||
public double DiffMeterRatio
|
||||
@@ -328,6 +375,7 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
||||
_services = services;
|
||||
_notesApi = notesApi;
|
||||
Notes = new NotesEditorViewModel(_notesApi);
|
||||
Subtasks.CollectionChanged += (_, _) => OnPropertyChanged(nameof(ComposedPreview));
|
||||
Loc.LanguageChanged += (_, _) =>
|
||||
{
|
||||
OnPropertyChanged(nameof(AgentStatusLabel));
|
||||
@@ -1092,6 +1140,7 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
||||
{
|
||||
if (row is null) return;
|
||||
row.Done = !row.Done;
|
||||
OnPropertyChanged(nameof(ComposedPreview));
|
||||
await using var ctx = _dbFactory.CreateDbContext();
|
||||
var repo = new SubtaskRepository(ctx);
|
||||
var subs = await repo.GetByTaskIdAsync(Task?.Id ?? "");
|
||||
@@ -1157,6 +1206,7 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
||||
await repo.UpdateAsync(entity);
|
||||
}
|
||||
row.Title = title;
|
||||
OnPropertyChanged(nameof(ComposedPreview));
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="using:ClaudeDo.Ui.ViewModels.Islands.Detail"
|
||||
xmlns:vm="using:ClaudeDo.Ui.ViewModels.Islands"
|
||||
xmlns:ctl="using:ClaudeDo.Ui.Views.Controls"
|
||||
x:Class="ClaudeDo.Ui.Views.Islands.Detail.DescriptionStepsCard"
|
||||
x:DataType="vm:DescriptionStepsCardViewModel">
|
||||
|
||||
<Design.DataContext>
|
||||
<vm:DescriptionStepsCardViewModel/>
|
||||
</Design.DataContext>
|
||||
x:DataType="vm:DetailsIslandViewModel">
|
||||
|
||||
<Border Classes="island">
|
||||
<DockPanel>
|
||||
@@ -109,7 +105,7 @@
|
||||
<!-- Subtask rows -->
|
||||
<ItemsControl ItemsSource="{Binding Subtasks}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="vm:SubtaskRowSampleViewModel">
|
||||
<DataTemplate DataType="vm:SubtaskRowViewModel">
|
||||
<Border Classes="subtask-row" Classes.done="{Binding Done}">
|
||||
<Grid ColumnDefinitions="Auto,*">
|
||||
|
||||
@@ -119,7 +115,7 @@
|
||||
Padding="0"
|
||||
Margin="0,0,8,0"
|
||||
VerticalAlignment="Center"
|
||||
Command="{Binding $parent[ItemsControl].((vm:DescriptionStepsCardViewModel)DataContext).ToggleSubtaskDoneCommand}"
|
||||
Command="{Binding $parent[ItemsControl].((vm:DetailsIslandViewModel)DataContext).ToggleSubtaskDoneCommand}"
|
||||
CommandParameter="{Binding}">
|
||||
<Ellipse Classes="task-check"
|
||||
Classes.done="{Binding Done}"
|
||||
@@ -147,7 +143,7 @@
|
||||
LostFocus="OnSubtaskEditLostFocus">
|
||||
<TextBox.KeyBindings>
|
||||
<KeyBinding Gesture="Enter"
|
||||
Command="{Binding $parent[ItemsControl].((vm:DescriptionStepsCardViewModel)DataContext).CommitSubtaskEditCommand}"
|
||||
Command="{Binding $parent[ItemsControl].((vm:DetailsIslandViewModel)DataContext).CommitSubtaskEditCommand}"
|
||||
CommandParameter="{Binding}"/>
|
||||
</TextBox.KeyBindings>
|
||||
</TextBox>
|
||||
|
||||
@@ -2,7 +2,7 @@ using Avalonia.Controls;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Input.Platform;
|
||||
using Avalonia.Interactivity;
|
||||
using ClaudeDo.Ui.ViewModels.Islands.Detail;
|
||||
using ClaudeDo.Ui.ViewModels.Islands;
|
||||
|
||||
namespace ClaudeDo.Ui.Views.Islands.Detail;
|
||||
|
||||
@@ -15,7 +15,7 @@ public partial class DescriptionStepsCard : UserControl
|
||||
|
||||
private async void OnCopyClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
if (DataContext is not DescriptionStepsCardViewModel vm) return;
|
||||
if (DataContext is not DetailsIslandViewModel vm) return;
|
||||
var clipboard = TopLevel.GetTopLevel(this)?.Clipboard;
|
||||
if (clipboard is null) return;
|
||||
await clipboard.SetTextAsync(vm.ComposedPreview);
|
||||
@@ -23,13 +23,13 @@ public partial class DescriptionStepsCard : UserControl
|
||||
|
||||
private void OnSubtaskTitleTapped(object? sender, TappedEventArgs e)
|
||||
{
|
||||
if (sender is TextBlock { DataContext: SubtaskRowSampleViewModel row })
|
||||
if (sender is TextBlock { DataContext: SubtaskRowViewModel row })
|
||||
row.IsEditing = true;
|
||||
}
|
||||
|
||||
private void OnSubtaskEditLostFocus(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is TextBox { DataContext: SubtaskRowSampleViewModel row })
|
||||
if (sender is TextBox { DataContext: SubtaskRowViewModel row })
|
||||
row.IsEditing = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="using:ClaudeDo.Ui.ViewModels.Islands.Detail"
|
||||
xmlns:vm="using:ClaudeDo.Ui.ViewModels.Islands"
|
||||
xmlns:ctl="using:ClaudeDo.Ui.Views.Controls"
|
||||
xmlns:loc="using:ClaudeDo.Ui.Localization"
|
||||
x:Class="ClaudeDo.Ui.Views.Islands.Detail.TaskHeaderBar"
|
||||
x:DataType="vm:TaskHeaderBarViewModel">
|
||||
|
||||
<Design.DataContext>
|
||||
<vm:TaskHeaderBarViewModel/>
|
||||
</Design.DataContext>
|
||||
x:DataType="vm:DetailsIslandViewModel">
|
||||
|
||||
<Grid ColumnDefinitions="*,Auto,Auto">
|
||||
|
||||
@@ -17,7 +13,9 @@
|
||||
<TextBlock Classes="meta"
|
||||
Text="{Binding TaskIdBadge}"
|
||||
Margin="0,0,0,4"
|
||||
Cursor="Hand"/>
|
||||
Cursor="Hand"
|
||||
ToolTip.Tip="{loc:Tr details.copyTaskIdTip}"
|
||||
Tapped="OnTaskIdTapped"/>
|
||||
<TextBox Text="{Binding EditableTitle, Mode=TwoWay}"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
@@ -42,7 +40,7 @@
|
||||
|
||||
<!-- Column 1: skull button (running) -->
|
||||
<Button Grid.Column="1" Classes="icon-btn"
|
||||
Command="{Binding KillSessionCommand}"
|
||||
Command="{Binding StopCommand}"
|
||||
ToolTip.Tip="Kill session"
|
||||
IsVisible="{Binding IsRunning}"
|
||||
VerticalAlignment="Top"
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Input.Platform;
|
||||
using ClaudeDo.Ui.ViewModels.Islands;
|
||||
|
||||
namespace ClaudeDo.Ui.Views.Islands.Detail;
|
||||
|
||||
@@ -8,4 +11,12 @@ public partial class TaskHeaderBar : UserControl
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private async void OnTaskIdTapped(object? sender, TappedEventArgs e)
|
||||
{
|
||||
if (DataContext is not DetailsIslandViewModel vm || vm.Task is null) return;
|
||||
var clipboard = TopLevel.GetTopLevel(this)?.Clipboard;
|
||||
if (clipboard is null) return;
|
||||
await clipboard.SetTextAsync(vm.Task.Id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="using:ClaudeDo.Ui.ViewModels.Islands.Detail"
|
||||
xmlns:vm="using:ClaudeDo.Ui.ViewModels.Islands"
|
||||
xmlns:islands="using:ClaudeDo.Ui.Views.Islands"
|
||||
xmlns:loc="using:ClaudeDo.Ui.Localization"
|
||||
x:DataType="vm:WorkConsoleViewModel"
|
||||
x:DataType="vm:DetailsIslandViewModel"
|
||||
x:Class="ClaudeDo.Ui.Views.Islands.Detail.WorkConsole">
|
||||
|
||||
<Design.DataContext>
|
||||
<vm:WorkConsoleViewModel />
|
||||
</Design.DataContext>
|
||||
|
||||
<UserControl.Styles>
|
||||
<Style Selector="Button.tab-btn">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
@@ -223,7 +219,7 @@
|
||||
<TextBlock Classes="section-label" Text="OUTCOMES" Margin="0,0,0,2" />
|
||||
<ItemsControl ItemsSource="{Binding ChildOutcomes}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate x:DataType="vm:WorkConsoleChildOutcomeRowViewModel">
|
||||
<DataTemplate x:DataType="vm:ChildOutcomeRowViewModel">
|
||||
<Grid ColumnDefinitions="*,Auto,Auto" Margin="0,2">
|
||||
<TextBlock Grid.Column="0" Text="{Binding Title}"
|
||||
TextTrimming="CharacterEllipsis"
|
||||
|
||||
@@ -2,32 +2,25 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="using:ClaudeDo.Ui.ViewModels.Islands"
|
||||
xmlns:islands="using:ClaudeDo.Ui.Views.Islands"
|
||||
xmlns:ctl="using:ClaudeDo.Ui.Views.Controls"
|
||||
xmlns:detail="using:ClaudeDo.Ui.Views.Islands.Detail"
|
||||
xmlns:loc="using:ClaudeDo.Ui.Localization"
|
||||
x:Class="ClaudeDo.Ui.Views.Islands.DetailsIslandView"
|
||||
x:DataType="vm:DetailsIslandViewModel">
|
||||
<DockPanel>
|
||||
|
||||
<!-- ── Metadata footer (sticky bottom) — task detail only ── -->
|
||||
<!-- ── Metadata footer (sticky bottom) — created-at + close — task detail only ── -->
|
||||
<Border DockPanel.Dock="Bottom"
|
||||
IsVisible="{Binding IsTaskDetailVisible}"
|
||||
BorderBrush="{DynamicResource LineBrush}"
|
||||
BorderThickness="0,1,0,0"
|
||||
Padding="14,8">
|
||||
<Grid ColumnDefinitions="Auto,*,Auto">
|
||||
<Button Grid.Column="0" Classes="icon-btn"
|
||||
Command="{Binding DeleteTaskCommand}"
|
||||
ToolTip.Tip="{loc:Tr details.deleteTaskTip}"
|
||||
VerticalAlignment="Center">
|
||||
<PathIcon Data="{StaticResource Icon.Trash}" Width="14" Height="14"
|
||||
Foreground="{DynamicResource BloodBrush}"/>
|
||||
</Button>
|
||||
<TextBlock Grid.Column="1"
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
<TextBlock Grid.Column="0"
|
||||
Classes="meta"
|
||||
Text="{Binding Task.CreatedAtFormatted}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
<Button Grid.Column="2" Classes="icon-btn"
|
||||
<Button Grid.Column="1" Classes="icon-btn"
|
||||
Command="{Binding CloseDetailsCommand}"
|
||||
ToolTip.Tip="{loc:Tr details.closeTip}"
|
||||
VerticalAlignment="Center">
|
||||
@@ -36,358 +29,37 @@
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- ── Header (sticky top): check · eyebrow · title · status · star · gear — task detail only ── -->
|
||||
<!-- ── Header (sticky top): id · title · trash/skull · gear — task detail only ── -->
|
||||
<Border DockPanel.Dock="Top" Classes="island-header"
|
||||
IsVisible="{Binding IsTaskDetailVisible}">
|
||||
<Grid ColumnDefinitions="Auto,*,Auto,Auto">
|
||||
<Button Grid.Column="0" Classes="flat"
|
||||
Command="{Binding ToggleDoneCommand}"
|
||||
Padding="0"
|
||||
VerticalAlignment="Top"
|
||||
Margin="0,2,10,0">
|
||||
<Ellipse Classes="task-check"
|
||||
Classes.done="{Binding Task.Done}"
|
||||
Width="18" Height="18"
|
||||
Cursor="Hand"/>
|
||||
</Button>
|
||||
<StackPanel Grid.Column="1" Spacing="0">
|
||||
<TextBlock Classes="meta"
|
||||
Text="{Binding TaskIdBadge}"
|
||||
Margin="0,0,0,4"
|
||||
Cursor="Hand"
|
||||
ToolTip.Tip="{loc:Tr details.copyTaskIdTip}"
|
||||
Tapped="OnTaskIdTapped"/>
|
||||
<TextBox Text="{Binding EditableTitle, Mode=TwoWay}"
|
||||
FontSize="{StaticResource FontSizeTaskTitle}" FontWeight="Medium"
|
||||
BorderThickness="0" Background="Transparent"
|
||||
Foreground="{DynamicResource TextBrush}"
|
||||
TextWrapping="Wrap"
|
||||
AcceptsReturn="False"
|
||||
Padding="0"/>
|
||||
</StackPanel>
|
||||
|
||||
<Button Grid.Column="2"
|
||||
Classes="icon-btn star-btn"
|
||||
Classes.on="{Binding Task.IsStarred}"
|
||||
Command="{Binding ToggleStarCommand}"
|
||||
ToolTip.Tip="{loc:Tr details.starTip}"
|
||||
VerticalAlignment="Top"
|
||||
Margin="6,0,0,0">
|
||||
<PathIcon Data="{StaticResource Icon.Star}" Width="14" Height="14"/>
|
||||
</Button>
|
||||
|
||||
<Button Grid.Column="3" Classes="icon-btn"
|
||||
ToolTip.Tip="{loc:Tr details.agentSettingsTip}"
|
||||
IsEnabled="{Binding IsAgentSectionEnabled}"
|
||||
VerticalAlignment="Top"
|
||||
Margin="6,0,0,0">
|
||||
<TextBlock Text="⚙" FontSize="{StaticResource FontSizeTaskTitle}"/>
|
||||
<Button.Flyout>
|
||||
<Flyout Placement="BottomEdgeAlignedRight" ShowMode="Standard">
|
||||
<StackPanel Width="340" Spacing="10" Margin="4">
|
||||
<TextBlock Text="{loc:Tr details.agentSettingsHeading}" FontWeight="SemiBold"/>
|
||||
|
||||
<StackPanel Spacing="2">
|
||||
<Grid ColumnDefinitions="Auto,Auto,*,Auto" ColumnSpacing="6">
|
||||
<TextBlock Grid.Column="0" Classes="field-label" Text="{loc:Tr details.modelLabel}" VerticalAlignment="Center"/>
|
||||
<ctl:InheritedBadge Grid.Column="1" BadgeText="{Binding ModelBadge}"/>
|
||||
<Button Grid.Column="3" Classes="icon-btn" Content="↺" ToolTip.Tip="{loc:Tr settings.inherit.resetToInherited}"
|
||||
Command="{Binding ResetTaskModelCommand}"/>
|
||||
</Grid>
|
||||
<ComboBox ItemsSource="{Binding TaskModelOptions}"
|
||||
SelectedItem="{Binding TaskModelSelection, Mode=TwoWay}"
|
||||
PlaceholderText="{Binding ModelInheritedHint}"
|
||||
HorizontalAlignment="Stretch"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Spacing="2">
|
||||
<Grid ColumnDefinitions="Auto,Auto,*,Auto" ColumnSpacing="6">
|
||||
<TextBlock Grid.Column="0" Classes="field-label" Text="{loc:Tr details.maxTurnsLabel}" VerticalAlignment="Center"/>
|
||||
<ctl:InheritedBadge Grid.Column="1" BadgeText="{Binding TurnsBadge}"/>
|
||||
<Button Grid.Column="3" Classes="icon-btn" Content="↺" ToolTip.Tip="{loc:Tr settings.inherit.resetToInherited}"
|
||||
Command="{Binding ResetTaskTurnsCommand}"/>
|
||||
</Grid>
|
||||
<NumericUpDown Value="{Binding TaskMaxTurns, Mode=TwoWay}"
|
||||
PlaceholderText="{Binding TurnsInheritedHint}"
|
||||
Minimum="1" Maximum="200" Increment="1" FormatString="0"
|
||||
HorizontalAlignment="Stretch"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Spacing="2">
|
||||
<TextBlock Classes="field-label" Text="{loc:Tr details.systemPromptLabel}"/>
|
||||
<TextBox Text="{Binding TaskSystemPrompt, Mode=TwoWay}"
|
||||
AcceptsReturn="True" TextWrapping="Wrap" MinHeight="70"/>
|
||||
<TextBlock Classes="meta" Opacity="0.6"
|
||||
Text="{loc:Tr details.systemPromptPrepended}"
|
||||
IsVisible="{Binding EffectiveSystemPromptHint, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||||
<TextBlock Classes="meta" Opacity="0.6" TextWrapping="Wrap"
|
||||
Text="{Binding EffectiveSystemPromptHint}"
|
||||
IsVisible="{Binding EffectiveSystemPromptHint, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Spacing="2">
|
||||
<Grid ColumnDefinitions="Auto,Auto,*,Auto" ColumnSpacing="6">
|
||||
<TextBlock Grid.Column="0" Classes="field-label" Text="{loc:Tr details.agentFileLabel}" VerticalAlignment="Center"/>
|
||||
<ctl:InheritedBadge Grid.Column="1" BadgeText="{Binding AgentBadge}"/>
|
||||
<Button Grid.Column="3" Classes="icon-btn" Content="↺" ToolTip.Tip="{loc:Tr settings.inherit.resetToInherited}"
|
||||
Command="{Binding ResetTaskAgentCommand}"/>
|
||||
</Grid>
|
||||
<ComboBox ItemsSource="{Binding TaskAgentOptions}"
|
||||
SelectedItem="{Binding TaskSelectedAgent, Mode=TwoWay}"
|
||||
HorizontalAlignment="Stretch">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Flyout>
|
||||
</Button.Flyout>
|
||||
</Button>
|
||||
</Grid>
|
||||
<detail:TaskHeaderBar/>
|
||||
</Border>
|
||||
|
||||
<!-- ── Agent status strip (sticky, above metadata footer) — task detail only ── -->
|
||||
<islands:AgentStripView DockPanel.Dock="Bottom"
|
||||
IsVisible="{Binding IsTaskDetailVisible}"/>
|
||||
|
||||
<!-- ── Body: task details (normal), notes editor (notes mode), or prep log (prep mode) ── -->
|
||||
<Grid>
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto"
|
||||
IsVisible="{Binding IsTaskDetailVisible}">
|
||||
<StackPanel Spacing="0">
|
||||
|
||||
<!-- Planning merge section — visible only for planning parent tasks -->
|
||||
<Border Classes="section-divider"
|
||||
IsVisible="{Binding Task.IsPlanningParent}">
|
||||
<StackPanel Spacing="8">
|
||||
<TextBlock Classes="section-label" Text="{loc:Tr details.mergeLabel}" Margin="0,0,0,2"/>
|
||||
<StackPanel Spacing="4">
|
||||
<TextBlock Classes="field-label" Text="{loc:Tr details.mergeTargetLabel}"/>
|
||||
<ComboBox ItemsSource="{Binding MergeTargetBranches}"
|
||||
SelectedItem="{Binding SelectedMergeTarget, Mode=TwoWay}"
|
||||
HorizontalAlignment="Stretch"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<Button Classes="btn" Content="{loc:Tr details.reviewCombinedDiff}"
|
||||
Command="{Binding ReviewCombinedDiffCommand}"/>
|
||||
<Button Classes="btn" Content="{loc:Tr details.mergeAllSubtasks}"
|
||||
IsEnabled="{Binding CanMergeAll}"
|
||||
Command="{Binding MergeAllCommand}"
|
||||
ToolTip.Tip="{Binding MergeAllDisabledReason}"/>
|
||||
</StackPanel>
|
||||
<TextBlock Text="{Binding MergeAllError}"
|
||||
Foreground="{DynamicResource BloodBrush}"
|
||||
TextWrapping="Wrap"
|
||||
IsVisible="{Binding MergeAllError, Converter={x:Static ObjectConverters.IsNotNull}}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Review section — visible when task is WaitingForReview -->
|
||||
<Border Classes="section-divider"
|
||||
IsVisible="{Binding IsWaitingForReview}">
|
||||
<StackPanel Spacing="8">
|
||||
<TextBlock Classes="section-label" Text="{loc:Tr tasks.reviewTitle}" Margin="0,0,0,2"/>
|
||||
<TextBlock Classes="field-label" Text="{loc:Tr tasks.feedbackLabel}"/>
|
||||
<TextBox Text="{Binding ReviewFeedback, Mode=TwoWay}"
|
||||
AcceptsReturn="True"
|
||||
TextWrapping="Wrap"
|
||||
MinHeight="60"
|
||||
MaxHeight="180"
|
||||
PlaceholderText="{loc:Tr tasks.feedbackPlaceholder}"
|
||||
Padding="8"
|
||||
Background="{DynamicResource Surface2Brush}"
|
||||
BorderBrush="{DynamicResource LineBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="8"/>
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<Button Classes="btn accent"
|
||||
Content="{loc:Tr tasks.approve}"
|
||||
ToolTip.Tip="{loc:Tr tasks.approveTip}"
|
||||
Command="{Binding ApproveReviewCommand}"/>
|
||||
<Button Classes="btn"
|
||||
Content="{loc:Tr tasks.reject}"
|
||||
ToolTip.Tip="{loc:Tr tasks.rejectTip}"
|
||||
Command="{Binding RejectReviewCommand}"/>
|
||||
<Button Classes="btn"
|
||||
Content="{loc:Tr tasks.park}"
|
||||
ToolTip.Tip="{loc:Tr tasks.parkTip}"
|
||||
Command="{Binding ParkReviewCommand}"/>
|
||||
<Button Classes="btn"
|
||||
Content="{loc:Tr tasks.cancel}"
|
||||
ToolTip.Tip="{loc:Tr tasks.cancelTip}"
|
||||
Command="{Binding CancelReviewCommand}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Improvement-children outcomes — visible when this task has agent-suggested children -->
|
||||
<Border Classes="section-divider"
|
||||
IsVisible="{Binding HasChildOutcomes}">
|
||||
<StackPanel Spacing="6">
|
||||
<TextBlock Classes="section-label" Text="{loc:Tr details.childOutcomesLabel}" Margin="0,0,0,2"/>
|
||||
<ItemsControl ItemsSource="{Binding ChildOutcomes}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate x:DataType="vm:ChildOutcomeRowViewModel">
|
||||
<Grid ColumnDefinitions="*,Auto,Auto" Margin="0,2">
|
||||
<TextBlock Grid.Column="0" Text="{Binding Title}" TextTrimming="CharacterEllipsis" VerticalAlignment="Center"/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding RoadblockText}"
|
||||
IsVisible="{Binding HasRoadblock}"
|
||||
Foreground="#E0A030" Margin="8,0" VerticalAlignment="Center"/>
|
||||
<TextBlock Grid.Column="2" Text="{Binding StatusLabel}"
|
||||
Opacity="0.75" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Steps section -->
|
||||
<Border Classes="section-divider">
|
||||
<StackPanel Spacing="6">
|
||||
<TextBlock Classes="section-label" Text="{loc:Tr details.stepsLabel}" Margin="0,0,0,2"/>
|
||||
<TextBox Text="{Binding NewSubtaskTitle, Mode=TwoWay}"
|
||||
PlaceholderText="{loc:Tr details.addStepPlaceholder}"
|
||||
Padding="8"
|
||||
Background="{DynamicResource Surface2Brush}"
|
||||
BorderBrush="{DynamicResource LineBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="8">
|
||||
<TextBox.KeyBindings>
|
||||
<KeyBinding Gesture="Enter" Command="{Binding AddSubtaskCommand}"/>
|
||||
</TextBox.KeyBindings>
|
||||
</TextBox>
|
||||
<ItemsControl ItemsSource="{Binding Subtasks}"
|
||||
IsVisible="{Binding Subtasks.Count}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="vm:SubtaskRowViewModel">
|
||||
<Border Classes="subtask-row"
|
||||
Classes.done="{Binding Done}">
|
||||
<Grid ColumnDefinitions="Auto,*">
|
||||
<Button Grid.Column="0" Classes="flat"
|
||||
Padding="0"
|
||||
Margin="0,0,8,0"
|
||||
VerticalAlignment="Center"
|
||||
Command="{Binding $parent[ItemsControl].((vm:DetailsIslandViewModel)DataContext).ToggleSubtaskDoneCommand}"
|
||||
CommandParameter="{Binding}">
|
||||
<Ellipse Classes="task-check"
|
||||
Classes.done="{Binding Done}"
|
||||
Width="16" Height="16"
|
||||
Cursor="Hand"/>
|
||||
</Button>
|
||||
<Panel Grid.Column="1" VerticalAlignment="Center">
|
||||
<TextBlock Classes="subtask-title"
|
||||
Text="{Binding Title}"
|
||||
IsVisible="{Binding !IsEditing}"
|
||||
FontSize="{StaticResource FontSizeBody}"
|
||||
Foreground="{DynamicResource TextDimBrush}"
|
||||
VerticalAlignment="Center"
|
||||
TextWrapping="Wrap"
|
||||
Cursor="Ibeam"
|
||||
Tapped="OnSubtaskTitleTapped"/>
|
||||
<TextBox Classes="subtask-edit"
|
||||
Text="{Binding Title, Mode=TwoWay}"
|
||||
IsVisible="{Binding IsEditing}"
|
||||
FontSize="{StaticResource FontSizeBody}"
|
||||
AcceptsReturn="False"
|
||||
TextWrapping="Wrap"
|
||||
LostFocus="OnSubtaskEditLostFocus">
|
||||
<TextBox.KeyBindings>
|
||||
<KeyBinding Gesture="Enter"
|
||||
Command="{Binding $parent[ItemsControl].((vm:DetailsIslandViewModel)DataContext).CommitSubtaskEditCommand}"
|
||||
CommandParameter="{Binding}"/>
|
||||
</TextBox.KeyBindings>
|
||||
</TextBox>
|
||||
</Panel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Details (description) section -->
|
||||
<Border Classes="section-divider">
|
||||
<StackPanel Spacing="6">
|
||||
<Grid ColumnDefinitions="Auto,*,Auto,Auto">
|
||||
<Button Grid.Column="0"
|
||||
Classes="flat"
|
||||
Command="{Binding ToggleDescriptionExpandedCommand}"
|
||||
Padding="0"
|
||||
Margin="0,0,6,2"
|
||||
VerticalAlignment="Center">
|
||||
<StackPanel Orientation="Horizontal" Spacing="6">
|
||||
<TextBlock Classes="meta"
|
||||
Text="▾"
|
||||
IsVisible="{Binding IsDescriptionExpanded}"/>
|
||||
<TextBlock Classes="meta"
|
||||
Text="▸"
|
||||
IsVisible="{Binding !IsDescriptionExpanded}"/>
|
||||
<TextBlock Classes="section-label" Text="{loc:Tr details.detailsLabel}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Grid.Column="2"
|
||||
Classes="icon-btn"
|
||||
Padding="6,2"
|
||||
Margin="0,0,4,0"
|
||||
ToolTip.Tip="{loc:Tr details.copyDescriptionTip}"
|
||||
IsVisible="{Binding IsDescriptionExpanded}"
|
||||
Click="OnCopyDescriptionClick">
|
||||
<PathIcon Data="{StaticResource Icon.Copy}" Width="11" Height="11"/>
|
||||
</Button>
|
||||
<Button Grid.Column="3"
|
||||
Classes="btn"
|
||||
Command="{Binding ToggleEditDescriptionCommand}"
|
||||
Padding="8,3"
|
||||
ToolTip.Tip="{loc:Tr details.toggleEditPreviewTip}"
|
||||
IsVisible="{Binding IsDescriptionEditorVisible}">
|
||||
<TextBlock Text="{loc:Tr details.previewBtn}"/>
|
||||
</Button>
|
||||
<Button Grid.Column="3"
|
||||
Classes="btn"
|
||||
Command="{Binding ToggleEditDescriptionCommand}"
|
||||
Padding="8,3"
|
||||
ToolTip.Tip="{loc:Tr details.toggleEditPreviewTip}"
|
||||
IsVisible="{Binding IsDescriptionPreviewVisible}">
|
||||
<TextBlock Text="{loc:Tr details.editBtn}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
<TextBox Text="{Binding EditableDescription, Mode=TwoWay}"
|
||||
AcceptsReturn="True"
|
||||
TextWrapping="Wrap"
|
||||
MinHeight="80"
|
||||
MaxHeight="320"
|
||||
PlaceholderText="{loc:Tr details.descriptionPlaceholder}"
|
||||
Padding="8"
|
||||
FontFamily="{DynamicResource MonoFont}"
|
||||
FontSize="{StaticResource FontSizeBody}"
|
||||
Background="{DynamicResource Surface2Brush}"
|
||||
BorderBrush="{DynamicResource LineBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="8"
|
||||
IsVisible="{Binding IsDescriptionEditorVisible}"/>
|
||||
|
||||
<ctl:MarkdownView Markdown="{Binding EditableDescription}"
|
||||
IsVisible="{Binding IsDescriptionPreviewVisible}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Session terminal — auto-sizes to output, scrolls internally after MaxHeight -->
|
||||
<islands:SessionTerminalView MaxHeight="420"
|
||||
Entries="{Binding Log}"
|
||||
Label="{Binding BranchLine, StringFormat='claude-session · {0}'}"
|
||||
IsRunning="{Binding IsRunning}" IsDone="{Binding IsDone}" IsFailed="{Binding IsFailed}"/>
|
||||
|
||||
</StackPanel>
|
||||
<!-- Task detail: description/steps card (upper) + pinned work console (lower) -->
|
||||
<Grid IsVisible="{Binding IsTaskDetailVisible}"
|
||||
Margin="14,12,14,12"
|
||||
RowDefinitions="2*,Auto,*">
|
||||
<ScrollViewer Grid.Row="0" VerticalScrollBarVisibility="Auto">
|
||||
<detail:DescriptionStepsCard VerticalAlignment="Top"/>
|
||||
</ScrollViewer>
|
||||
<GridSplitter Grid.Row="1"
|
||||
Height="4"
|
||||
Margin="0,8"
|
||||
HorizontalAlignment="Stretch"
|
||||
ResizeDirection="Rows"
|
||||
Background="{DynamicResource LineBrush}"/>
|
||||
<detail:WorkConsole Grid.Row="2"/>
|
||||
</Grid>
|
||||
|
||||
<!-- Notes mode -->
|
||||
<Panel IsVisible="{Binding IsNotesMode}">
|
||||
<islands:NotesEditorView DataContext="{Binding Notes}"/>
|
||||
</Panel>
|
||||
|
||||
<!-- Daily-prep mode -->
|
||||
<Panel IsVisible="{Binding IsPrepMode}">
|
||||
<DockPanel>
|
||||
<Border DockPanel.Dock="Top" Padding="12,8">
|
||||
@@ -407,6 +79,7 @@
|
||||
</Panel>
|
||||
</DockPanel>
|
||||
</Panel>
|
||||
|
||||
</Grid>
|
||||
|
||||
</DockPanel>
|
||||
|
||||
Reference in New Issue
Block a user