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.
This commit is contained in:
@@ -160,7 +160,7 @@
|
||||
Command="{Binding Prep.PlanDayCommand}"
|
||||
IsEnabled="{Binding Prep.IsPlanDayEnabled}"
|
||||
Content="{loc:Tr details.planDay}"/>
|
||||
<ctl:OperationIndicator DataContext="{Binding Prep.PrepOperation}"/>
|
||||
<ctl:OperationIndicator Status="{Binding Prep.PrepOperation}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Panel>
|
||||
|
||||
@@ -31,7 +31,7 @@ public partial class TaskRowView : UserControl
|
||||
|
||||
// OnTunnelPointerPressed (TasksIslandView) only selects on the left button, so
|
||||
// right-click needs its own explicit selection before the menu opens.
|
||||
vm.SelectedTask = row;
|
||||
vm.SelectFrom(row, "context-menu");
|
||||
|
||||
var menu = new ContextMenu { DataContext = row };
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
Foreground="{DynamicResource TextMuteBrush}"
|
||||
Text="{Binding Subtitle}"
|
||||
TextTrimming="CharacterEllipsis"/>
|
||||
<ctl:OperationIndicator DataContext="{Binding PlanningOperation}"/>
|
||||
<ctl:OperationIndicator Status="{Binding PlanningOperation}"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="4"
|
||||
|
||||
@@ -131,7 +131,7 @@ public partial class TasksIslandView : UserControl
|
||||
if (!e.GetCurrentPoint(button).Properties.IsLeftButtonPressed) return;
|
||||
|
||||
// Select now so the details pane updates whether the gesture becomes a click or a drag.
|
||||
if (DataContext is TasksIslandViewModel vm) vm.SelectedTask = row;
|
||||
if (DataContext is TasksIslandViewModel vm) vm.SelectFrom(row, "pointer-press");
|
||||
|
||||
// If the click landed on a nested Button (e.g. the done-toggle checkbox or star),
|
||||
// don't start a drag — that would capture the pointer and swallow the inner Click.
|
||||
|
||||
Reference in New Issue
Block a user