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"
|
||||
Padding="14,8">
|
||||
<Grid ColumnDefinitions="Auto,*,Auto">
|
||||
<!-- Delete button -->
|
||||
<Button Grid.Column="0" Classes="icon-btn"
|
||||
Command="{Binding DeleteTaskCommand}"
|
||||
ToolTip.Tip="Delete task"
|
||||
@@ -20,14 +19,12 @@
|
||||
<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"
|
||||
@@ -37,10 +34,10 @@
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- ── Header ── -->
|
||||
<!-- ── Header (sticky top): eyebrow · title · gear (agent-settings flyout) ── -->
|
||||
<Border DockPanel.Dock="Top" Classes="island-header">
|
||||
<!-- Eyebrow row -->
|
||||
<StackPanel Spacing="0">
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
<StackPanel Grid.Column="0" Spacing="0">
|
||||
<StackPanel Orientation="Horizontal" Spacing="6" Margin="0,0,0,4">
|
||||
<Ellipse Width="5" Height="5" Fill="{DynamicResource AccentBrush}"
|
||||
VerticalAlignment="Center"/>
|
||||
@@ -51,16 +48,62 @@
|
||||
VerticalAlignment="Center"
|
||||
Margin="8,0,0,0"/>
|
||||
</StackPanel>
|
||||
<!-- Editable title (reduced size) -->
|
||||
<TextBox Text="{Binding EditableTitle, Mode=TwoWay}"
|
||||
FontSize="14" FontWeight="Medium"
|
||||
BorderThickness="0" Background="Transparent"
|
||||
Foreground="{DynamicResource TextBrush}"
|
||||
Padding="0"/>
|
||||
</StackPanel>
|
||||
|
||||
<Button Grid.Column="1" Classes="icon-btn"
|
||||
ToolTip.Tip="Agent settings"
|
||||
IsEnabled="{Binding IsAgentSectionEnabled}"
|
||||
VerticalAlignment="Top"
|
||||
Margin="6,0,0,0">
|
||||
<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>
|
||||
|
||||
<!-- ── Task strip row: check + title display + star ── -->
|
||||
<!-- ── Task strip row (sticky top): check + title + star ── -->
|
||||
<Border DockPanel.Dock="Top"
|
||||
Padding="18,10,18,10"
|
||||
BorderBrush="{DynamicResource LineBrush}"
|
||||
@@ -88,9 +131,12 @@
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- ── Steps section (always visible, above the terminal) ── -->
|
||||
<Border DockPanel.Dock="Top"
|
||||
Padding="18,10,18,10"
|
||||
<!-- ── Scrollable body: steps, agent strip, terminal ── -->
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel Spacing="0">
|
||||
|
||||
<!-- Steps section -->
|
||||
<Border Padding="18,12,18,12"
|
||||
BorderBrush="{DynamicResource LineBrush}"
|
||||
BorderThickness="0,0,0,1">
|
||||
<StackPanel Spacing="6">
|
||||
@@ -106,10 +152,8 @@
|
||||
<KeyBinding Gesture="Enter" Command="{Binding AddSubtaskCommand}"/>
|
||||
</TextBox.KeyBindings>
|
||||
</TextBox>
|
||||
<ScrollViewer MaxHeight="180"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
<ItemsControl ItemsSource="{Binding Subtasks}"
|
||||
IsVisible="{Binding Subtasks.Count}">
|
||||
<ItemsControl ItemsSource="{Binding Subtasks}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="vm:SubtaskRowViewModel">
|
||||
<Border Classes="subtask-row"
|
||||
@@ -134,79 +178,17 @@
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- ── Main body: agent strip (auto) · terminal (flex) · notes (auto/capped) · agent overrides (auto) ── -->
|
||||
<Grid RowDefinitions="Auto,*,Auto,Auto">
|
||||
<!-- Agent status strip -->
|
||||
<islands:AgentStripView/>
|
||||
|
||||
<!-- Agent strip -->
|
||||
<islands:AgentStripView Grid.Row="0"/>
|
||||
<!-- Session terminal -->
|
||||
<islands:SessionTerminalView MinHeight="360"/>
|
||||
|
||||
<!-- 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>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<TextBlock Text="{Binding EffectiveAgentHint, StringFormat='Effective if inherited: {0}'}"
|
||||
Opacity="0.6" FontSize="11" />
|
||||
</StackPanel>
|
||||
|
||||
</StackPanel>
|
||||
</Expander>
|
||||
</Grid>
|
||||
</DockPanel>
|
||||
</UserControl>
|
||||
|
||||
Reference in New Issue
Block a user