Files
ClaudeDo/src/ClaudeDo.Ui/Views/Controls/OperationIndicator.axaml
T
mika kuns 589b9e75f3 fix(ui): unfreeze the operation spinner and attribute rebind churn
Three causes behind the stuck indicator:
- OperationStatus.End did not retire the generation, so tick work posted
  while the dispatcher was blocked drained afterwards and set
  ShowIndicator back to true on a finished operation.
- The startup update check ran in Task.Run; OperationStatus writes its
  observable properties on the calling thread, so the final
  ShowIndicator=false never reached the binding.
- OperationIndicator overwrote its own DataContext from the Status
  property, which re-targeted the call-site binding. It now scopes the
  DataContext to an inner panel and collapses itself when Status is
  null; every call site switched from DataContext= to Status=.

Also gates the footer connection pill in the command body instead of
CanExecute (a disabled command greyed out the ONLINE chip), and extends
OperationTiming: pid per line, 4 MB rollover, fast successes dropped
(failures always kept), and DetailsIsland.BindAsync now carries the
selection trigger via TasksIslandViewModel.SelectFrom.
2026-08-12 13:50:05 +02:00

22 lines
1.3 KiB
XML

<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:svc="using:ClaudeDo.Ui.Services"
xmlns:loc="using:ClaudeDo.Ui.Localization"
x:Class="ClaudeDo.Ui.Views.Controls.OperationIndicator"
x:Name="Root"
x:DataType="svc:OperationStatus">
<!-- DataContext is scoped to the inner panel, never to the UserControl itself: overriding the
control's own DataContext would re-target the `Status="{Binding ...}"` binding at every call
site (it resolves against this control's DataContext) and throw an InvalidCastException. -->
<StackPanel Orientation="Horizontal" Spacing="{StaticResource SpaceSm}" VerticalAlignment="Center"
DataContext="{Binding #Root.Status}"
IsVisible="{Binding ShowIndicator}">
<Ellipse Classes="spinner" VerticalAlignment="Center"/>
<TextBlock Classes="meta" VerticalAlignment="Center" Text="{Binding Label}"/>
<TextBlock Classes="meta" VerticalAlignment="Center" Text="{Binding Elapsed}"/>
<TextBlock Classes="meta" VerticalAlignment="Center" Opacity="0.7"
Text="{loc:Tr ops.stalledHint}"
IsVisible="{Binding IsStalled}"/>
</StackPanel>
</UserControl>