Both actions previously gave no feedback: opening a ConPTY session only created the tile after the launch-spec roundtrip (which may build a worktree), and the refine button just disappeared while the run was in flight. Add a shared Ellipse.spinner style, and let ConPtyPaneViewModel resolve its own launch spec so the tile shows up immediately with a starting overlay. A failed launch now keeps the tile with its inline error banner instead of never appearing — Start() is separated from the ctor so the host can subscribe to ErrorReported before the launch begins.
65 lines
3.1 KiB
XML
65 lines
3.1 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:vm="using:ClaudeDo.Ui.ViewModels.MissionControl"
|
|
xmlns:views="using:ClaudeDo.Ui.Views"
|
|
xmlns:loc="using:ClaudeDo.Ui.Localization"
|
|
xmlns:conv="using:Avalonia.Data.Converters"
|
|
x:DataType="vm:ConPtyPaneViewModel"
|
|
x:Class="ClaudeDo.Ui.Views.MissionControl.ConPtyPaneView">
|
|
<Border Classes="monitor-pane" BorderThickness="1" CornerRadius="10" ClipToBounds="True">
|
|
<DockPanel LastChildFill="True">
|
|
|
|
<!-- Header: title + close -->
|
|
<Border DockPanel.Dock="Top"
|
|
Background="{DynamicResource Surface2Brush}"
|
|
BorderBrush="{DynamicResource LineBrush}"
|
|
BorderThickness="0,0,0,1" Padding="8,3">
|
|
<Grid ColumnDefinitions="*,Auto,Auto">
|
|
<TextBlock Grid.Column="0" Classes="meta" Text="{Binding DisplayTitle}"
|
|
TextTrimming="CharacterEllipsis"
|
|
ToolTip.Tip="{Binding DisplayTitle}"
|
|
Foreground="{DynamicResource TextDimBrush}"
|
|
VerticalAlignment="Center" Margin="4,0,0,0" />
|
|
<Button Grid.Column="1" Classes="btn" Margin="0,0,6,0"
|
|
IsVisible="{Binding IsTaskBased}"
|
|
Content="{loc:Tr missionControl.submitForReview}"
|
|
ToolTip.Tip="{loc:Tr missionControl.submitForReviewTip}"
|
|
Command="{Binding SubmitForReviewCommand}" />
|
|
<Button Grid.Column="2" Classes="title-ctrl"
|
|
Command="{Binding CloseCommand}"
|
|
ToolTip.Tip="{loc:Tr missionControl.closeSession}">
|
|
<PathIcon Data="{StaticResource Icon.WinClose}" Width="12" Height="12"/>
|
|
</Button>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Start-failure banner -->
|
|
<Border DockPanel.Dock="Top"
|
|
IsVisible="{Binding Terminal.StartError, Converter={x:Static conv:ObjectConverters.IsNotNull}}"
|
|
Background="{DynamicResource ErrorTintBrush}"
|
|
BorderBrush="{DynamicResource BloodBrush}"
|
|
BorderThickness="0,0,0,1" Padding="12,6">
|
|
<TextBlock Classes="meta" Text="{Binding Terminal.StartError}"
|
|
Foreground="{DynamicResource BloodBrush}"
|
|
TextWrapping="Wrap" />
|
|
</Border>
|
|
|
|
<!-- Embedded ConPTY terminal, with a starting overlay until the session is spawned -->
|
|
<Panel>
|
|
<views:InteractiveTerminalView DataContext="{Binding Terminal}" />
|
|
<Border IsVisible="{Binding Terminal.IsStarting}"
|
|
Background="{DynamicResource VoidBrush}">
|
|
<StackPanel Orientation="Horizontal" Spacing="10"
|
|
HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
<Ellipse Classes="spinner"/>
|
|
<TextBlock Classes="meta" Text="{loc:Tr missionControl.conptyStarting}"
|
|
Foreground="{DynamicResource TextDimBrush}"
|
|
VerticalAlignment="Center"/>
|
|
</StackPanel>
|
|
</Border>
|
|
</Panel>
|
|
|
|
</DockPanel>
|
|
</Border>
|
|
</UserControl>
|