fix(ui): hide misleading Idle chip on planning parents
A planning parent stays Status=Idle while its session is Active (or Finalized-but-not-queued), so the lifecycle chip read "Idle"/"Parked" next to the PLANNING/PLANNED badge. Hide the chip in that case; the badge already conveys the state.
This commit is contained in:
@@ -128,6 +128,11 @@ public sealed partial class TaskRowViewModel : ViewModelBase
|
||||
_ => Status.ToString(),
|
||||
};
|
||||
|
||||
// A planning parent that is still Idle (Active planning, or Finalized-but-not-yet-queued)
|
||||
// already shows its state via the PLANNING/PLANNED badge next to the title. The lifecycle
|
||||
// chip would read "Idle" (or "Parked"), which is misleading, so hide it in that case.
|
||||
public bool ShowStatusChip => !(PlanningPhase != PlanningPhase.None && Status == TaskStatus.Idle);
|
||||
|
||||
public string StatusChipClass => (Status, IsBlocked: !string.IsNullOrEmpty(BlockedByTaskId)) switch
|
||||
{
|
||||
(TaskStatus.Running, _) => "running",
|
||||
@@ -144,6 +149,7 @@ public sealed partial class TaskRowViewModel : ViewModelBase
|
||||
{
|
||||
OnPropertyChanged(nameof(StatusChipClass));
|
||||
OnPropertyChanged(nameof(StatusLabel));
|
||||
OnPropertyChanged(nameof(ShowStatusChip));
|
||||
OnPropertyChanged(nameof(IsRunning));
|
||||
OnPropertyChanged(nameof(IsWaitingForReview));
|
||||
OnPropertyChanged(nameof(CanPickUpInTerminal));
|
||||
@@ -189,6 +195,7 @@ public sealed partial class TaskRowViewModel : ViewModelBase
|
||||
{
|
||||
OnPropertyChanged(nameof(IsPlanningParent));
|
||||
OnPropertyChanged(nameof(PlanningBadge));
|
||||
OnPropertyChanged(nameof(ShowStatusChip));
|
||||
OnPropertyChanged(nameof(IsPlanActive));
|
||||
OnPropertyChanged(nameof(IsPlanFinalized));
|
||||
OnPropertyChanged(nameof(CanOpenPlanningSession));
|
||||
|
||||
@@ -156,6 +156,7 @@
|
||||
|
||||
<!-- Status chip -->
|
||||
<Border Classes="chip"
|
||||
IsVisible="{Binding ShowStatusChip}"
|
||||
Classes.parked="{Binding IsParked}"
|
||||
Classes.running="{Binding Status, Converter={StaticResource EqStatus}, ConverterParameter=Running}"
|
||||
Classes.review="{Binding Status, Converter={StaticResource EqStatus}, ConverterParameter=WaitingForReview}"
|
||||
|
||||
Reference in New Issue
Block a user