style(ui): subtasks, notes, details metadata footer
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -759,6 +759,27 @@
|
|||||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<!-- ============================================================ -->
|
||||||
|
<!-- SUBTASK ROW -->
|
||||||
|
<!-- ============================================================ -->
|
||||||
|
<Style Selector="Border.subtask-row">
|
||||||
|
<Setter Property="Padding" Value="8,5" />
|
||||||
|
<Setter Property="CornerRadius" Value="6" />
|
||||||
|
<Setter Property="Background" Value="Transparent" />
|
||||||
|
<Setter Property="Transitions">
|
||||||
|
<Transitions>
|
||||||
|
<BrushTransition Property="Background" Duration="0:0:0.10"/>
|
||||||
|
</Transitions>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
<Style Selector="Border.subtask-row:pointerover">
|
||||||
|
<Setter Property="Background" Value="{StaticResource Surface2Brush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="Border.subtask-row.done TextBlock.subtask-title">
|
||||||
|
<Setter Property="Opacity" Value="0.5" />
|
||||||
|
<Setter Property="TextDecorations" Value="Strikethrough" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
<!-- ============================================================ -->
|
<!-- ============================================================ -->
|
||||||
<!-- SECTION LABELS (OVERDUE / TASKS / COMPLETED) -->
|
<!-- SECTION LABELS (OVERDUE / TASKS / COMPLETED) -->
|
||||||
<!-- ============================================================ -->
|
<!-- ============================================================ -->
|
||||||
|
|||||||
@@ -66,6 +66,12 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
|||||||
|
|
||||||
private CancellationTokenSource? _loadCts;
|
private CancellationTokenSource? _loadCts;
|
||||||
|
|
||||||
|
// Set by shell so CloseDetailCommand can clear SelectedTask
|
||||||
|
public Action? CloseDetail { get; set; }
|
||||||
|
|
||||||
|
// Set by shell so DeleteTaskCommand can remove from list
|
||||||
|
public Func<TaskRowViewModel, System.Threading.Tasks.Task>? DeleteFromList { get; set; }
|
||||||
|
|
||||||
// Set by the view so OpenDiffCommand can show the modal as a dialog
|
// Set by the view so OpenDiffCommand can show the modal as a dialog
|
||||||
public Func<DiffModalViewModel, System.Threading.Tasks.Task>? ShowDiffModal { get; set; }
|
public Func<DiffModalViewModel, System.Threading.Tasks.Task>? ShowDiffModal { get; set; }
|
||||||
|
|
||||||
@@ -198,6 +204,34 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
|||||||
await System.Threading.Tasks.Task.CompletedTask;
|
await System.Threading.Tasks.Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[RelayCommand]
|
||||||
|
private void CloseDetails() => CloseDetail?.Invoke();
|
||||||
|
|
||||||
|
[RelayCommand]
|
||||||
|
private async System.Threading.Tasks.Task DeleteTaskAsync()
|
||||||
|
{
|
||||||
|
if (Task == null) return;
|
||||||
|
var row = Task;
|
||||||
|
await using var ctx = _dbFactory.CreateDbContext();
|
||||||
|
var repo = new TaskRepository(ctx);
|
||||||
|
await repo.DeleteAsync(row.Id);
|
||||||
|
if (DeleteFromList != null)
|
||||||
|
await DeleteFromList(row);
|
||||||
|
CloseDetail?.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
|
[RelayCommand]
|
||||||
|
private async System.Threading.Tasks.Task SaveNotesAsync()
|
||||||
|
{
|
||||||
|
if (Task == null) return;
|
||||||
|
await using var ctx = _dbFactory.CreateDbContext();
|
||||||
|
var repo = new TaskRepository(ctx);
|
||||||
|
var entity = await repo.GetByIdAsync(Task.Id);
|
||||||
|
if (entity == null) return;
|
||||||
|
entity.Notes = Notes;
|
||||||
|
await repo.UpdateAsync(entity);
|
||||||
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
private async System.Threading.Tasks.Task ApproveMergeAsync()
|
private async System.Threading.Tasks.Task ApproveMergeAsync()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,6 +22,9 @@ public sealed partial class TaskRowViewModel : ViewModelBase
|
|||||||
[ObservableProperty] private int _diffAdditions;
|
[ObservableProperty] private int _diffAdditions;
|
||||||
[ObservableProperty] private int _diffDeletions;
|
[ObservableProperty] private int _diffDeletions;
|
||||||
|
|
||||||
|
public DateTime CreatedAt { get; init; }
|
||||||
|
public string CreatedAtFormatted => CreatedAt == default ? "—" : $"Created {CreatedAt:MMM d}";
|
||||||
|
|
||||||
public IReadOnlyList<string> Tags { get; init; } = Array.Empty<string>();
|
public IReadOnlyList<string> Tags { get; init; } = Array.Empty<string>();
|
||||||
public int StepsCount { get; init; }
|
public int StepsCount { get; init; }
|
||||||
public int StepsCompleted { get; init; }
|
public int StepsCompleted { get; init; }
|
||||||
@@ -78,6 +81,7 @@ public sealed partial class TaskRowViewModel : ViewModelBase
|
|||||||
ScheduledFor = t.ScheduledFor,
|
ScheduledFor = t.ScheduledFor,
|
||||||
DiffAdditions = add,
|
DiffAdditions = add,
|
||||||
DiffDeletions = del,
|
DiffDeletions = del,
|
||||||
|
CreatedAt = t.CreatedAt,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,43 @@
|
|||||||
x:Class="ClaudeDo.Ui.Views.Islands.DetailsIslandView"
|
x:Class="ClaudeDo.Ui.Views.Islands.DetailsIslandView"
|
||||||
x:DataType="vm:DetailsIslandViewModel">
|
x:DataType="vm:DetailsIslandViewModel">
|
||||||
<DockPanel>
|
<DockPanel>
|
||||||
|
|
||||||
|
<!-- ── Metadata footer (sticky bottom) ── -->
|
||||||
|
<Border DockPanel.Dock="Bottom"
|
||||||
|
BorderBrush="{DynamicResource LineBrush}"
|
||||||
|
BorderThickness="0,1,0,0"
|
||||||
|
Padding="14,8">
|
||||||
|
<Grid ColumnDefinitions="Auto,*,Auto">
|
||||||
|
<!-- Delete button -->
|
||||||
|
<Button Grid.Column="0" Classes="icon-btn"
|
||||||
|
Command="{Binding DeleteTaskCommand}"
|
||||||
|
ToolTip.Tip="Delete task"
|
||||||
|
VerticalAlignment="Center">
|
||||||
|
<PathIcon Data="{StaticResource Icon.Trash}" Width="14" Height="14"
|
||||||
|
Foreground="{DynamicResource BloodBrush}"/>
|
||||||
|
</Button>
|
||||||
|
<!-- Created date -->
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Text="{Binding Task.CreatedAtFormatted}"
|
||||||
|
FontFamily="{DynamicResource MonoFont}" FontSize="10"
|
||||||
|
Foreground="{DynamicResource TextFaintBrush}"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"/>
|
||||||
|
<!-- Close button -->
|
||||||
|
<Button Grid.Column="2" Classes="icon-btn"
|
||||||
|
Command="{Binding CloseDetailsCommand}"
|
||||||
|
ToolTip.Tip="Close"
|
||||||
|
VerticalAlignment="Center">
|
||||||
|
<PathIcon Data="{StaticResource Icon.X}" Width="14" Height="14"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
|
||||||
<!-- ── Header ── -->
|
<!-- ── Header ── -->
|
||||||
<Border DockPanel.Dock="Top" Classes="island-header">
|
<Border DockPanel.Dock="Top" Classes="island-header">
|
||||||
<DockPanel>
|
<!-- Eyebrow row -->
|
||||||
<!-- Eyebrow row: LOGBOOK · #T{shortId} -->
|
<StackPanel Spacing="0">
|
||||||
<StackPanel Orientation="Horizontal" DockPanel.Dock="Top" Spacing="6" Margin="0,0,0,4">
|
<StackPanel Orientation="Horizontal" Spacing="6" Margin="0,0,0,4">
|
||||||
<Ellipse Width="5" Height="5" Fill="{DynamicResource AccentBrush}"
|
<Ellipse Width="5" Height="5" Fill="{DynamicResource AccentBrush}"
|
||||||
VerticalAlignment="Center"/>
|
VerticalAlignment="Center"/>
|
||||||
<TextBlock Classes="eyebrow" Text="LOGBOOK" VerticalAlignment="Center"/>
|
<TextBlock Classes="eyebrow" Text="LOGBOOK" VerticalAlignment="Center"/>
|
||||||
@@ -17,33 +49,29 @@
|
|||||||
FontFamily="{DynamicResource MonoFont}" FontSize="10"
|
FontFamily="{DynamicResource MonoFont}" FontSize="10"
|
||||||
Foreground="{DynamicResource TextFaintBrush}"
|
Foreground="{DynamicResource TextFaintBrush}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
HorizontalAlignment="Right"
|
|
||||||
Margin="8,0,0,0"/>
|
Margin="8,0,0,0"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<!-- Editable title TextBox (reduced size) -->
|
<!-- Editable title (reduced size) -->
|
||||||
<TextBox DockPanel.Dock="Top"
|
<TextBox Text="{Binding EditableTitle, Mode=TwoWay}"
|
||||||
Text="{Binding EditableTitle, Mode=TwoWay}"
|
|
||||||
FontSize="14" FontWeight="Medium"
|
FontSize="14" FontWeight="Medium"
|
||||||
BorderThickness="0" Background="Transparent"
|
BorderThickness="0" Background="Transparent"
|
||||||
Foreground="{DynamicResource TextBrush}"
|
Foreground="{DynamicResource TextBrush}"
|
||||||
Padding="0"/>
|
Padding="0"/>
|
||||||
</DockPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- ── Task strip row: check + title + star ── -->
|
<!-- ── Task strip row: check + title display + star ── -->
|
||||||
<Border DockPanel.Dock="Top"
|
<Border DockPanel.Dock="Top"
|
||||||
Padding="18,10,18,10"
|
Padding="18,10,18,10"
|
||||||
BorderBrush="{DynamicResource LineBrush}"
|
BorderBrush="{DynamicResource LineBrush}"
|
||||||
BorderThickness="0,0,0,1">
|
BorderThickness="0,0,0,1">
|
||||||
<Grid ColumnDefinitions="Auto,*,Auto">
|
<Grid ColumnDefinitions="Auto,*,Auto">
|
||||||
<!-- Ellipse checkbox -->
|
|
||||||
<Ellipse Grid.Column="0"
|
<Ellipse Grid.Column="0"
|
||||||
Classes="task-check"
|
Classes="task-check"
|
||||||
Classes.done="{Binding Task.Done}"
|
Classes.done="{Binding Task.Done}"
|
||||||
Width="18" Height="18"
|
Width="18" Height="18"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Cursor="Hand"/>
|
Cursor="Hand"/>
|
||||||
<!-- Title display -->
|
|
||||||
<TextBlock Grid.Column="1"
|
<TextBlock Grid.Column="1"
|
||||||
Text="{Binding EditableTitle}"
|
Text="{Binding EditableTitle}"
|
||||||
FontSize="14" FontWeight="Medium"
|
FontSize="14" FontWeight="Medium"
|
||||||
@@ -51,7 +79,6 @@
|
|||||||
TextTrimming="CharacterEllipsis"
|
TextTrimming="CharacterEllipsis"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Margin="10,0"/>
|
Margin="10,0"/>
|
||||||
<!-- Star button -->
|
|
||||||
<Button Grid.Column="2"
|
<Button Grid.Column="2"
|
||||||
Classes="icon-btn star-btn"
|
Classes="icon-btn star-btn"
|
||||||
Classes.on="{Binding Task.IsStarred}"
|
Classes.on="{Binding Task.IsStarred}"
|
||||||
@@ -63,28 +90,63 @@
|
|||||||
|
|
||||||
<!-- ── Scrollable body ── -->
|
<!-- ── Scrollable body ── -->
|
||||||
<ScrollViewer>
|
<ScrollViewer>
|
||||||
<StackPanel Margin="0" Spacing="0">
|
<StackPanel Spacing="0">
|
||||||
|
|
||||||
<!-- Agent strip -->
|
<!-- Agent strip -->
|
||||||
<islands:AgentStripView/>
|
<islands:AgentStripView/>
|
||||||
|
|
||||||
<!-- Session terminal -->
|
<!-- Session terminal -->
|
||||||
<islands:SessionTerminalView Height="260" Margin="0"/>
|
<islands:SessionTerminalView Height="260" Margin="0"/>
|
||||||
<!-- Subtasks -->
|
|
||||||
<ItemsControl ItemsSource="{Binding Subtasks}" Margin="18,12">
|
<!-- Subtasks section -->
|
||||||
|
<StackPanel Margin="18,12,18,0"
|
||||||
|
IsVisible="{Binding Subtasks.Count}">
|
||||||
|
<TextBlock Classes="section-label" Text="STEPS"
|
||||||
|
Margin="0,0,0,6"/>
|
||||||
|
<ItemsControl ItemsSource="{Binding Subtasks}">
|
||||||
<ItemsControl.ItemTemplate>
|
<ItemsControl.ItemTemplate>
|
||||||
<DataTemplate DataType="vm:SubtaskRowViewModel">
|
<DataTemplate DataType="vm:SubtaskRowViewModel">
|
||||||
<StackPanel Orientation="Horizontal" Spacing="8" Margin="0,2">
|
<Border Classes="subtask-row"
|
||||||
<CheckBox IsChecked="{Binding Done, Mode=TwoWay}"/>
|
Classes.done="{Binding Done}">
|
||||||
<TextBlock Text="{Binding Title}" VerticalAlignment="Center"
|
<Grid ColumnDefinitions="Auto,*">
|
||||||
Foreground="{DynamicResource TextBrush}"/>
|
<!-- Ellipse checkbox -->
|
||||||
</StackPanel>
|
<Ellipse Grid.Column="0"
|
||||||
|
Classes="task-check"
|
||||||
|
Classes.done="{Binding Done}"
|
||||||
|
Width="16" Height="16"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Cursor="Hand"
|
||||||
|
Margin="0,0,8,0"/>
|
||||||
|
<TextBlock Grid.Column="1"
|
||||||
|
Classes="subtask-title"
|
||||||
|
Text="{Binding Title}"
|
||||||
|
FontSize="13"
|
||||||
|
Foreground="{DynamicResource TextDimBrush}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
TextWrapping="Wrap"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ItemsControl.ItemTemplate>
|
</ItemsControl.ItemTemplate>
|
||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
<!-- Notes -->
|
</StackPanel>
|
||||||
<TextBox Text="{Binding Notes, Mode=TwoWay}" AcceptsReturn="True"
|
|
||||||
TextWrapping="Wrap" MinHeight="80"
|
<!-- Notes section -->
|
||||||
PlaceholderText="Notes…"
|
<StackPanel Margin="18,12,18,12">
|
||||||
Margin="18,0,18,12"/>
|
<TextBlock Classes="section-label" Text="NOTES" Margin="0,0,0,6"/>
|
||||||
|
<TextBox Text="{Binding Notes, Mode=TwoWay}"
|
||||||
|
AcceptsReturn="True"
|
||||||
|
TextWrapping="Wrap"
|
||||||
|
MinHeight="80"
|
||||||
|
Padding="12"
|
||||||
|
PlaceholderText="Notes..."
|
||||||
|
Background="{DynamicResource Surface2Brush}"
|
||||||
|
BorderBrush="{DynamicResource LineBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
CornerRadius="8"
|
||||||
|
LostFocus="NotesLostFocus"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Interactivity;
|
||||||
using ClaudeDo.Ui.ViewModels.Islands;
|
using ClaudeDo.Ui.ViewModels.Islands;
|
||||||
using ClaudeDo.Ui.Views.Modals;
|
using ClaudeDo.Ui.Views.Modals;
|
||||||
|
|
||||||
@@ -33,4 +34,10 @@ public partial class DetailsIslandView : UserControl
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void NotesLostFocus(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (DataContext is DetailsIslandViewModel vm)
|
||||||
|
vm.SaveNotesCommand.Execute(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user