Files
ClaudeDo/src/ClaudeDo.Ui/Views/Modals/WeeklyReportModalView.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

45 lines
2.2 KiB
XML

<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:ClaudeDo.Ui.ViewModels.Modals"
xmlns:ctl="using:ClaudeDo.Ui.Views.Controls"
xmlns:loc="using:ClaudeDo.Ui.Localization"
x:Class="ClaudeDo.Ui.Views.Modals.WeeklyReportModalView"
x:DataType="vm:WeeklyReportModalViewModel"
Title="{loc:Tr modals.weeklyReport.windowTitle}"
Width="820" Height="640"
WindowDecorations="None"
ExtendClientAreaToDecorationsHint="True"
WindowStartupLocation="CenterOwner"
Background="{DynamicResource SurfaceBrush}">
<Window.KeyBindings>
<KeyBinding Gesture="Escape" Command="{Binding CloseCommand}"/>
</Window.KeyBindings>
<ctl:ModalShell Title="{loc:Tr modals.weeklyReport.title}" CloseCommand="{Binding CloseCommand}">
<DockPanel Margin="20,16">
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Spacing="8">
<TextBlock Classes="meta" Text="{loc:Tr modals.weeklyReport.from}" VerticalAlignment="Center"/>
<ctl:ThemedDatePicker SelectedDate="{Binding StartDate}"/>
<TextBlock Classes="meta" Text="{loc:Tr modals.weeklyReport.to}" VerticalAlignment="Center"/>
<ctl:ThemedDatePicker SelectedDate="{Binding EndDate}"/>
<Button Classes="btn" Content="{loc:Tr modals.weeklyReport.generate}" Command="{Binding GenerateCommand}"
IsVisible="{Binding EmptyStateVisible}"/>
<Button Classes="btn" Content="{loc:Tr modals.weeklyReport.regenerate}" Command="{Binding GenerateCommand}"
IsVisible="{Binding HasReport}"/>
<ctl:OperationIndicator Status="{Binding GenerateOperation}"/>
</StackPanel>
<TextBlock DockPanel.Dock="Top" Classes="meta" Margin="0,8,0,0"
Text="{Binding StatusMessage}"/>
<TextBlock DockPanel.Dock="Top" Classes="meta" Margin="0,16"
Text="{loc:Tr modals.weeklyReport.emptyStateHint}"
IsVisible="{Binding EmptyStateVisible}"/>
<ScrollViewer IsVisible="{Binding HasReport}">
<ctl:MarkdownView Markdown="{Binding ReportMarkdown}"/>
</ScrollViewer>
</DockPanel>
</ctl:ModalShell>
</Window>