feat(ui): route detail-pane review actions through OperationStatus
Approve, Submit, Reject, and Park each get their own OperationStatus so the button locks and shows an OperationIndicator for the duration of the call; Approve additionally scopes a MergeProgressEvent subscription to its own task id to sharpen the label from "merging" to "verifying" mid-flight. MergeSectionViewModel's preview refresh gets the same treatment for display only, since it has no command button to gate.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="using:ClaudeDo.Ui.ViewModels.Islands"
|
||||
xmlns:loc="using:ClaudeDo.Ui.Localization"
|
||||
xmlns:controls="using:ClaudeDo.Ui.Views.Controls"
|
||||
x:DataType="vm:DetailsIslandViewModel"
|
||||
x:Class="ClaudeDo.Ui.Views.Islands.Detail.WorkConsole">
|
||||
|
||||
@@ -263,10 +264,13 @@
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
FontFamily="{StaticResource MonoFont}"
|
||||
FontSize="{StaticResource FontSizeMono}" />
|
||||
<Button Grid.Column="2" Classes="prompt-action accent" Content="[Resume]"
|
||||
VerticalAlignment="Top" Margin="12,2,0,0"
|
||||
ToolTip.Tip="{loc:Tr session.reviewContinueTip}"
|
||||
Command="{Binding RejectReviewCommand}" />
|
||||
<StackPanel Grid.Column="2" Spacing="4" Margin="12,2,0,0">
|
||||
<Button Classes="prompt-action accent" Content="[Resume]"
|
||||
HorizontalAlignment="Right"
|
||||
ToolTip.Tip="{loc:Tr session.reviewContinueTip}"
|
||||
Command="{Binding RejectReviewCommand}" />
|
||||
<controls:OperationIndicator Status="{Binding RejectOp}" HorizontalAlignment="Right" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<!-- Inset lives on the content, NOT on the ScrollViewer: Avalonia 12 leaves
|
||||
@@ -331,6 +335,7 @@
|
||||
<TextBlock Classes="meta" Text="{Binding Merge.MergePreviewText}" TextWrapping="Wrap"
|
||||
Foreground="{DynamicResource TextMuteBrush}"
|
||||
IsVisible="{Binding Merge.ShowMergePreviewMuted}" />
|
||||
<controls:OperationIndicator Status="{Binding Merge.PreviewOp}" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- Inspect: diff / worktree / combined diff -->
|
||||
@@ -367,11 +372,17 @@
|
||||
</StackPanel>
|
||||
|
||||
<WrapPanel Orientation="Horizontal">
|
||||
<Button Classes="btn accent" Content="Approve & Merge" Margin="0,0,8,8"
|
||||
Command="{Binding ApproveReviewCommand}" />
|
||||
<Button Classes="btn" Content="Park" Margin="0,0,8,8"
|
||||
ToolTip.Tip="Set aside — back to Idle, keeps the worktree"
|
||||
Command="{Binding ParkReviewCommand}" />
|
||||
<StackPanel Orientation="Horizontal" Spacing="{StaticResource SpaceSm}" Margin="0,0,8,8">
|
||||
<Button Classes="btn accent" Content="Approve & Merge"
|
||||
Command="{Binding ApproveReviewCommand}" />
|
||||
<controls:OperationIndicator Status="{Binding ApproveOp}" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Spacing="{StaticResource SpaceSm}" Margin="0,0,8,8">
|
||||
<Button Classes="btn" Content="Park"
|
||||
ToolTip.Tip="Set aside — back to Idle, keeps the worktree"
|
||||
Command="{Binding ParkReviewCommand}" />
|
||||
<controls:OperationIndicator Status="{Binding ParkOp}" />
|
||||
</StackPanel>
|
||||
<Button Classes="btn" Content="Cancel" Margin="0,0,8,8"
|
||||
Command="{Binding CancelReviewCommand}" />
|
||||
</WrapPanel>
|
||||
@@ -388,8 +399,11 @@
|
||||
<TextBlock Classes="meta" TextWrapping="Wrap"
|
||||
Foreground="{DynamicResource TextMuteBrush}"
|
||||
Text="Worked on this by hand? Submit the worktree for review to merge it." />
|
||||
<Button Classes="btn accent" Content="Submit for review" HorizontalAlignment="Left"
|
||||
Command="{Binding SubmitForReviewCommand}" />
|
||||
<StackPanel Orientation="Horizontal" Spacing="{StaticResource SpaceSm}">
|
||||
<Button Classes="btn accent" Content="Submit for review" HorizontalAlignment="Left"
|
||||
Command="{Binding SubmitForReviewCommand}" />
|
||||
<controls:OperationIndicator Status="{Binding SubmitOp}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
Reference in New Issue
Block a user