Ein dirty Ziel-Arbeitsverzeichnis gibt jetzt den eigenen Status dirty_target zurueck statt blocked. Die UI bietet daraufhin einen Retry an, der per git merge --autostash stasht, merged und die Aenderungen danach wiederherstellt - opt-in pro Merge: - Approve & Merge: Bestaetigungsdialog - Merge-Modal: Button "Aenderungen stashen und mergen" - MCP (merge_task/review_task) wirft weiterhin, kein autostash dort
100 lines
4.4 KiB
XML
100 lines
4.4 KiB
XML
<Window xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:vm="clr-namespace:ClaudeDo.Ui.ViewModels.Modals"
|
|
xmlns:ctl="using:ClaudeDo.Ui.Views.Controls"
|
|
xmlns:loc="using:ClaudeDo.Ui.Localization"
|
|
x:Class="ClaudeDo.Ui.Views.Modals.MergeModalView"
|
|
x:DataType="vm:MergeModalViewModel"
|
|
Title="{loc:Tr modals.merge.windowTitle}"
|
|
Width="560" Height="460" MinWidth="460" MinHeight="360"
|
|
CanResize="True"
|
|
WindowDecorations="BorderOnly"
|
|
ExtendClientAreaToDecorationsHint="True"
|
|
ExtendClientAreaTitleBarHeightHint="-1"
|
|
WindowStartupLocation="CenterOwner"
|
|
Background="{DynamicResource SurfaceBrush}">
|
|
|
|
<Window.KeyBindings>
|
|
<KeyBinding Gesture="Escape" Command="{Binding CancelCommand}"/>
|
|
</Window.KeyBindings>
|
|
|
|
<ctl:ModalShell Title="{loc:Tr modals.merge.title}" CloseCommand="{Binding CancelCommand}">
|
|
<ctl:ModalShell.Footer>
|
|
<StackPanel Orientation="Horizontal" Spacing="8"
|
|
HorizontalAlignment="Right" VerticalAlignment="Center">
|
|
<!-- A merge into a list with a verify command holds this dialog for minutes; without a
|
|
live phase here the disabled button is the only feedback and reads as a dead app. -->
|
|
<StackPanel Orientation="Horizontal" Spacing="8" VerticalAlignment="Center"
|
|
IsVisible="{Binding IsBusy}">
|
|
<Ellipse Classes="spinner" VerticalAlignment="Center"/>
|
|
<TextBlock Classes="meta" VerticalAlignment="Center"
|
|
Text="{Binding ProgressMessage}"
|
|
IsVisible="{Binding ProgressMessage, Converter={x:Static ObjectConverters.IsNotNull}}"/>
|
|
</StackPanel>
|
|
<Button Classes="btn" Content="{loc:Tr modals.merge.cancel}" Command="{Binding CancelCommand}" MinWidth="90"/>
|
|
<Button Content="{loc:Tr modals.merge.merge}" Classes="primary"
|
|
Command="{Binding SubmitCommand}"
|
|
IsDefault="True" MinWidth="90"/>
|
|
</StackPanel>
|
|
</ctl:ModalShell.Footer>
|
|
|
|
<!-- Body -->
|
|
<ScrollViewer>
|
|
<StackPanel Margin="20,16" Spacing="12">
|
|
|
|
<TextBlock Classes="title" Text="{Binding TaskTitle, StringFormat='Merging: {0}'}" />
|
|
|
|
<StackPanel Spacing="4">
|
|
<TextBlock Classes="field-label" Text="{loc:Tr modals.merge.targetBranch}"/>
|
|
<ComboBox ItemsSource="{Binding Branches}"
|
|
SelectedItem="{Binding SelectedBranch}"
|
|
HorizontalAlignment="Stretch"
|
|
IsEnabled="{Binding !IsBusy}" />
|
|
</StackPanel>
|
|
|
|
<CheckBox Content="{loc:Tr modals.merge.removeWorktree}"
|
|
IsChecked="{Binding RemoveWorktree}"
|
|
IsEnabled="{Binding !IsBusy}" />
|
|
|
|
<StackPanel Spacing="4">
|
|
<TextBlock Classes="field-label" Text="{loc:Tr modals.merge.commitMessage}"/>
|
|
<TextBox Text="{Binding CommitMessage}"
|
|
AcceptsReturn="True"
|
|
TextWrapping="Wrap"
|
|
Height="70"
|
|
IsEnabled="{Binding !IsBusy}" />
|
|
</StackPanel>
|
|
|
|
<TextBlock Text="{Binding ErrorMessage}"
|
|
Foreground="{DynamicResource BloodBrush}"
|
|
TextWrapping="Wrap"
|
|
IsVisible="{Binding ErrorMessage, Converter={x:Static ObjectConverters.IsNotNull}}" />
|
|
|
|
<Button Classes="btn" HorizontalAlignment="Left"
|
|
Content="{loc:Tr modals.merge.stashAndMerge}"
|
|
Command="{Binding StashAndMergeCommand}"
|
|
IsVisible="{Binding ShowStashRetry}" />
|
|
|
|
<Border Classes="danger-box"
|
|
IsVisible="{Binding HasConflict}">
|
|
<StackPanel Spacing="4">
|
|
<TextBlock Classes="title" Text="{loc:Tr modals.merge.conflictedFiles}" />
|
|
<ItemsControl ItemsSource="{Binding ConflictFiles}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Classes="meta" Text="{Binding}" />
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<TextBlock Text="{Binding SuccessMessage}"
|
|
Foreground="{DynamicResource MossBrightBrush}"
|
|
IsVisible="{Binding SuccessMessage, Converter={x:Static ObjectConverters.IsNotNull}}" />
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
|
|
</ctl:ModalShell>
|
|
</Window>
|