feat(ui): add OperationStatus feedback primitive and OperationIndicator control

Foundation for long-running-operation feedback (P0-1). OperationStatus tracks
IsRunning/ShowIndicator(300ms grace)/Elapsed/IsStalled(60s since last Report)
via an injectable TimeProvider, no static timer. OperationIndicator binds a
status to the shared spinner style. Pre-provisions ops.* locale keys for
groups A and C; no ViewModel wired up yet.
This commit is contained in:
Mika Kuns
2026-08-12 08:31:38 +02:00
parent eca16a3506
commit ca65849280
6 changed files with 445 additions and 0 deletions
@@ -0,0 +1,26 @@
using Avalonia;
using Avalonia.Controls;
using ClaudeDo.Ui.Services;
namespace ClaudeDo.Ui.Views.Controls;
public partial class OperationIndicator : UserControl
{
public static readonly StyledProperty<OperationStatus?> StatusProperty =
AvaloniaProperty.Register<OperationIndicator, OperationStatus?>(nameof(Status));
public OperationStatus? Status
{
get => GetValue(StatusProperty);
set => SetValue(StatusProperty, value);
}
public OperationIndicator() => InitializeComponent();
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
{
base.OnPropertyChanged(change);
if (change.Property == StatusProperty)
DataContext = change.GetNewValue<OperationStatus?>();
}
}