fix(ui): session terminal scrolls to end after layout so last line is fully visible
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
|
||||
<!-- ── Log output ── -->
|
||||
<ScrollViewer Name="LogScroll" VerticalScrollBarVisibility="Auto"
|
||||
Padding="10,8,10,4">
|
||||
Padding="10,8,10,12">
|
||||
<ItemsControl ItemsSource="{Binding Log}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="vm:LogLineViewModel">
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Specialized;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Threading;
|
||||
using ClaudeDo.Ui.ViewModels.Islands;
|
||||
|
||||
namespace ClaudeDo.Ui.Views.Islands;
|
||||
@@ -17,7 +18,7 @@ public partial class SessionTerminalView : UserControl
|
||||
|
||||
private void OnLogChanged(object? sender, NotifyCollectionChangedEventArgs e)
|
||||
{
|
||||
if (e.Action == NotifyCollectionChangedAction.Add)
|
||||
LogScroll.ScrollToEnd();
|
||||
if (e.Action != NotifyCollectionChangedAction.Add) return;
|
||||
Dispatcher.UIThread.Post(() => LogScroll.ScrollToEnd(), DispatcherPriority.Background);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user