refactor(ui): single scrollable DetailsIsland body with agent-settings gear flyout, remove Notes
This commit is contained in:
@@ -12,7 +12,6 @@
|
|||||||
BorderThickness="0,1,0,0"
|
BorderThickness="0,1,0,0"
|
||||||
Padding="14,8">
|
Padding="14,8">
|
||||||
<Grid ColumnDefinitions="Auto,*,Auto">
|
<Grid ColumnDefinitions="Auto,*,Auto">
|
||||||
<!-- Delete button -->
|
|
||||||
<Button Grid.Column="0" Classes="icon-btn"
|
<Button Grid.Column="0" Classes="icon-btn"
|
||||||
Command="{Binding DeleteTaskCommand}"
|
Command="{Binding DeleteTaskCommand}"
|
||||||
ToolTip.Tip="Delete task"
|
ToolTip.Tip="Delete task"
|
||||||
@@ -20,14 +19,12 @@
|
|||||||
<PathIcon Data="{StaticResource Icon.Trash}" Width="14" Height="14"
|
<PathIcon Data="{StaticResource Icon.Trash}" Width="14" Height="14"
|
||||||
Foreground="{DynamicResource BloodBrush}"/>
|
Foreground="{DynamicResource BloodBrush}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<!-- Created date -->
|
|
||||||
<TextBlock Grid.Column="1"
|
<TextBlock Grid.Column="1"
|
||||||
Text="{Binding Task.CreatedAtFormatted}"
|
Text="{Binding Task.CreatedAtFormatted}"
|
||||||
FontFamily="{DynamicResource MonoFont}" FontSize="10"
|
FontFamily="{DynamicResource MonoFont}" FontSize="10"
|
||||||
Foreground="{DynamicResource TextFaintBrush}"
|
Foreground="{DynamicResource TextFaintBrush}"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"/>
|
VerticalAlignment="Center"/>
|
||||||
<!-- Close button -->
|
|
||||||
<Button Grid.Column="2" Classes="icon-btn"
|
<Button Grid.Column="2" Classes="icon-btn"
|
||||||
Command="{Binding CloseDetailsCommand}"
|
Command="{Binding CloseDetailsCommand}"
|
||||||
ToolTip.Tip="Close"
|
ToolTip.Tip="Close"
|
||||||
@@ -37,30 +34,76 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- ── Header ── -->
|
<!-- ── Header (sticky top): eyebrow · title · gear (agent-settings flyout) ── -->
|
||||||
<Border DockPanel.Dock="Top" Classes="island-header">
|
<Border DockPanel.Dock="Top" Classes="island-header">
|
||||||
<!-- Eyebrow row -->
|
<Grid ColumnDefinitions="*,Auto">
|
||||||
<StackPanel Spacing="0">
|
<StackPanel Grid.Column="0" Spacing="0">
|
||||||
<StackPanel Orientation="Horizontal" 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"/>
|
||||||
<TextBlock Text="{Binding TaskIdBadge}"
|
<TextBlock Text="{Binding TaskIdBadge}"
|
||||||
FontFamily="{DynamicResource MonoFont}" FontSize="10"
|
FontFamily="{DynamicResource MonoFont}" FontSize="10"
|
||||||
Foreground="{DynamicResource TextFaintBrush}"
|
Foreground="{DynamicResource TextFaintBrush}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Margin="8,0,0,0"/>
|
Margin="8,0,0,0"/>
|
||||||
|
</StackPanel>
|
||||||
|
<TextBox Text="{Binding EditableTitle, Mode=TwoWay}"
|
||||||
|
FontSize="14" FontWeight="Medium"
|
||||||
|
BorderThickness="0" Background="Transparent"
|
||||||
|
Foreground="{DynamicResource TextBrush}"
|
||||||
|
Padding="0"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<!-- Editable title (reduced size) -->
|
|
||||||
<TextBox Text="{Binding EditableTitle, Mode=TwoWay}"
|
<Button Grid.Column="1" Classes="icon-btn"
|
||||||
FontSize="14" FontWeight="Medium"
|
ToolTip.Tip="Agent settings"
|
||||||
BorderThickness="0" Background="Transparent"
|
IsEnabled="{Binding IsAgentSectionEnabled}"
|
||||||
Foreground="{DynamicResource TextBrush}"
|
VerticalAlignment="Top"
|
||||||
Padding="0"/>
|
Margin="6,0,0,0">
|
||||||
</StackPanel>
|
<TextBlock Text="⚙" FontSize="14"/>
|
||||||
|
<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 Text="Model"/>
|
||||||
|
<ComboBox ItemsSource="{Binding TaskModelOptions}"
|
||||||
|
SelectedItem="{Binding TaskModelSelection, Mode=TwoWay}"
|
||||||
|
HorizontalAlignment="Stretch"/>
|
||||||
|
<TextBlock Text="{Binding EffectiveModelHint, StringFormat='Effective if inherited: {0}'}"
|
||||||
|
Opacity="0.6" FontSize="11"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Spacing="2">
|
||||||
|
<TextBlock Text="System prompt (appended)"/>
|
||||||
|
<TextBox Text="{Binding TaskSystemPrompt, Mode=TwoWay}"
|
||||||
|
AcceptsReturn="True" TextWrapping="Wrap" MinHeight="70"
|
||||||
|
PlaceholderText="{Binding EffectiveSystemPromptHint}"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Spacing="2">
|
||||||
|
<TextBlock 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 Text="{Binding EffectiveAgentHint, StringFormat='Effective if inherited: {0}'}"
|
||||||
|
Opacity="0.6" FontSize="11"/>
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</Flyout>
|
||||||
|
</Button.Flyout>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- ── Task strip row: check + title display + star ── -->
|
<!-- ── Task strip row (sticky top): check + title + 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}"
|
||||||
@@ -88,125 +131,64 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- ── Steps section (always visible, above the terminal) ── -->
|
<!-- ── Scrollable body: steps, agent strip, terminal ── -->
|
||||||
<Border DockPanel.Dock="Top"
|
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||||
Padding="18,10,18,10"
|
<StackPanel Spacing="0">
|
||||||
BorderBrush="{DynamicResource LineBrush}"
|
|
||||||
BorderThickness="0,0,0,1">
|
<!-- Steps section -->
|
||||||
<StackPanel Spacing="6">
|
<Border Padding="18,12,18,12"
|
||||||
<TextBlock Classes="section-label" Text="STEPS" Margin="0,0,0,2"/>
|
BorderBrush="{DynamicResource LineBrush}"
|
||||||
<TextBox Text="{Binding NewSubtaskTitle, Mode=TwoWay}"
|
BorderThickness="0,0,0,1">
|
||||||
PlaceholderText="Add a step..."
|
<StackPanel Spacing="6">
|
||||||
Padding="8"
|
<TextBlock Classes="section-label" Text="STEPS" Margin="0,0,0,2"/>
|
||||||
Background="{DynamicResource Surface2Brush}"
|
<TextBox Text="{Binding NewSubtaskTitle, Mode=TwoWay}"
|
||||||
BorderBrush="{DynamicResource LineBrush}"
|
PlaceholderText="Add a step..."
|
||||||
BorderThickness="1"
|
Padding="8"
|
||||||
CornerRadius="6">
|
Background="{DynamicResource Surface2Brush}"
|
||||||
<TextBox.KeyBindings>
|
BorderBrush="{DynamicResource LineBrush}"
|
||||||
<KeyBinding Gesture="Enter" Command="{Binding AddSubtaskCommand}"/>
|
BorderThickness="1"
|
||||||
</TextBox.KeyBindings>
|
CornerRadius="6">
|
||||||
</TextBox>
|
<TextBox.KeyBindings>
|
||||||
<ScrollViewer MaxHeight="180"
|
<KeyBinding Gesture="Enter" Command="{Binding AddSubtaskCommand}"/>
|
||||||
VerticalScrollBarVisibility="Auto"
|
</TextBox.KeyBindings>
|
||||||
IsVisible="{Binding Subtasks.Count}">
|
</TextBox>
|
||||||
<ItemsControl ItemsSource="{Binding Subtasks}">
|
<ItemsControl ItemsSource="{Binding Subtasks}"
|
||||||
<ItemsControl.ItemTemplate>
|
IsVisible="{Binding Subtasks.Count}">
|
||||||
<DataTemplate DataType="vm:SubtaskRowViewModel">
|
<ItemsControl.ItemTemplate>
|
||||||
<Border Classes="subtask-row"
|
<DataTemplate DataType="vm:SubtaskRowViewModel">
|
||||||
Classes.done="{Binding Done}">
|
<Border Classes="subtask-row"
|
||||||
<Grid ColumnDefinitions="Auto,*">
|
Classes.done="{Binding Done}">
|
||||||
<Ellipse Grid.Column="0"
|
<Grid ColumnDefinitions="Auto,*">
|
||||||
Classes="task-check"
|
<Ellipse Grid.Column="0"
|
||||||
Classes.done="{Binding Done}"
|
Classes="task-check"
|
||||||
Width="16" Height="16"
|
Classes.done="{Binding Done}"
|
||||||
VerticalAlignment="Center"
|
Width="16" Height="16"
|
||||||
Cursor="Hand"
|
|
||||||
Margin="0,0,8,0"/>
|
|
||||||
<TextBlock Grid.Column="1"
|
|
||||||
Classes="subtask-title"
|
|
||||||
Text="{Binding Title}"
|
|
||||||
FontSize="13"
|
|
||||||
Foreground="{DynamicResource TextDimBrush}"
|
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
TextWrapping="Wrap"/>
|
Cursor="Hand"
|
||||||
</Grid>
|
Margin="0,0,8,0"/>
|
||||||
</Border>
|
<TextBlock Grid.Column="1"
|
||||||
</DataTemplate>
|
Classes="subtask-title"
|
||||||
</ItemsControl.ItemTemplate>
|
Text="{Binding Title}"
|
||||||
</ItemsControl>
|
FontSize="13"
|
||||||
</ScrollViewer>
|
Foreground="{DynamicResource TextDimBrush}"
|
||||||
</StackPanel>
|
VerticalAlignment="Center"
|
||||||
</Border>
|
TextWrapping="Wrap"/>
|
||||||
|
</Grid>
|
||||||
<!-- ── Main body: agent strip (auto) · terminal (flex) · notes (auto/capped) · agent overrides (auto) ── -->
|
</Border>
|
||||||
<Grid RowDefinitions="Auto,*,Auto,Auto">
|
|
||||||
|
|
||||||
<!-- Agent strip -->
|
|
||||||
<islands:AgentStripView Grid.Row="0"/>
|
|
||||||
|
|
||||||
<!-- Session terminal — fills remaining vertical space -->
|
|
||||||
<islands:SessionTerminalView Grid.Row="1" MinHeight="220" Margin="0,0,0,0"/>
|
|
||||||
|
|
||||||
<!-- Notes in a capped scroller so it never squeezes the terminal -->
|
|
||||||
<ScrollViewer Grid.Row="2" MaxHeight="180"
|
|
||||||
VerticalScrollBarVisibility="Auto">
|
|
||||||
<StackPanel Margin="18,12,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>
|
|
||||||
</ScrollViewer>
|
|
||||||
|
|
||||||
<!-- Agent settings overrides — own row so expanding shrinks the terminal (down to its MinHeight) instead of scrolling inside the capped section -->
|
|
||||||
<Expander Grid.Row="3"
|
|
||||||
Header="Agent settings (overrides)"
|
|
||||||
IsExpanded="False"
|
|
||||||
IsEnabled="{Binding IsAgentSectionEnabled}"
|
|
||||||
Margin="18,0,18,12">
|
|
||||||
<StackPanel Spacing="8" Margin="0,8,0,0">
|
|
||||||
|
|
||||||
<StackPanel Spacing="2">
|
|
||||||
<TextBlock Text="Model" />
|
|
||||||
<ComboBox ItemsSource="{Binding TaskModelOptions}"
|
|
||||||
SelectedItem="{Binding TaskModelSelection, Mode=TwoWay}"
|
|
||||||
MinWidth="160" HorizontalAlignment="Left" />
|
|
||||||
<TextBlock Text="{Binding EffectiveModelHint, StringFormat='Effective if inherited: {0}'}"
|
|
||||||
Opacity="0.6" FontSize="11" />
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<StackPanel Spacing="2">
|
|
||||||
<TextBlock Text="System prompt (appended)" />
|
|
||||||
<TextBox Text="{Binding TaskSystemPrompt, Mode=TwoWay}"
|
|
||||||
AcceptsReturn="True" TextWrapping="Wrap" MinHeight="60"
|
|
||||||
PlaceholderText="{Binding EffectiveSystemPromptHint}" />
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<StackPanel Spacing="2">
|
|
||||||
<TextBlock Text="Agent file" />
|
|
||||||
<ComboBox ItemsSource="{Binding TaskAgentOptions}"
|
|
||||||
SelectedItem="{Binding TaskSelectedAgent, Mode=TwoWay}"
|
|
||||||
MinWidth="240" HorizontalAlignment="Left">
|
|
||||||
<ComboBox.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<TextBlock Text="{Binding Name}" />
|
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.ItemTemplate>
|
</ItemsControl.ItemTemplate>
|
||||||
</ComboBox>
|
</ItemsControl>
|
||||||
<TextBlock Text="{Binding EffectiveAgentHint, StringFormat='Effective if inherited: {0}'}"
|
|
||||||
Opacity="0.6" FontSize="11" />
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<!-- Agent status strip -->
|
||||||
|
<islands:AgentStripView/>
|
||||||
|
|
||||||
|
<!-- Session terminal -->
|
||||||
|
<islands:SessionTerminalView MinHeight="360"/>
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
</ScrollViewer>
|
||||||
|
|
||||||
</StackPanel>
|
|
||||||
</Expander>
|
|
||||||
</Grid>
|
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
Reference in New Issue
Block a user