fix(ui): fix live output visibility and editor dialog graying out

- Remove wrapping ScrollViewer from live output TextBox — Avalonia
  TextBox with AcceptsReturn handles its own scrolling; nested
  ScrollViewer caused layout collapse
- Auto-scroll via CaretIndex instead of removed ScrollViewer
- Add OnWindowClosed to both editor ViewModels, ensuring the
  TaskCompletionSource always resolves when the dialog closes
  (including via X button), preventing RelayCommand from staying
  permanently disabled

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Mika Kuns
2026-04-14 17:01:08 +02:00
parent 7363e48496
commit 2a1f26d817
6 changed files with 32 additions and 18 deletions

View File

@@ -106,22 +106,19 @@
<TextBlock Text="Live Output" FontWeight="SemiBold" FontSize="12"
Foreground="{StaticResource TextSecondaryBrush}" Margin="0,8,0,2"/>
<Border BorderBrush="{StaticResource BorderSubtleBrush}" BorderThickness="1"
CornerRadius="6" Padding="6" MaxHeight="300">
<ScrollViewer x:Name="LiveOutputScroll">
<TextBox x:Name="LiveOutputBox"
Text="{Binding LiveText, Mode=OneWay}"
IsReadOnly="True"
AcceptsReturn="True"
TextWrapping="NoWrap"
FontFamily="Consolas,Courier New,monospace"
FontSize="11"
Foreground="{StaticResource TextPrimaryBrush}"
Background="Transparent"
BorderThickness="0"
Padding="0"/>
</ScrollViewer>
</Border>
<TextBox x:Name="LiveOutputBox"
Text="{Binding LiveText, Mode=OneWay}"
IsReadOnly="True"
AcceptsReturn="True"
TextWrapping="NoWrap"
FontFamily="Consolas,Courier New,monospace"
FontSize="11"
MaxHeight="300"
Foreground="{StaticResource TextPrimaryBrush}"
BorderBrush="{StaticResource BorderSubtleBrush}"
BorderThickness="1"
CornerRadius="6"
Padding="6"/>
<Border IsVisible="{Binding HasWorktree}" BorderBrush="{StaticResource AccentBrush}"
BorderThickness="1" CornerRadius="8" Padding="10" Margin="0,8,0,0">