- Drag-to-reorder user lists in the sidebar, persisted via a new list sort_order column (AddListSortOrder migration, backfilled by creation time) and ListRepository.ReorderAsync - "Open in Explorer" / "Open in Terminal" context-menu actions on lists - "Clear all completed" button on the Tasks island - Inline-edit subtask titles (empty text deletes the step) and click-to-copy task ID in the Details island - Make modal and planning windows resizable (BorderOnly decorations with min sizes) instead of fixed-size borderless Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
299 lines
14 KiB
XML
299 lines
14 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
|
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"
|
|
x:Class="ClaudeDo.Ui.Views.Islands.DetailsIslandView"
|
|
x:DataType="vm:DetailsIslandViewModel">
|
|
<DockPanel>
|
|
|
|
<!-- ── Metadata footer (sticky bottom) ── -->
|
|
<Border DockPanel.Dock="Bottom"
|
|
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="Delete task"
|
|
VerticalAlignment="Center">
|
|
<PathIcon Data="{StaticResource Icon.Trash}" Width="14" Height="14"
|
|
Foreground="{DynamicResource BloodBrush}"/>
|
|
</Button>
|
|
<TextBlock Grid.Column="1"
|
|
Classes="meta"
|
|
Text="{Binding Task.CreatedAtFormatted}"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"/>
|
|
<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 (sticky top): check · eyebrow · title · status · star · gear ── -->
|
|
<Border DockPanel.Dock="Top" Classes="island-header">
|
|
<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="Copy task ID"
|
|
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="Star"
|
|
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="Agent settings"
|
|
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="Agent settings (overrides)" FontWeight="SemiBold"/>
|
|
|
|
<StackPanel Spacing="2">
|
|
<TextBlock Classes="field-label" Text="Model"/>
|
|
<ComboBox ItemsSource="{Binding TaskModelOptions}"
|
|
SelectedItem="{Binding TaskModelSelection, Mode=TwoWay}"
|
|
HorizontalAlignment="Stretch"/>
|
|
<TextBlock Classes="meta"
|
|
Text="{Binding EffectiveModelHint, StringFormat='Effective if inherited: {0}'}"
|
|
Opacity="0.6"/>
|
|
</StackPanel>
|
|
|
|
<StackPanel Spacing="2">
|
|
<TextBlock Classes="field-label" Text="System prompt (appended)"/>
|
|
<TextBox Text="{Binding TaskSystemPrompt, Mode=TwoWay}"
|
|
AcceptsReturn="True" TextWrapping="Wrap" MinHeight="70"
|
|
PlaceholderText="{Binding EffectiveSystemPromptHint}"/>
|
|
</StackPanel>
|
|
|
|
<StackPanel Spacing="2">
|
|
<TextBlock Classes="field-label" Text="Agent file"/>
|
|
<ComboBox ItemsSource="{Binding TaskAgentOptions}"
|
|
SelectedItem="{Binding TaskSelectedAgent, Mode=TwoWay}"
|
|
HorizontalAlignment="Stretch">
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Name}"/>
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
<TextBlock Classes="meta"
|
|
Text="{Binding EffectiveAgentHint, StringFormat='Effective if inherited: {0}'}"
|
|
Opacity="0.6"/>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Flyout>
|
|
</Button.Flyout>
|
|
</Button>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- ── Agent status strip (sticky, above metadata footer) ── -->
|
|
<islands:AgentStripView DockPanel.Dock="Bottom"/>
|
|
|
|
<!-- ── Scrollable body: steps + terminal ── -->
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
|
<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="MERGE" Margin="0,0,0,2"/>
|
|
<StackPanel Spacing="4">
|
|
<TextBlock Classes="field-label" Text="Merge target"/>
|
|
<ComboBox ItemsSource="{Binding MergeTargetBranches}"
|
|
SelectedItem="{Binding SelectedMergeTarget, Mode=TwoWay}"
|
|
HorizontalAlignment="Stretch"/>
|
|
</StackPanel>
|
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
|
<Button Classes="btn" Content="Review combined diff"
|
|
Command="{Binding ReviewCombinedDiffCommand}"/>
|
|
<Button Classes="btn" Content="Merge all subtasks"
|
|
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>
|
|
|
|
<!-- Steps section -->
|
|
<Border Classes="section-divider">
|
|
<StackPanel Spacing="6">
|
|
<TextBlock Classes="section-label" Text="STEPS" Margin="0,0,0,2"/>
|
|
<TextBox Text="{Binding NewSubtaskTitle, Mode=TwoWay}"
|
|
PlaceholderText="Add a step..."
|
|
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="DETAILS"/>
|
|
</StackPanel>
|
|
</Button>
|
|
<Button Grid.Column="2"
|
|
Classes="icon-btn"
|
|
Padding="6,2"
|
|
Margin="0,0,4,0"
|
|
ToolTip.Tip="Copy description to clipboard"
|
|
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="Toggle edit/preview"
|
|
IsVisible="{Binding IsDescriptionEditorVisible}">
|
|
<TextBlock Text="Preview"/>
|
|
</Button>
|
|
<Button Grid.Column="3"
|
|
Classes="btn"
|
|
Command="{Binding ToggleEditDescriptionCommand}"
|
|
Padding="8,3"
|
|
ToolTip.Tip="Toggle edit/preview"
|
|
IsVisible="{Binding IsDescriptionPreviewVisible}">
|
|
<TextBlock Text="Edit"/>
|
|
</Button>
|
|
</Grid>
|
|
|
|
<TextBox Text="{Binding EditableDescription, Mode=TwoWay}"
|
|
AcceptsReturn="True"
|
|
TextWrapping="Wrap"
|
|
MinHeight="80"
|
|
MaxHeight="320"
|
|
PlaceholderText="Add task details (markdown supported)..."
|
|
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"/>
|
|
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
|
|
</DockPanel>
|
|
</UserControl>
|